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
Sharding an existing redis database is a big pain. There isn't a way to do it without data loss. For example, exporting to json using any of the tools loses the TTL. There is also no good way to maintain set v/s list semantics. Writing a script to iterate over all keys is doable, but not appealing.
Using the rdbparser, we can split the dump file directly into several shards. This method will retain the data type, ttl, as well as the internal representation. It will likely be faster than existing methods, and should also be safer.
For flexibility, we should allow sharding by database, by key, by datatype, or any combination thereof.
Proposed API -
redis-shard dump.rdb config.json
dump.rdb is the input dump file
config.json is a configuration file that declares how the shard the data
Any keys not matching the configuration file will be moved to default-shard.rdb
Sharding an existing redis database is a big pain. There isn't a way to do it without data loss. For example, exporting to json using any of the tools loses the TTL. There is also no good way to maintain set v/s list semantics. Writing a script to iterate over all keys is doable, but not appealing.
Using the rdbparser, we can split the dump file directly into several shards. This method will retain the data type, ttl, as well as the internal representation. It will likely be faster than existing methods, and should also be safer.
For flexibility, we should allow sharding by database, by key, by datatype, or any combination thereof.
Proposed API -
Sample config file :
The text was updated successfully, but these errors were encountered: