-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatible with Redis Cluster #100
Comments
Maybe some combination:
Out of curiosity, is twemproxy handling all of these cases when we shard manually (non-cluster)? |
I think the real fix to be able to support Redis Cluster is to organise the keys used by apisonator in data structures with namespacing containing associated data (ie. any non plain KV structure, such as hashes, sets, lists, etc), which would also help in being able to perform transactions in clusters (due to dealing with a single shard). The short term option I see is rewriting pipelines into normal 1-by-1 commands when using Redis Cluster, but that would severely hinder performance. Edit: another option is decomposing pipelines into per-shard operations and submit those operations as per-shard pipelines to be executed in parallel. Edit2: of course that would mean hooking up into the Redis client and knowing about how the sharding is done... |
We should probably give a try to the proxies that support Redis cluster: |
Apisonator is not compatible with the Redis cluster mode.
I did not try all the Apisonator functionality, I just tried to make a basic test work. The problems can be summarized in two:
Alerts.update_utilization
,Application.save
,EventStorage.pending_ping?
,Metric.save
, etc.mget
,blpop
,hmget
, etc. Examples:Application.load
,Service.get_service
, some methods inUsageLimit
, etc. Also, theblpop
used to fetch jobs from the queue.I don't see a straightforward solution for those problems.
Modifying all the keys to ensure that in every operation they belong to the same shard might be complicated. Migrating a running system might be very challenging.
The solution of replacing all the
mgets
with multiplegets
, remove the pipelines, etc. is not feasible. The performance hit would be very high.The text was updated successfully, but these errors were encountered: