Use a clustered search server with Bitbucket Data Center

Bitbucket Data Center requires a connection to a remote search server like OpenSearch or Elasticsearch to enable code search. Although code search is not critical for high availability, it is possible run a cluster of search server nodes to achieve high availability for the Bitbucket's code search index. This page provides guidance on deploying a cluster of search server nodes that run behind a load balancer connected to Bitbucket application nodes.  

Bitbucket Data Center can have only one remote connection to a shared search server for your cluster. This may be a standalone search server installation or a clustered installation behind a load balancer. 

Bitbucket Data Center allows the use of clustered search server installation. However, Atlassian Support does not provide assistance for configuring them. Consequently, Atlassian cannot guarantee providing any support for them. If assistance with configuration is required, raise a question in the Atlassian Community.

Standard Bitbucket Data Center component diagram

Before thinking about deploying a search server cluster to use with Bitbucket Data Center, it helps to understand what a standard Bitbucket Data Center installation looks like. The page Bitbucket Data Center requirements outlines the detailed requirements.

At minimum, a standard Bitbucket Data Center installation must have these components, each on a dedicated machine, and connected by a high speed LAN.

For detailed requirements on each component below, see Bitbucket Data Center requirements:

  • Bitbucket applications nodes, all running the same version of Bitbucket Data Center.
  • Load balancer that supports session affinity (or, "sticky sessions").
  • Shared database, able to take block-level snapshots.
  • Shared filesystem, accessible via NFS as a single mount point.
  • Shared search server, with a single connection to the Bitbucket application nodes.

Bitbucket Data Center component diagram with an Elasticsearch cluster

This component diagram provides an example configuration of a Bitbucket Data Center installation deployed with a cluster of Elasticsearch nodes behind a load balancer. 

Use Amazon's OpenSearch Service with Bitbucket Data Center

The easiest way to set up and deploy a search service cluster for Bitbucket Data Center is to use the Amazon OpenSearch service. Atlassian cannot provide direct support, but a good place to start is with Amazon's documentation: What is Amazon OpenSearch Service?

Be sure to use a supported version of Amazon OpenSearch Service. For details on supported versions, see the Supported platforms page.

Set up a standalone search server cluster with Bitbucket Data Center

If you're not using Amazon OpenSearch service, and instead are setting up a cluster of search server nodes yourself, you generally want to set up a cluster of at least two nodes. Two nodes allows each node to have a replica on it, meaning that if one node goes down for a short period, you'll still have all of your search results available to you while you repair or replace the other node. If you require more fault tolerance, you can increase the number of nodes in your cluster.

Secure your search server cluster

After setting up your search server cluster, it's important you secure your cluster. See Secure your search server for details.

Last modified on Jan 10, 2023

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.