You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current request routing supports AllNodes/AllMasters routing. What's missing is "one node per shard" routing. The use case is distributed transaction processing. e.g., I have a module command called M.QUERY, which performs per-shard query. I'd do Map/Reduce like distributed query:
Route the command M.QUERY to "one node per shard" (ie., either master or replica node of each shard).
Aggregate results from each shard and send the consolidated result back to the client.
Using the current AllNodes/AllMasters routing, the command is only executed on all master. Replicas are not utilized for query, which makes it not scale well. (BTW, it seems to me that AllNodes is same as AllMasters. Can someone confirm? I thought AllNodes is supposed to include all replicas?)
So, I'm proposing to add a "one node per shard" routing. Does the current code base have the infrastructure to support routing a ReadOnly command to a replica? How much work will be involved to implement the feature?
The text was updated successfully, but these errors were encountered:
joehu888
changed the title
[Feature Request] Add "one node per shard" routing rule to support distributed query processing
[Feature Request] Add "one node per shard" routing mode to support distributed query processing
Dec 4, 2022
With this flag set, AllNodes becomes "1 replica from each shard" (see code here ).
Once #732 is implemented, I believe this feature could be accomplished by creating the connection with read_from_replicas and the setting the custom routing to RoutingInfo::AllNodes.
Current request routing supports AllNodes/AllMasters routing. What's missing is "one node per shard" routing. The use case is distributed transaction processing. e.g., I have a module command called M.QUERY, which performs per-shard query. I'd do Map/Reduce like distributed query:
Using the current AllNodes/AllMasters routing, the command is only executed on all master. Replicas are not utilized for query, which makes it not scale well. (BTW, it seems to me that AllNodes is same as AllMasters. Can someone confirm? I thought AllNodes is supposed to include all replicas?)
So, I'm proposing to add a "one node per shard" routing. Does the current code base have the infrastructure to support routing a ReadOnly command to a replica? How much work will be involved to implement the feature?
The text was updated successfully, but these errors were encountered: