On which shard does the Redis Enterprise proxy execute searches and queries?

Last updated 22, Mar 2024

Question

On which shard does the Redis Enterprise proxy execute searches and queries?

Answer

In the first place, it is important to remember that the index is in memory and split across the shards of a clustered database. Every sub-index indexes local shard data. The mechanism to choose the first shard to execute the query is round-robin.

  1. The client fires the query
  2. The DMC proxy chooses the shard that will reply to the query using the round-robin mechanism
  3. The elected shard, through the coordinator (running in the shard itself), distributes the query between the other shards using a modified syntax: _FT.SEARCH or _FT.AGGREGATE
  4. Each shard replies to the coordinator in the originating shard, and the results are consolidated in a response
  5. The DMC proxy receives the response from the elected shard and forwards it to the client