What Is Cross-Cluster Search (CCS) in Elasticsearch?

What Is Cross-Cluster Search (CCS) in Elasticsearch?

A complete, step-by-step guide to searching many separate Elasticsearch clusters with a single request, without copying a single document: how it works, how to set it up safely, and how to run it at scale.

Imagine a company that runs its online shop from three regions: one cluster in Frankfurt, one in Virginia, one in Singapore. Each holds the logs of its own customers, and each works perfectly. Then a customer in Berlin flies to New York, has a problem with an order, and phones support. The support engineer needs to see everything that happened to that customer, and it is spread across three separate systems. She opens three dashboards, runs three searches, and copies results into a notebook. It takes twenty minutes, and the customer is still on hold.

Cross-cluster search was built to end that pain. It lets one Elasticsearch cluster send a search to other clusters, gather their answers, and hand back a single combined result, as if all the data lived in one place. This article explains every part of it in simple language: what it is, why it exists, how a request travels, how to connect clusters securely, how to read the answers, and how to keep it fast and reliable when the numbers get big.

WWhat Is Cross-Cluster Search?

Start here. By the end of this chapter you will know what a cluster is, what “cross-cluster” means, and why the idea is useful.

An Elasticsearch cluster is a group of computers, called nodes, that work together to store and search data. Every cluster has a name, its own indices, its own settings and its own security rules. Normally, a search sent to a cluster looks only at the indices inside that cluster.

Cross-cluster search, usually shortened to CCS, changes that. It allows one cluster, called the local cluster, to run a search against indices that live on one or more other clusters, called remote clusters. The local cluster sends the request, the remote clusters do their share of the work, and the local cluster merges everything into one response. The person who asked sees a single answer. The data never moves permanently. It stays exactly where it was.

Searching in place, not copying

This last point is the heart of the idea. There are two big ways to make data in different places available together. You can copy it to one location, or you can ask the places where it already lives. CCS is the second way. No copy is made, no storage is doubled, and no pipeline has to be built and maintained. When you search, the question travels to the data instead of the data traveling to the question.

Everyday analogy

Think of a group of libraries that have agreed to cooperate. If you want every book about volcanoes, you do not ask all libraries to mail you their books. Instead, your local librarian phones the partner libraries, each one searches its own shelves, and all of them report back. Your librarian puts the answers together into one list. Each library keeps its books, each one keeps its own rules about who may borrow what, and you still get one complete answer. That is cross-cluster search.

1 request
travels to many clusters and returns one merged answer
0 copies
of your data are made to answer a search
alias:index
the simple naming pattern that points a search at a remote cluster

A short history

Before cross-cluster search existed, people who wanted to search several clusters used a special node type called a tribe node, which joined multiple clusters into one view. It worked, but it was awkward: it had to hold the state of every cluster it joined, it clashed on index names, and it was hard to secure. Cross-cluster search arrived in the 5.x series, in 2017, as a cleaner replacement. It let an ordinary node talk to other clusters through a simple connection, and the tribe node was retired in later major versions.

Over the years the feature has grown. Connections became easier to configure and easier to secure. Newer versions added a modern security model based on special keys, more detailed information in the search response, better handling of clusters that are temporarily unreachable, and the ability to use the same idea in other query languages. Kibana, the machine learning features, and the security and observability solutions all learned to use it. Today CCS is the standard way to build a “federated” Elasticsearch view across regions, teams and environments.

i
Word check

Whenever this article says “local,” it means “the cluster that receives your request and does the merging.” Whenever it says “remote,” it means “another cluster that the local one has been told how to reach.” Which cluster is local depends only on where you send the search, so the same cluster can be local for one person and remote for another.

TThe Problem: Why One Big Cluster Is Not Always the Answer

If clusters can hold so much data, why would anyone run several of them? Understanding the reasons explains why CCS is needed.

A newcomer often asks a fair question: “Why not put everything in one giant cluster?” In a perfect world that would be simplest. In the real world there are at least six good reasons to have more than one.

Reason one: distance

Information takes time to cross the ocean. A round trip between Frankfurt and Singapore is measured in hundreds of milliseconds, and that delay is added to every operation. Systems that write data all day, such as log collectors, work much better when the cluster is close to them. So each region often gets its own cluster.

Reason two: laws and promises

Many countries and industries require that certain data stay inside a certain border. European customer data may need to remain in Europe. A hospital may be unable to let patient records leave its own building. Separate clusters make it easy to keep each set of data in its proper place.

Reason three: limits and blast radius

Every cluster has practical limits: how many shards it can manage, how large its cluster state can grow, how long an upgrade takes. Beyond a certain size, one cluster becomes slow to coordinate. Also, if a single huge cluster has a serious problem, everything stops. Several smaller clusters mean that a failure affects only its own part. This is called limiting the blast radius.

Reason four: different owners

The payments team and the marketing team may have different budgets, different security rules, different upgrade schedules and different on-call people. Giving each its own cluster keeps their lives independent.

Reason five: safer upgrades

Upgrading one giant cluster is a big-bang event. With several clusters, you can upgrade a small, low-risk one first, learn from it, and roll the change out gradually.

Reason six: different jobs

Some clusters exist to ingest data quickly, some to serve searches for customers, and some to store cheap long-term archives. Each is tuned differently, and cramming them together forces awkward compromises.

Everyday analogy

A big retail chain does not keep all of its stock in one warehouse in one country. It has regional warehouses close to its customers, each following the local rules, each run by its own team. The trade-off is that when the head office asks “how many blue jackets do we have anywhere?”, somebody must ask every warehouse.

The new problem: scattered answers

Splitting things up solves the problems above but creates a new one. Questions that span the whole company now have to be answered from several places. There are two clumsy ways to handle this. The first is copying everything into one central place. This doubles storage costs, needs pipelines to keep the copies fresh, can break the legal rules that caused the split in the first place, and always shows slightly old data. The second is asking each cluster separately and merging the answers by hand, which is slow, error-prone and impossible to put on a single dashboard.

Example: the global support desk

A video-streaming company like Netflix serves viewers on every continent, so its logs naturally live in several regional systems. A support engineer investigating one viewer’s playback failure would like to search all regions at once instead of guessing which region handled the session. A search that can span the regional clusters answers the question in seconds.

Example: the security operations center

A bank such as HSBC operates in dozens of countries, and local rules often require that each country’s data stays in-country. Analysts at headquarters still need to hunt for a suspicious address across every location. Asking each country’s cluster in place, rather than moving the data, respects both needs.

ApproachStorage costFreshnessEffort to maintain
Copy everything to one placeDoubled or moreDelayed by the copy processHigh: pipelines to build and watch
Ask each cluster by handNone extraFreshHigh: people do the merging
Cross-cluster searchNone extraFresh, as fresh as each sourceLow: configure connections once
Move the question to the data instead of the data to the question.

This does not mean CCS is right for every situation. Later chapters explain when copying, through a feature called cross-cluster replication, is the better tool. But for the very common need to search several live clusters at once, CCS is the natural answer.

CCore Concepts: The Vocabulary You Need

A handful of words unlock the whole feature. Each one is explained with what it is, why it exists, where you meet it, and a picture from everyday life.

The local cluster

The local cluster is the cluster that receives your search. It is the one Kibana or your application talks to. It coordinates the whole operation: it decides which clusters to contact, sends the requests, waits for the answers, and merges them. It is the librarian you walked up to.

The remote cluster

A remote cluster is any other cluster that the local cluster has been configured to reach. It does the searching on its own data and sends back results. It is a partner library.

The cluster alias

Every remote cluster is given a short nickname on the local side, called its alias, such as “eu_west” or “us_east”. The alias is chosen by you, and it is only a label used on the local cluster. It does not have to match the real name of the remote cluster. Aliases are how you point a search at a particular remote. Think of them as the names in your phone’s contacts list: you save “Grandma” whatever her real name is.

The remote index expression

To search a remote index, you write the alias, then a colon, then the index name, for example “eu_west:logs-2026”. You can use stars as wildcards, so “eu_west:logs-*” means every log index on that cluster, and “*:logs-*” means every log index on every remote cluster. Indices without a prefix are searched on the local cluster as usual. It is like writing “Grandma: recipes” to say which person’s cookbook you mean.

Seed nodes and gateway nodes

To connect to a remote cluster, the local cluster needs an address to knock on. In the common connection style, you give it a few seed nodes, which are addresses of machines in the remote cluster. It connects to one of them, asks about the other machines, and then keeps connections open to a small number of suitable ones, called gateway nodes. Gateways are the front doors through which requests enter the remote cluster. Seeds are how you find the building; gateways are the doors you actually use.

The connection mode

There are two ways to build the connection. In sniff mode the local cluster discovers and connects to nodes on its own. In proxy mode it connects to a single fixed address, such as a load balancer, and lets that address forward traffic. Chapter 8 compares them in detail.

Minimizing round trips

A search has several phases, and each phase can require a conversation across the network. A setting called minimize round trips decides whether the local cluster hands the whole job to each remote cluster in a single conversation, or whether it manages every phase itself. It matters a great deal for speed, and Chapter 5 explains it fully.

Skipping unavailable clusters

Remote clusters sometimes go offline. A per-cluster setting decides whether such a cluster causes the whole search to fail, or whether it is quietly left out with a note in the response. It is the difference between “the phone call fails if any partner library is closed” and “we will give you what the open libraries found, and tell you which ones were closed.”

Trust and credentials

Clusters should not accept requests from strangers. Cross-cluster search therefore relies on a trust arrangement. In the older style, the clusters trust each other’s security certificates. In the newer style, the remote cluster hands out a special cross-cluster API key, which the local cluster stores and presents with each request. The key is like a visitor badge that says exactly which doors it opens.

Who asks

Local cluster

Receives the search, contacts the others, and merges the answers.

Who answers

Remote cluster

Searches its own data and returns results to the local cluster.

Nickname

Cluster alias

A label you choose for each remote, used as the prefix in searches.

Address

Seed or proxy

The address the local cluster uses to find and enter the remote cluster.

Front door

Gateway node

A remote node that accepts cross-cluster requests on behalf of the cluster.

Speed

Minimize round trips

Lets each remote finish its own work, so fewer network conversations are needed.

Resilience

Skip unavailable

Decides whether a missing cluster breaks the search or is left out of it.

Permission

Trust and keys

Certificates or API keys that prove the local cluster may ask.

i
Remember

Local, remote, alias, mode, trust. If you keep only five words in your head, keep these. The local cluster uses an alias to reach a remote cluster through a chosen connection mode, after trust has been established.

AArchitecture and Components

Now let us zoom out and look at the machinery: which parts exist, where each one lives, and how they connect.

Cross-cluster search is not a separate product. It is a capability built into every node. There is no special “CCS server” to install. You simply tell a cluster about its remote neighbors, and its nodes learn to talk to them. The diagram below shows a typical arrangement with one local cluster and three remote clusters in different regions.

flowchart LR
    USER["User or application"] --> KB["Kibana or API client"]
    KB --> LB["Load balancer"]
    LB --> LC["Local cluster - coordinating node"]
    LC --> GW1["Gateway node in eu_west cluster"]
    LC --> GW2["Gateway node in us_east cluster"]
    LC --> GW3["Gateway node in ap_south cluster"]
    GW1 --> D1["Data nodes and shards in eu_west"]
    GW2 --> D2["Data nodes and shards in us_east"]
    GW3 --> D3["Data nodes and shards in ap_south"]
    LC --> LD["Local data nodes and shards"]
Figure 1. One local cluster fans a search out to remote clusters through their gateway nodes.

Walking through the diagram

On the left, a person or an application sends a search, usually through Kibana or a web service. Often a load balancer sits in front so that requests are spread across the local cluster’s nodes. One node in the local cluster picks up the request and becomes its coordinating node, the node in charge of that particular search. It looks at the indices named in the request. Names without a prefix belong to the local cluster and are searched there. Names with an alias prefix belong to a remote cluster, so the coordinator sends a request across the network to a gateway node in that cluster. The gateway node coordinates the work inside its own cluster, talking to the data nodes that hold the relevant shards, and returns results to the local coordinator, which merges everything.

Everyday analogy

Picture a head office that needs figures from three regional offices. The head-office manager (coordinating node) phones the front desk of each regional office (gateway node). The front desk does not count the stock itself. It asks the departments in its own building (data nodes), gathers their numbers, and reads one summary back to the manager, who adds the three summaries into a company-wide report.

The components in detail

ComponentWhat it doesWhere it lives
Remote cluster settingsStore each alias, its addresses, its mode and its optionsThe local cluster’s settings, changeable while running
Remote cluster client roleMarks the local nodes that may open connections to remote clustersNode configuration on the local cluster
Connection managerOpens, monitors and reconnects the network links to each remoteInside each eligible local node
Coordinating nodeSplits the search, sends requests, merges resultsAny local node that receives the request
Gateway nodeAccepts the request on the remote side and coordinates locally thereA node of the remote cluster
Data nodes and shardsHold the actual documents and run the search on themEvery participating cluster
Security layerVerifies certificates or API keys and checks privileges on both sidesBoth clusters

The special node role

Not every node needs to talk to other clusters. Elasticsearch has a dedicated node role for it, called the remote cluster client role. Only nodes with this role open connections to remote clusters. By default, nodes usually have it, but in a carefully designed production cluster you may give the role only to a small set of nodes, for example a few coordinating-only nodes, so that connections, memory and network usage are concentrated in a small, well-understood place. It is like designating one room in the head office as the “international calls” room.

Everything is symmetrical, yet each direction is separate

Setting up CCS from cluster A to cluster B does not automatically let B search A. Each direction is its own configuration, with its own trust and its own permissions. This is a helpful safety property: a central search cluster can be allowed to look at many regional clusters, while the regional ones cannot look at each other or back at the center.

!
Tip

Many organizations create a dedicated “search hub” cluster whose only job is to receive user searches and fan them out. The hub holds little or no data itself. This keeps the fan-out logic, the dashboards and the user accounts in one tidy place, while the data clusters concentrate on storing and searching their own data.

IInternal Working: How a Cross-Cluster Search Really Runs

This is the engine room. You do not need to be an expert in distributed systems, because every idea comes with a picture.

First, a quick reminder of how one cluster searches

Inside a single cluster, an index is split into pieces called shards, spread over many nodes. A search has two main phases. In the query phase, every relevant shard finds its best matching documents and sends back a small list of their identifiers and scores. The coordinating node merges those lists into one ranked list. In the fetch phase, the coordinator asks only the shards holding the winning documents to send the full text. It is a talent show: every shard sends its best acts to a central judge (query), and the judge then invites only the finalists to perform in full (fetch).

Two ways to extend that across clusters

When some shards live in other clusters, Elasticsearch can extend this two-phase process in one of two ways, chosen by a setting known as minimize round trips. In current versions the default is to minimize.

Mode one: minimize round trips (the default)

Here the local coordinator behaves like a project manager who delegates entire tasks. For each remote cluster, it sends a single request that says, “Run this whole search over your own indices and send me your final top results.” The remote cluster performs both the query phase and the fetch phase on its own, using its own coordinating node, and returns a finished, ranked list. The local cluster does the same for its own indices. Finally, the local coordinator merges the finished lists, which requires only a light bit of work.

sequenceDiagram
    participant U as User or Kibana
    participant L as Local coordinating node
    participant R1 as Remote cluster eu_west
    participant R2 as Remote cluster us_east
    U->>L: One search request
    L->>R1: One request for eu_west indices
    L->>R2: One request for us_east indices
    R1-->>L: Finished top results from eu_west
    R2-->>L: Finished top results from us_east
    L->>U: One merged response with cluster status
Figure 2. With round trips minimized, each remote cluster receives one request and returns finished results.

The great advantage is fewer trips across slow networks. Since a trip from one continent to another may cost a hundred milliseconds or more, doing one trip instead of four is a big saving. Another advantage is that a slow or busy remote cluster does not hold the local cluster hostage between phases.

Mode two: do not minimize round trips

In the other mode, the local coordinator behaves like a hands-on manager who wants to supervise every step. It treats every shard, whether local or remote, as if it belonged to one big cluster. It first checks which shards could possibly match, then runs the query phase across all clusters, merges the ranked lists itself, and finally reaches back to the specific shards holding the winning documents for the fetch phase. This requires more conversations across the network, but the local coordinator sees every shard result directly.

