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.
- The client fires the query
- The DMC proxy chooses the shard that will reply to the query using the round-robin mechanism
- 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
- Each shard replies to the coordinator in the originating shard, and the results are consolidated in a response
- The DMC proxy receives the response from the elected shard and forwards it to the client