How are write requests handled to an index in the RED state


My organization uses Elasticsearch to power one of our services and regularly receive write requests into our cluster. We use the routing parameter on all search and write requests, so they are directed to a single shard internally.

As part of our disaster recovery planning, I'm trying to understand what happens to incoming write requests if the cluster goes into the RED state. For example, if one shard (and all replicas) in the index becomes unallocated leading to a red state, but all other shards are still allocated, would all write requests to that index be blocked? Or would the cluster accept write requests routed to allocated shards?

This document mentions you cannot write or search for data when the index is in the RED state. However, in conducting previous experiments with a cluster in the RED state, this was not the case. In the past, we were able to successfully perform search requests to an index while it was in a RED state as long as the request was routed to a shard that was still allocated.

I appreciate any additional insight here.

Welcome to our community! :smiley:

The document says;

If the unassigned primary is on an existing index, then not only can the index not be written to, but all data previously indexed is unavailable for searching!

So writes to the index in the red may be rejected depending on which shard it hits, and reads for the shard will also be rejected, which is what that post is saying. Other indices will still accept writes.

Awesome thanks for the response!

Other indices will still accept writes

Just to clarify on that, I am trying to determine if the same red index could accept writes if the request is routed to an allocated shard in the index. From what you're saying, it sounds like it could potentially go through if sent to an allocated shard.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.