flowchart TD
    A["Local coordinator receives the request"] --> B["Ask all shards in all clusters whether they could match"]
    B --> C["Query phase runs on every relevant shard in every cluster"]
    C --> D["Local coordinator merges and ranks all shard results"]
    D --> E["Fetch phase asks only the shards holding the winners"]
    E --> F["Final merged response is returned"]
Figure 3. Without minimizing, the local coordinator supervises every phase across every cluster.
QuestionMinimize round trips onMinimize round trips off
Network conversations per remoteFew, often oneSeveral, one per phase
Who merges within a clusterThe remote cluster does its own mergingThe local coordinator handles everything
Best forRemotes far away, high latencyNearby clusters, or search types that need a global view
Relevance scoringEach cluster scores on its own dataCan be arranged to share statistics across all shards, with a suitable search type
Typical defaultYesNo, chosen deliberately

How results are merged

Whichever mode is used, the local coordinator finishes by combining lists. For sorted or scored results, it takes the top entries from every list and interleaves them into one ranked list. For aggregations, such as counting how many errors each service produced, it adds the partial counts from every cluster together. This is why a single dashboard over three clusters can show one coherent chart. Note that some aggregation results are approximate when data is spread across many shards and clusters, in the same way that a poll of several towns gives an estimate of the whole country.

Everyday analogy

Suppose three schools each hold a spelling contest, and you want the overall top ten. In the delegating style, each school sends you its own finished top ten and you pick the best ten from thirty names. In the hands-on style, you ask every school for every student’s score sheet and rank them all yourself. The first is quicker for you; the second is more work, but you see the raw numbers.

A worked example with real numbers

Suppose a support engineer searches for the last fifteen minutes of errors for one customer, across a local cluster and two remote clusters. The local cluster needs 30 milliseconds. The cluster eu_west, close by, needs 60 milliseconds plus a 20 millisecond network trip each way, so about 100 milliseconds in total. The cluster ap_south, on the other side of the world, needs 80 milliseconds of its own work and a network trip of 180 milliseconds each way, about 440 milliseconds. Because the requests are sent in parallel, the user waits roughly 440 milliseconds, plus a few milliseconds of merging.

Now compare the talkative mode. If the local coordinator had to talk to ap_south four separate times, once to check which shards could match, once for the query phase, once more for the fetch phase and once to close the search context, the trips alone would cost around four times 360 milliseconds, or more than a second and a half. The numbers are only illustrations, but the lesson is real: on long-distance links, the number of conversations matters more than the amount of work, and that is exactly why the default is to minimize them.

The scoring wrinkle

Search engines rank documents by relevance scores, and those scores depend partly on statistics about the data, such as how common a word is. Each cluster computes those statistics from its own data. So a word that is rare in one region and common in another can yield slightly different scores for otherwise similar documents. For most log and analytics use cases this makes no practical difference, because results are sorted by time or filtered by exact values. For text search, where ranking quality matters, be aware that scores from different clusters are not perfectly comparable unless you choose a search type that collects statistics globally, which requires the more talkative mode.

Where the index name goes

When results come back, each hit records which index it came from, and remote hits carry the alias prefix, for example “eu_west:logs-2026”. This means that two clusters can safely hold indices with exactly the same name, and you can always tell them apart. Without the prefix, the same name on two clusters would be a confusing collision.

DData Flow and Lifecycle

A remote connection is configured, established, used, sometimes broken, and repaired. Knowing each stage prevents most surprises.

The life of a connection

When you save a remote cluster’s settings on the local cluster, it immediately tries to connect. If the remote answers, the connection becomes live and stays open in the background, kept alive by small periodic messages so that firewalls do not close it for being idle. If the connection breaks, for example because of a network outage or a remote restart, the local cluster notices and tries again on a schedule until it works. A connection that has been established is like a phone line that stays open: the next search does not have to dial.

stateDiagram-v2
    [*] --> configured
    configured --> connecting : settings saved
    connecting --> connected : remote reachable
    connecting --> disconnected : timeout or refused
    connected --> disconnected : network break
    disconnected --> connecting : scheduled retry
    connected --> [*] : remote removed
Figure 4. The life of a remote cluster connection. Failed connections retry on their own.

The life of one search

1

Request arrives

A user or application sends a search naming local and remote indices to any node of the local cluster.

2

Names are resolved

The coordinator expands wildcards and sorts the targets by alias into “local,” “eu_west,” “us_east,” and so on.

3

Security is checked

The local cluster checks the user’s permissions, and each remote checks the credentials and privileges again before doing any work.

4

Work is fanned out

Requests go to every target cluster in parallel, so the total time is close to the slowest cluster, not the sum of all.

5

Results come back

Each cluster returns finished results, or in the talkative mode, phase results, and any failures are noted.

6

Merge and respond

The coordinator merges hits and aggregations and adds a summary of which clusters answered.

Data stays put

At no point is your data stored at the local cluster. Documents travel over the network only as part of a result, they are held briefly in memory to be merged, and then they are sent to the caller and forgotten. If a remote cluster deletes a document a second later, it is gone from the next search. This is why CCS results are always as fresh as the source clusters.

Parallel work, single wait

Because the local cluster contacts all clusters at the same moment, the total waiting time is roughly that of the slowest one, plus the merge. If two clusters answer in 80 milliseconds and one answers in 900 milliseconds, the user waits about 900 milliseconds. This makes it important to understand which cluster is the slow one, and Chapter 10 explains how the response reveals it.

!
Watch out: the slowest link

A cross-cluster search is only as quick as its slowest participant. One overloaded or far-away cluster can make every dashboard that includes it feel sluggish. Measure each cluster’s response time separately before blaming the local cluster.

YYour First Setup: A Guided Tour

Before going deeper, here is the route you follow to connect two clusters for the first time. Knowing the road makes the later chapters easier to follow.

Setting up cross-cluster search is less about clever commands and more about careful preparation. Most failures come from the network or from permissions, not from Elasticsearch itself. The steps below describe the journey for a beginner who wants a central cluster to search a regional cluster.

Before you begin

Check three things. First, the versions. Elastic publishes a compatibility table that tells you which versions of a local cluster may search which versions of a remote cluster. In general the clusters should be on the same major version, or on close neighbors, and it is best to keep them on similar versions. Second, the subscription. Some parts of the feature, especially the newer key-based security model, can depend on the subscription level, so confirm what your license includes. Third, the network. The local cluster must be able to open a connection to the remote one, which means the right addresses, the right ports and no blocking firewall in between.

1

Decide who searches whom

Draw a small diagram. Choose the local cluster, list the remotes, and pick a short alias for each, such as eu_west.

2

Open the network path

Ask the network team to allow traffic from the local cluster’s nodes to the remote cluster on the right port. Test it before touching Elasticsearch.

3

Establish trust

Either exchange and trust certificate authorities, or, with the newer model, create a cross-cluster API key on the remote and store it safely on the local cluster.

4

Add the remote cluster

Use the Remote Clusters screen in Kibana’s management area or the cluster settings interface to give the alias, the addresses and the connection mode.

5

Check the connection

The screen or the remote info interface should show “connected” and how many nodes are linked. Anything else means trouble to fix now.

6

Grant permissions

Give the people who will search a role that allows reading the remote indices they need, and nothing more.

7

Run a small first search

Search one remote index with a tiny time range and a small result size. Confirm results arrive with the alias prefix.

8

Create a data view

In Kibana, create a data view whose pattern includes the alias, so Discover and dashboards can use remote data.

The two trust styles in one paragraph each

With the certificate-based style, the clusters talk over their normal internal transport channel. Each cluster is configured to trust the certificate authority of the other, so their encrypted connections are accepted. Permissions are then decided by matching the roles of the searching user on both sides. It works well but gives a broad kind of trust between clusters.

With the newer API key-based style, the remote cluster opens a separate, dedicated network interface just for cross-cluster traffic. An administrator on the remote cluster creates a special key that names exactly which indices may be searched, and hands it to the local cluster, which keeps it in its secure settings store. Every request carries the key. The remote can revoke it at any time, and the access it grants is narrow and explicit. Chapter 14 covers security in more detail.

Everyday analogy

Setting up two offices to work together is like arranging a shared visitor program. First you agree who may visit whom (the plan). You make sure the road between the buildings is open (network). You exchange badges or agree on a guest list (trust). You save each other’s switchboard number (remote cluster settings). You make a test call (connection check). Finally, you tell the receptionist what each visitor may do (permissions).

!
Tip

Do the first setup between two small, non-critical test clusters. Nearly every difficulty, such as firewalls that close idle connections or nodes that advertise unreachable addresses, shows up in the test, and it is far cheaper to learn there.

!
Watch out: hosted deployments

On Elastic’s hosted cloud offerings, the trust relationships and the remote cluster links are usually created through the console’s own screens rather than by editing settings by hand. If you use a hosted deployment, follow its dedicated instructions, because the network layer works differently there.

CConnection Modes: Sniff or Proxy

The local cluster can reach a remote one in two different ways. Choosing the right one depends on how your network is built.

flowchart LR
    subgraph SNIFF["Sniff mode"]
        L1["Local node"] --> S1["Seed node"]
        S1 -.->|"shares list of nodes"| L1
        L1 --> G1["Gateway node A"]
        L1 --> G2["Gateway node B"]
        L1 --> G3["Gateway node C"]
    end
    subgraph PROXY["Proxy mode"]
        L2["Local node"] --> P["Load balancer or proxy address"]
        P --> R1["Remote node 1"]
        P --> R2["Remote node 2"]
    end
Figure 5. In sniff mode the local cluster discovers and picks gateway nodes. In proxy mode it connects to one fixed address.

Sniff mode

Sniff mode is the traditional style and the usual default. You provide one or more seed nodes. The local cluster connects to a seed, asks for the list of nodes in the remote cluster, and then chooses a small number of them, three by default, that are allowed to accept cross-cluster requests. It keeps those connections open. If a gateway node disappears, the local cluster picks another one from the list. This gives good resilience with no extra equipment.

The catch is that the remote nodes must be directly reachable by the addresses they announce about themselves. If a remote node lives behind a network translation layer or inside a container network and announces a private address that the local cluster cannot reach, the seed connection works but the discovered gateways do not. This produces the confusing symptom “it connects and then immediately fails.”

Proxy mode

In proxy mode you give a single address, typically a load balancer or a gateway service that forwards traffic to remote nodes. The local cluster opens a fixed number of connections to that address and does not try to discover or connect to individual remote nodes. This is ideal when only one entry point is exposed to the outside, for example when the remote cluster runs inside a container platform, behind a cloud load balancer, or behind a strict firewall. Proxy mode can also carry a server name so that a shared entry point knows which cluster the traffic is meant for.

QuestionSniff modeProxy mode
What you configureOne or more seed addressesOne proxy or load balancer address
Who chooses the remote nodesThe local cluster, from the discovered listThe proxy or load balancer
Network requirementRemote nodes directly reachable at their announced addressesOnly the proxy address must be reachable
Best fitSimple, flat networks such as a shared private networkContainers, cloud load balancers, strict firewalls, address translation
Typical failureAnnounced addresses that cannot be reachedProxy misconfigured or not forwarding to healthy nodes
Everyday analogy

Sniff mode is like receiving the company’s internal phone directory and then calling each extension directly. It is efficient, but you need a phone system that lets you reach all those extensions. Proxy mode is like calling the main switchboard and letting the operator put you through. It is simpler to reach from outside, and the operator can send you to whoever is free.

Ports and firewalls

Cross-cluster traffic does not use the normal HTTP port that applications use to search. Under the certificate-based style, it uses the internal transport port that nodes use to talk to each other, which is often 9300 by default. Under the newer key-based style, a dedicated remote cluster interface listens on its own port, which is often 9443 by default. Either way, you must allow the local cluster’s nodes to reach that port on the remote side, and you should allow only those source addresses rather than the whole internet.

Keeping connections alive

Firewalls and load balancers love to close connections that look idle. Cross-cluster links can sit quiet for a while between searches, so Elasticsearch can send small keep-alive pings on a schedule, and you can adjust that schedule if your network closes idle connections quickly. Optional compression of the traffic can also reduce the number of bytes on long-distance links, at the cost of a little processor time on both ends.

!
Tip

If a link works for a few minutes after every restart and then starts failing at quiet times, suspect an idle timeout in a firewall or load balancer. The cure is usually a keep-alive schedule shorter than that timeout.

WWriting Cross-Cluster Searches

Once clusters are connected, using them is pleasantly simple. This chapter shows how to name targets, which tools support them, and how Kibana fits in.

The naming pattern

The whole trick is the prefix. An index written as plain “logs-app” is searched on the local cluster. An index written as “eu_west:logs-app” is searched on the cluster whose alias is eu_west. You can mix as many targets as you like in one request: a local index, one index from eu_west, and a wildcard from us_east. The response contains hits from all of them.

Wildcards

Wildcards make the pattern powerful. A star after the colon selects many indices on one cluster: “eu_west:logs-*”. A star in the alias position selects many clusters: “*:logs-*” means every log index on every configured remote cluster, and “eu_*:logs-*” means every remote whose alias begins with “eu_”. This is convenient for a single Kibana data view that spans the whole company, but it deserves caution. A careless star can send a heavy search to every cluster you own.

Local only

Plain name

An index with no prefix is searched on the cluster that received the request.

One remote

Alias, colon, name

The alias before the colon selects a single remote cluster and its index.

Many indices

Wildcard after the colon

Selects all matching indices on that one remote cluster.

Many clusters

Wildcard before the colon

Selects matching indices on every remote whose alias matches the pattern.

Which tools understand remote names

The core search interface accepts remote names, and so do the multi-search interface for sending several searches at once, the field capabilities interface that Kibana uses to learn which fields exist, and the asynchronous search interface that runs long searches in the background and returns partial results as they arrive. Utilities for checking which indices and remote clusters a pattern will actually match also exist in recent versions. Newer releases have extended cross-cluster querying to other query languages as well, though the exact coverage depends on your version, so check the documentation for yours.

Using CCS in Kibana

Kibana works through data views. To make remote data visible, create a data view whose pattern includes the alias, such as “*:logs-*” for all remote logs, or “logs-*,*:logs-*” for local and remote together. After that, Discover, Lens, dashboards, maps and most other tools can use it without knowing anything about clusters. Users simply see one big combined data set, and a field showing the index name reveals which cluster each document came from.

Example: one dashboard for three regions

An online marketplace like Amazon might keep order events in regional clusters. A single data view covering all regions lets an operations manager build one dashboard showing orders per minute, failed payments and average checkout time, split by region, without moving a single event out of its home region.

Three everyday search shapes

Most real cross-cluster searches fall into three simple shapes. The first is the needle search: find every event that mentions one customer, one order or one request identifier, anywhere. It returns very few documents, so it is cheap on the network, and it is the classic support-desk request. The second is the count search: how many errors per region in the last hour? It returns only numbers, so almost no data crosses the network, and it is the natural shape for dashboards. The third is the browse search: show me the most recent hundred events across all regions, newest first. It returns real documents, so keep the size small and the time range tight. Choosing the right shape for the question keeps searches fast and kind to every cluster involved.

Consistent field names matter

When several clusters feed one view, they must agree on what fields mean. If one cluster stores the response time as a number and another stores it as text, Kibana shows a conflict and some charts and sorts stop working. If one region calls the field “client_ip” and another “clientIp”, a single filter will not match both. The best protection is to agree on a common schema across all clusters before you start, and Elastic’s own common schema exists for exactly this purpose. It is like making sure every office uses the same form: “date of birth” must mean the same thing, in the same format, everywhere.

!
Tip

Always narrow searches by time. A query that says “the last fifteen minutes” prunes most shards immediately, because their time ranges do not match, and those shards are skipped without doing real work. Time filters are the cheapest and most effective speed-up for cross-cluster searches.

!
Watch out: same names, different data

Two clusters may hold an index with the same name but completely different content. The alias prefix in each hit tells them apart, but dashboards that ignore it can accidentally add up unrelated numbers. Include the cluster or index name in charts where the source matters.

RReading the Response: Who Answered and Who Did Not

A cross-cluster answer can be complete, or it can be missing pieces. The response tells you which, if you know where to look.

The cluster summary

Every cross-cluster response carries a small summary of how the clusters behaved. It counts the total number of clusters involved (including the local one), how many were successful, how many were skipped, and, in versions that support asynchronous searches, how many are still running or returned only partial results. Newer versions can also include a detailed entry for each cluster: its status, how long it took, how many shards it searched, and how many of those succeeded, were skipped or failed. This is the first place to look whenever a number “looks too low.”

Everyday analogy

When a pollster reports “60 percent of people prefer tea,” a good report also says how many towns were surveyed and whether some were missed. The cluster summary is that honest footnote. A total that quietly leaves out one region without saying so would be misleading.

Shards, timeouts and partial results

The response also has a general summary of shards, covering both local and remote ones: how many were searched, how many were skipped because their time range could not match, and how many failed. A timed out flag says whether any part of the search ran out of time and returned only what it had found so far. Failures on some shards do not always break the search. Depending on your settings, Elasticsearch may return the hits it did collect and mark the response as partial, rather than failing entirely.

What “skip unavailable” really decides

Each remote cluster has a setting that controls what happens when it cannot be reached. If skipping is off for that cluster, an unreachable cluster makes the entire search fail with an error. If it is on, the cluster is left out, the search continues with the others, and the cluster summary records the cluster as skipped. Which is right depends on the question you are asking.

SituationSkipping onSkipping off
Remote cluster is downSearch succeeds with fewer clusters, and the summary shows one skippedSearch fails with an error
Dashboard for browsingGood: something is better than nothingFrustrating: one outage blanks every chart
Compliance report that must cover every siteRisky: the report may silently be incompleteGood: you learn immediately that data is missing
Alerting on totalsRisky: totals drop and may trigger false alarmsSafer: the failure is loud and visible
!
Watch out: defaults change

The default value of this setting has differed between versions. Do not rely on memory or on old blog posts. Read the documentation for your version and set the value explicitly for every remote cluster, so its behavior is a decision you made and not an accident.

Investigating a suspicious result

1

Read the cluster summary

Were all clusters successful? If any were skipped or partial, the numbers are incomplete by definition.

2

Check the connection status

Look at the remote cluster list to see whether each link is connected and how many nodes are linked.

3

Try the remote cluster directly

Run the same search against the remote cluster itself. If it is slow or failing there too, the cause is not the link.

4

Check permissions

A missing privilege can make an index invisible without breaking the whole search.

5

Decide how the dashboard should behave

Show a visible warning when any cluster is missing, so nobody trusts a total that is incomplete.

AAdvanced Features and Settings

Once the basics work, these features let you tune speed, accuracy and safety for your particular setup.

Choosing the round trip strategy per search

The minimize-round-trips choice can be made for each search request, not only globally. A dashboard that spans distant regions should stay with the efficient default. A text-search screen that must rank results consistently across nearby clusters might turn minimizing off and choose a search type that gathers global statistics. Making this choice per request is like choosing between a phone call and a video conference for each meeting depending on what it needs.

Asynchronous search

Some searches are simply big: months of data, heavy aggregations, many clusters. An asynchronous search starts the work, returns a handle immediately, and lets you fetch progress and partial results while the rest continues. With cross-cluster search this shows results from fast clusters early while slower ones are still working. Kibana uses this idea to show charts that fill in progressively. It is like ordering at a restaurant and receiving each dish as the kitchen finishes it, instead of waiting for the entire meal.

Skipping shards that cannot match

Before doing real work, Elasticsearch can ask each shard a cheap question: “Could you possibly have documents in this time range?” Shards that say no are skipped entirely. This is especially valuable across clusters holding long histories, because a request for the last hour then touches only a few recent shards on each cluster. Well-designed time-based indices make this pre-check extremely effective.

Aliases and filtered aliases on the remote side

The administrator of a remote cluster can publish an index alias, a friendly name that points to one or many indices, possibly with a built-in filter. Searchers on the local side then use the stable alias and never need to know the real index names. If the remote administrator later reorganizes indices, the alias stays the same. A filtered alias is also a simple way to expose only a slice of the data, for example only the documents of one customer. Think of it as a labeled window that shows only part of the warehouse.

Data streams

Time-based logs and metrics are often stored in data streams, which manage rolling indices automatically. Cross-cluster search can read remote data streams by name just as it reads plain indices, so a central view of a whole fleet of data streams needs no special handling.

Connections are not transitive

If cluster A can search B, and B can search C, it does not follow that A can search C. Each local cluster needs its own direct connection to every cluster it wants to search. This keeps the trust picture simple and safe, since access never flows secretly through a middleman.

Beyond ordinary searches

Other Elastic features can also use remote clusters. Kibana uses them through data views. The machine learning anomaly detection feature can read data for its jobs from remote clusters, so a central team can monitor many regions with jobs running in one place. Newer query languages and some analytic tools have been extended to accept remote targets. The set of supported features grows with each version, so check the documentation for yours before you design around a particular capability.

Preflight checks

Recent versions include interfaces that tell you, before you run a real search, which indices a pattern would match on each cluster and whether each remote is connected and compatible. Using them in scripts and health checks catches problems early. It is like calling ahead to confirm a restaurant is open before driving across town.

Speed

Minimize round trips

Choose per request whether remotes finish their own work or the local coordinator supervises everything.

Big jobs

Asynchronous search

Get progress and partial results early while slow clusters continue working.

Efficiency

Shard pre-check

Skip shards whose time range cannot match, before doing any real work.

Stability

Remote aliases

Give searchers a stable name that survives index reorganization.

Scope

Filtered aliases

Expose only a slice of the data through a built-in filter.

Safety

Preflight checks

Confirm connectivity and matching indices before a real search runs.

PPerformance, Scalability and Reliability

What happens when you go from three clusters to thirty, or from thousands of searches per hour to millions? This chapter explains the levers and the safety nets.

What actually costs time

Four things dominate the cost of a cross-cluster search. The first is network latency between the local cluster and each remote. The second is the amount of work each cluster does: how many shards it searches, how heavy the aggregations are. The third is the size of the results that must cross the network, because millions of returned hits cost more than a few hundred. The fourth is the slowest participant, since the local cluster waits for everyone. Understanding these four tells you where to look when something is slow.

Ways to make searches faster

1

Filter by time

The single biggest win. A short time range lets most shards be skipped without work.

2

Narrow the index pattern

Ask for “eu_west:logs-payments-*” instead of “*:*”. Every cluster and index you exclude is work you never do.

3

Return less

Request small result sizes and only the fields you need. For dashboards, ask for aggregations instead of raw documents.

4

Keep the default round trip strategy for distant clusters

Fewer conversations across slow links means faster answers.

5

Pre-aggregate where it makes sense

If everyone asks the same heavy question, compute a summary index in each region so global searches touch far fewer documents.

6

Use caching

Each cluster caches results of repeated shard-level requests, so a popular dashboard becomes cheaper after its first load.

Ways to scale

The local cluster does the merging, so its coordinating nodes need enough memory to hold partial results from every cluster while combining them. For heavy use, run dedicated coordinating nodes for user searches, separate from data nodes, and add more of them as the number of concurrent searches grows. If users are spread across the world, deploy a hub in each region, each connected to the same set of data clusters, so that people search a nearby hub and only the fan-out crosses the ocean. If one remote cluster is the bottleneck, look at its own health: more data nodes, better shard sizing and a tuned time-based index layout help far more than changing anything on the local side.

Scale picture: a ride-hailing company

Imagine a company like Uber with clusters in many regions, each ingesting millions of events per minute. A global operations dashboard does not fetch millions of raw events. It asks each region for one-minute counts and averages, uses tight time filters and a narrow set of indices, and merges a few hundred numbers at the hub. The volume that crosses oceans is tiny, yet the picture is global and fresh.

Capacity planning in plain steps

Planning capacity for a hub does not need a spreadsheet full of formulas. Follow four simple steps. First, estimate how many searches per second will arrive at the hub at the busiest time, and how many clusters an average search will touch. Multiply them: that is the number of remote requests the hub must handle each second. Second, estimate the typical result size per remote request, in documents or in aggregation buckets, because that decides how much memory the merging needs. Third, size the coordinating nodes so that they can hold several such merges at once with room to spare. Fourth, check the network: the total bytes per second returning from every remote must fit comfortably in the hub’s bandwidth, with headroom for bursts. Repeat the exercise whenever a new dashboard, a new cluster or a new team of users is added.

Think of packing a delivery van for many stops. You count the parcels, estimate their size, leave room for surprises, and only then decide how many vans you need. Sending one van too few is far more painful than sending one too many.

Reliability: what if a remote cluster fails?

Because cross-cluster search stores no data of its own, there is nothing at the local side to lose. The risk is different: if a remote cluster is unreachable, its data is missing from your answers until it returns. What happens then is governed by the skip-unavailable setting, as shown below.

flowchart TD
    S["Search sent to a remote cluster"] --> Q{"Remote reachable and answering?"}
    Q -->|"Yes"| OK["Results merged into the response"]
    Q -->|"No"| K{"Skip unavailable is on for this remote?"}
    K -->|"Yes"| SK["Cluster skipped and noted in the cluster summary"]
    K -->|"No"| ER["Whole search fails with an error"]
    SK --> PR["Partial results returned"]
Figure 6. What happens when a remote cluster cannot answer.

To make links more resilient, give sniff mode several seed addresses so one failed seed does not block a connection. For proxy mode, use a load balancer that checks the health of the nodes behind it. Set a sensible connection timeout so a dead remote fails fast instead of making every search wait. And monitor connection status continuously, so a broken link is a page to a person and not a surprise on a dashboard.

!
Watch out: CCS is not a backup

Searching in place does not protect your data. If a remote cluster loses its disks, cross-cluster search has nothing to fall back on. If you need a second copy of data for disaster recovery or for serving searches locally in another region, use a replication or snapshot feature. The next chapter compares the options.

AAdvantages, Disadvantages and Trade-offs

No tool is perfect. Knowing where cross-cluster search shines and where it struggles helps you choose it, or something else, wisely.

Advantages

  • No data is copied, so there is no extra storage and no replication pipeline to run.
  • Results are as fresh as the source clusters, with no copy delay.
  • Data stays in the region or system that owns it, which helps with legal and ownership rules.
  • One request, one dashboard and one data view can span many clusters.
  • Clusters remain independent: separate upgrades, separate owners, separate failure zones.
  • Simple to add or remove a remote cluster by changing a setting.
  • Works with Kibana and other features without special handling.

Disadvantages

  • Search speed depends on network distance and on the slowest cluster.
  • If a remote cluster is down, its data is missing from the results.
  • Relevance scores from different clusters are not perfectly comparable.
  • Field names and types must be consistent across clusters, or conflicts appear.
  • Connections are not transitive, so each local cluster needs its own links.
  • Some features and search types are limited or vary by version.
  • Security must be configured on both sides, which adds operational work.

Trade-off one: freshness versus speed

Searching in place gives fresh answers but pays the network price every time. Copying data to a nearby cluster gives fast answers but adds delay and cost. If a user needs the second-by-second truth from a far region, CCS is the honest tool. If a user needs a very fast, local, always-available copy, replication is better.

Trade-off two: availability versus independence

Because CCS depends on each remote being reachable at search time, the availability of a combined answer is lower than the availability of any single cluster. If three clusters each answer 99.9 percent of the time, a search that needs all three succeeds a little less often. Skipping unreachable clusters improves availability at the price of completeness.

Trade-off three: freedom versus consistency

Independent clusters let each team choose its own settings, schemas and upgrade schedule. But a combined view only works well when everyone agrees on the basics. The price of independence is a small amount of shared discipline about names, types and time fields.

How it compares with neighboring tools

ToolWhat it doesBest for
Cross-cluster searchQueries remote clusters in place and merges answersLive, federated views across regions, teams and environments
Cross-cluster replicationContinuously copies indices from a leader cluster to follower clustersDisaster recovery, local read copies close to users, central archives
Snapshot and restoreSaves index copies to storage and restores them elsewhereBackups, migrations, one-off copies
Reindex from remoteCopies documents from a remote cluster into a local index onceOne-time moves and migrations
One large clusterKeeps everything in one placeSmall to medium setups in one location with one owner

These tools are teammates, not rivals. Many organizations combine them: replication for the small set of data that must survive a regional disaster, and cross-cluster search for the rest.

SSecurity: Who Can See What Across Clusters

Cross-cluster search opens doors between systems that used to be separate. This chapter shows where the locks are and how to fit them.

Three layers of protection

Security for cross-cluster search has three layers. The first is the network: only the machines that need to talk to each other should be allowed to. The second is encryption and identity between clusters: the two clusters must prove who they are and keep the traffic private. The third is permissions for people: even when clusters trust each other, a person should see only the indices their role allows. A break in any layer weakens the others.

Certificate-based trust

In the older style, clusters use the same internal channel that their own nodes use, and they are configured to trust each other’s certificate authorities. The remote cluster decides what the searching person may read by looking at the person’s role names. This means that a role with the same name must exist on both sides, with suitable privileges on the remote indices. It works, but the trust is broad: a cluster that is trusted at this level is trusted quite deeply, and role names have to be kept in step across clusters.

API key-based trust

The newer style is designed to be narrower and easier to reason about. On the remote cluster, an administrator opens a dedicated interface for cross-cluster traffic and creates a cross-cluster API key. The key says, in plain terms, “the holder may search these indices” and, if replication is used, “may follow these indices.” The key is then stored in the local cluster’s protected settings store, never in a normal settings file, and is presented on every request. The remote cluster can revoke or expire the key at any time.

On the local side, the person’s role must also allow searching the remote indices, using a special kind of privilege that names both the remote clusters and the index patterns. The effective access is the overlap of the two: what the key allows on the remote and what the user’s role allows locally. Neither side can grant more than the other permits. It is like a building where a visitor badge opens only certain floors, and the visitor’s own employer has also approved only certain floors. The visitor can enter only the floors on both lists.

QuestionCertificate-basedAPI key-based
Channel usedThe normal internal transport channelA dedicated remote cluster interface
How trust is expressedTrusting certificate authoritiesA key issued by the remote cluster
How access is limitedMatching role names on both clustersThe key’s allowed indices, plus the local role’s remote privileges
Revoking accessChange trust or rolesInvalidate the key on the remote cluster
Breadth of trustBroadNarrow and explicit

Keeping secrets secret

The API key is a secret. It must live in the cluster’s protected secure settings, which are kept outside ordinary configuration files and can be reloaded without a restart. Rotate keys on a schedule, give them an expiry date where possible, and remove keys that are no longer used. A leaked key that is never rotated is like a spare house key hidden under a doormat forever.

Least privilege

Give every key and every role the narrowest access that lets the work be done. If the central hub only needs to search the logs of a service, the key should name only those log indices, not everything. If analysts need to read only one region, their role should say that region. Narrow access reduces the harm from mistakes and from stolen credentials.

Data crossing borders

A subtle but important point: although CCS does not store remote data locally, search results still travel over the network and appear on the screen of the person who asked. If a person in one country searches a cluster in another and views the results, personal data may effectively cross a border. For regulated data, this can matter as much as copying would. Check with your legal and privacy teams whether viewing remote results is allowed, and restrict remote access accordingly. Filtered aliases, field-level restrictions and narrow keys are useful tools here.

Example: a hospital network

Imagine a group of hospitals, each with its own cluster of patient-event logs that must never leave the building. The central quality team is allowed to see only anonymized counts. Each hospital publishes a filtered alias exposing only anonymized fields, creates a narrow key limited to that alias, and the central team searches through it. The raw records never appear in the central team’s view, even though a single dashboard covers every hospital.

Audit trails

Turn on auditing on both sides. The local cluster records who asked, and the remote cluster records which key or user reached it and what it read. When something goes wrong, or when an auditor asks who saw what, these two logs together tell the whole story.

!
Tip

Use encryption between every pair of clusters, even inside your own private network. Private networks are private until they are not, and the cost of encryption is small compared with the cost of a leak.

MMonitoring, Logging and Metrics

A link between clusters can quietly break. Good monitoring tells you before your users do.

Connection status

The most basic check is whether each remote cluster is connected. The remote cluster information interface, and the Remote Clusters screen in Kibana, list every configured alias with its connection mode, whether it is currently connected, how many nodes are linked, and the settings in force, such as the skip-unavailable choice. A remote that shows as disconnected, or that has fewer connected nodes than usual, deserves attention. Put this check on a schedule and alert on it. It is a smoke detector for the link.

The response as a metric

Every cross-cluster response contains the cluster summary discussed earlier. If you log it, you gain a running history of which clusters answered, which were skipped and how long each took. A gradual increase in one cluster’s response time is an early warning of trouble at that cluster or on the path to it. A sudden rise in skipped clusters is a loud warning of an outage.

Slow logs and tasks

Each remote cluster can record slow searches in its own slow logs, once you set thresholds. When a cross-cluster search is slow, the remote’s slow log shows what it was asked to do and how long it took, which quickly separates “the network is slow” from “the query is heavy.” A task listing interface shows searches currently running, including the parts that are waiting on remote clusters, so you can spot a stuck request.

Health of the local coordinators

Because the local nodes do the merging, keep an eye on their memory, on the queue of waiting searches and on the count of rejected searches. Rising rejections mean that the coordinators are overloaded, and adding coordinating nodes or reducing result sizes is the cure.

What to watchWhy it mattersHealthy sign
Remote connection stateA disconnected remote means missing data or failed searchesConnected, with the expected number of nodes
Skipped or partial cluster countShows results that are incompleteZero, apart from planned maintenance
Per-cluster response timeFinds the slowest participantStable, with no upward drift
Coordinator memory and search queueMerging needs memory and threadsHeadroom and an empty queue
Search rejectionsSignals overloadNone
Authentication failures across clustersMay mean an expired key or a bad changeNone
Key expiry datesAn expired key ends access suddenlyRotated ahead of time

A link health dashboard

A small dedicated dashboard for link health pays for itself the first time something goes wrong. Put on it, for each remote cluster, the connection state, the number of connected nodes, the recent average response time, the count of skipped or partial responses, and the days left before the current key expires. Add a simple test search that runs every minute against each remote and records how long it took. If any tile goes red, the on-call person sees at a glance which link is the problem, instead of hunting through logs. Think of the dashboard in a car: you do not want to open the bonnet every time, you want a light that tells you which system needs attention.

Logs

The cluster logs record when connections are opened, when they break and when they are retried. When a link misbehaves, these messages usually name the address that could not be reached or the certificate that was refused. Ship them into Elasticsearch, and then a dashboard can show the health of your links beside the health of the systems they serve.

i
Good to know

A monitoring cluster that collects health data from many production clusters is itself a classic use of cross-cluster search: dashboards on the monitoring cluster can read the data of all the others through remote links, while production clusters send only their monitoring data outward.

EEcosystem and Architecture Patterns

Cross-cluster search is a building block. Here is how organizations assemble it into larger designs and how other Elastic features build on it.

The hub-and-spoke design

The most common design is a central hub cluster that users connect to, and several spoke clusters that hold data. The hub has Kibana, the user accounts and the shared dashboards. The spokes ingest and store data close to where it is produced. Every user request enters the hub, which fans it out to the right spokes.

flowchart TD
    ANALYST["Analysts and dashboards"] --> H
    subgraph HUB["Search hub cluster"]
        H["Kibana and coordinating nodes"]
    end
    H --> E["eu_west spoke - European data"]
    H --> U["us_east spoke - North American data"]
    H --> A["ap_south spoke - Asian data"]
    H --> M["monitoring spoke - health data"]
Figure 7. Hub-and-spoke: users see one place, data stays in many.

The advantages are clear. Users need to learn only one address. Access rules can be managed centrally. Spokes can be added, removed or upgraded independently. And each spoke can be small, simple and close to its data. The hub must be designed carefully, since it is the front door for everyone, so give it dedicated coordinating nodes and plenty of memory.

Everyday analogy

An airline uses hub-and-spoke routing: passengers from small cities fly to a central airport and connect onward. Nobody builds a direct flight between every pair of small cities, which would be a tangle. In the same way, users connect to one hub instead of to every cluster individually.

Regional hubs

For a worldwide organization, a single hub can be far from many users. Regional hubs solve this: each region has its own hub, all connected to the same spokes. People in Asia search the Asian hub, which is close to them, and only the fan-out crosses long distances. This adds some configuration but greatly improves the feel of the tools.

Hybrid and migration scenarios

Cross-cluster search is a friend during moves. A company migrating from its own data center to the cloud can run old and new clusters side by side and search both from one view while data is gradually moved. During a major upgrade, a new cluster can be built and joined by remote link, so users search old and new data together until the switch is complete.

Other features that use remote clusters

Kibana

Data views

Discover, Lens and dashboards work with remote indices through a data view pattern.

Machine learning

Anomaly detection

Jobs can read data from remote clusters, so a central team can watch many regions.

Security

Multi-site hunting

Analysts investigate suspicious activity across every site from one console.

Observability

Global service view

Logs, metrics and traces from many regions appear in one place.

Alerting

Cross-site rules

Many rule types can use remote index patterns, though support depends on the rule type and version.

Monitoring

Central health view

One monitoring cluster gathers the health of all production clusters.

!
Tip

Before you rely on a feature across clusters, test it once with a small remote index. Support for remote targets can differ between features and versions, and a five-minute test is far cheaper than an outage discovered by a customer.

DDesign Patterns and Anti-Patterns

Patterns are recipes that experienced teams keep repeating because they work. Anti-patterns are the traps those same teams learned to avoid.

Patterns worth copying

Pattern

Hub and spoke

One front door for users, many independent data clusters behind it.

Pattern

Data stays home

Keep each dataset in the region or system that owns it, and search it in place.

Pattern

Common schema

Agree on field names and types across all clusters before you connect them.

Pattern

Stable aliases

Let remote teams publish alias names so searchers never depend on internal index names.

Pattern

Summaries, not raw data

Pre-aggregate heavy questions in each region and search the small summaries globally.

Pattern

Replicate only what must survive

Copy a small critical set for disaster recovery, and search the rest in place.

Traps to avoid

ANTI-PATTERN 01Avoid
What it looks like

Every dashboard and every saved search uses a pattern that means “all indices on all clusters.”

Why it hurts

Every request fans out to every cluster, including those that cannot possibly hold relevant data. The slowest cluster sets the pace, and any single outage affects every screen.

Do this instead

Use targeted patterns per use case, and create separate data views for separate questions.

ANTI-PATTERN 02Avoid
What it looks like

Treating cross-cluster search as a backup or disaster recovery plan.

Why it hurts

Searching in place stores nothing extra. If the remote cluster is lost, the data is lost and the search finds nothing.

Do this instead

Use replication or snapshots for anything that must survive a failure, and keep search in place for everything else.

ANTI-PATTERN 03Avoid
What it looks like

A wall-monitor dashboard refreshing every few seconds, running heavy aggregations over months of data on clusters across the ocean.

Why it hurts

The same expensive work repeats constantly, consumes network and processor time on every cluster, and can slow the systems that customers depend on.

Do this instead

Use short time windows, sensible refresh rates, summary indices and caching.

ANTI-PATTERN 04Avoid
What it looks like

Connecting clusters whose field names and types disagree, then trying to build a single chart.

Why it hurts

Type conflicts break sorting and charts, and differently named fields split filters into halves that never match all the data.

Do this instead

Agree on a common schema first, and fix mismatches with mapping changes or aliases at the source.

ANTI-PATTERN 05Avoid
What it looks like

Leaving the skip-unavailable choice at whatever the default happens to be, and never watching connection status.

Why it hurts

Some searches silently return incomplete answers, and others fail loudly when a single distant cluster blinks, and nobody planned either behavior.

Do this instead

Set the option deliberately for each remote, show cluster status in dashboards, and alert when a link is down.

BBest Practices and Common Mistakes

A short, practical checklist drawn from the way careful teams roll this feature out, followed by the mistakes that trip up nearly everyone once.

1

Start with a clear question

“Let support engineers find one customer’s errors in any region within seconds” is a good goal. “Connect everything to everything” is not. A clear question decides which clusters, which indices and which permissions you need.

2

Agree on a schema early

Decide on names and types for the shared fields, especially the timestamp, before the first dashboard is built. Fixing this later means rewriting saved objects.

3

Keep versions close

Consult the compatibility table, keep clusters on similar versions, and plan upgrades so that no cluster falls outside the supported range of its neighbors.

4

Choose the narrowest trust

Prefer key-based trust where your version and license allow it, scope each key to specific indices, and give people only the roles they need.

5

Decide skip behavior deliberately

For each remote, choose whether an outage should fail searches or produce partial results, and make dashboards show which happened.

6

Test with small searches first

Confirm connectivity, then a tiny search, then a realistic one. Watch response times per cluster before opening the tool to everyone.

7

Monitor the links themselves

Alert on disconnected remotes, skipped clusters, rising latency and expiring keys. A silent link is a hidden risk.

Common mistakes and their cures

MistakeWhat you seeThe cure
Remote nodes announce private addressesThe connection succeeds, then no nodes stay connectedFix the published addresses, or switch to proxy mode with a reachable entry point
Idle connections closed by a firewallSearches fail after quiet periods and work again laterShorten the keep-alive schedule below the firewall timeout
No time filterSlow searches that touch every shard everywhereAlways include a time range, and default dashboards to short windows
Wildcard over every clusterSlow, heavy searches and wide blast radiusUse targeted patterns and separate data views
Inconsistent field typesConflicts in data views and broken chartsStandardize the schema and repair the mappings at the source
Missing permissions on one sideIndices that seem to be missing, or access denied errorsCheck the key or role names and privileges on both clusters
Trusting a total without checking clustersA quiet outage produces a silently low numberShow the cluster summary and warn when any cluster is skipped
Expired keysAccess stops suddenly at a predictable dateTrack expiry dates and rotate before they arrive
Treating CCS as backupData loss surprises during an incidentAdd replication or snapshots for critical data
!
Tip

Keep a one-page diagram of your clusters, aliases, versions, connection modes and key expiry dates. When something breaks at night, the person on call will be very grateful for a single page that answers, “Who talks to whom, and how?”

RReal-World and Industry Examples

Here is how the same idea adapts to very different industries. Named companies below are used as familiar illustrations of the kind of scale and problem involved, not as claims about their internal systems.

Global support: one customer, many regions

A company with a scale like Airbnb serves guests and hosts all over the world, and their logs naturally live in regional clusters. When a traveler reports a failed booking after crossing continents, a support engineer searches by the booking identifier across all regional clusters from one screen. The answer appears in seconds and shows exactly which region handled which step.

Security operations: hunting across sites

A global manufacturer such as Siemens runs plants in many countries. Each plant’s security events stay in a local cluster for legal and operational reasons. When a threat researcher learns that a certain file name is being used by attackers, she searches for it across every plant from the security hub. Any hit shows immediately which plant and which machine, and the investigation begins within minutes instead of days.

Central monitoring: watching the watchers

An organization with dozens of production clusters sends the health data of each one to a dedicated monitoring cluster. Engineers open one set of dashboards to see memory, search speed and errors across the whole estate. The monitoring cluster is separate, so an incident that damages a production cluster does not also take away the tools used to diagnose it.

Managed service provider: many customers, one team

A company that operates Elasticsearch on behalf of many customers keeps each customer in its own cluster, both for privacy and for clean billing. Its operations team uses a hub with narrow, read-only keys to spot problems, such as unusual error rates, across all customers without ever seeing customer content beyond what the keys allow.

Archives: live data and cheap history together

A media company keeps recent viewing events in a fast cluster and older years in a cheaper archive cluster tuned for storage cost. Analysts searching “the last three years” use one data view that spans both. Recent data comes back quickly, older data comes back more slowly but cheaply, and nobody needs to know which cluster held which year.

Migration: moving without a blackout

A retailer moves from an old data center to a new cluster in the cloud. Over a few weeks, data is moved gradually while both clusters stay connected. Dashboards use a pattern covering both, so users see one continuous history throughout, and the old cluster is switched off only when nothing is left behind.

A complete walk-through: the support desk

To make everything concrete, here is how a team might build the support-desk scenario from the start of this article, from a blank page to a working tool.

1

Ask the question

“Support engineers must find any customer’s events in any region within ten seconds.”

2

Design the layout

One small hub cluster with Kibana, and three data clusters named eu_west, us_east and ap_south as remotes.

3

Agree on the schema

All three regions use the same field names for customer identifier, request identifier and timestamp.

4

Set up trust and links

Each region creates a narrow key that allows searching only its request-log indices. The hub stores the three keys and adds the remotes in proxy mode through each region’s load balancer.

5

Create the data view

A pattern covering the request logs on all three remotes, with a default time window of fifteen minutes.

6

Add safety

A dashboard banner that shows when any region is skipped, and an alert when any link goes down.

7

Train the team

Show engineers how to search by customer identifier, read the cluster summary and widen the time window only when necessary.

After the launch, the twenty-minute, three-dashboard hunt from the beginning of this article becomes one search, and the customer is off hold in seconds.

FFrequently Asked Questions

Short answers to the questions that beginners ask most often.

Q1Does cross-cluster search copy my data to the local cluster?
No. Documents are read where they live and travel only as part of a search result. They are merged in memory and returned to the caller. Nothing is stored on the local cluster because of a search.
Q2What is the difference between cross-cluster search and cross-cluster replication?
Search asks remote clusters questions in place and always reflects their live data. Replication continuously copies chosen indices to another cluster so that it holds its own local copy. Use search for federated views, and replication for disaster recovery or local read copies.
Q3How do I tell Elasticsearch which cluster to search?
Put the cluster’s alias, a colon, and the index name in the search target, such as “eu_west:logs-*”. Names without a prefix are searched locally, and a star in the alias position selects several remote clusters.
Q4Can two clusters have indices with the same name?
Yes. Results from a remote cluster carry the alias prefix in their index name, so hits from the two clusters can always be told apart.
Q5What happens if one remote cluster is down?
It depends on the skip-unavailable setting for that remote. If skipping is on, the search continues without it and the response records the cluster as skipped. If it is off, the whole search fails. Check the default for your version and set it deliberately.
Q6Why is my cross-cluster search slower than a local one?
It must cross the network to other clusters and wait for the slowest of them. Time filters, narrower index patterns, smaller results and the default minimize-round-trips behavior usually bring the speed back.
Q7What does “minimize round trips” mean in simple words?
It means each remote cluster completes the whole search on its own and sends back a finished answer, using fewer conversations across the network. Turning it off makes the local cluster supervise each phase itself, which is chattier but sometimes necessary.
Q8Do the clusters need to run the same version?
Not exactly, but they must be within the supported compatibility range published by Elastic. Keeping clusters on similar versions is the safest approach.
Q9Which connection mode should I choose?
Choose sniff mode when the remote nodes are directly reachable at the addresses they announce. Choose proxy mode when only a load balancer or a single gateway address is reachable, as is common with containers, cloud networks and strict firewalls.
Q10Can Kibana use cross-cluster search?
Yes. Create a data view whose pattern includes the remote alias, and Discover, Lens and dashboards will work with the remote data like any other.
Q11Is cross-cluster search secure?
It can be, when configured properly. Use encrypted connections, prefer narrowly scoped keys where available, give people least-privilege roles, and audit both sides. Remember that viewing remote results can still raise data-location questions for regulated data.
Q12Do relevance scores compare fairly across clusters?
Not perfectly, because each cluster computes statistics from its own data. For time-sorted logs this rarely matters. For text ranking, consider a search type that gathers global statistics, which needs the more talkative mode.
Q13If A can search B and B can search C, can A search C?
No. Connections are not transitive. Cluster A needs its own direct link, trust and permissions for every cluster it wants to search.

SSummary and Key Takeaways

The whole article in one place. If you remember only this box, you still know the essentials.

Key Takeaways

  • What it is: Cross-cluster search lets one Elasticsearch cluster, the local one, run a single search across indices on other clusters, the remote ones, and return one merged answer without copying any data.
  • Why it exists: Organizations split data across clusters for distance, law, size, ownership and safety reasons, and CCS gives them a combined view again without paying for copies or pipelines.
  • How it works: The local coordinating node uses aliases such as “eu_west:logs-*” to find targets, sends work to gateway nodes in remote clusters in parallel, and merges hits and aggregations, usually letting each remote finish its own work to save network trips.
  • How to connect: Plan aliases, open the network path, establish trust with certificates or narrowly scoped API keys, choose sniff or proxy mode, and verify the link before searching.
  • Read the answer honestly: Always check the cluster summary, set skip-unavailable deliberately for every remote, and show dashboards that warn when a cluster is missing.
  • Run it well: Filter by time, narrow your patterns, return less, agree on a common schema, monitor links and keys, and use a hub-and-spoke design with dedicated coordinating nodes.
  • Know its limits: CCS is not a backup and depends on every remote being reachable, so pair it with replication or snapshots for critical data and treat cross-border viewing of regulated data with care.