4 ms·
I would use redis ordered sets and shard between servers in your application. 1. Get the server ID based on what the timestamp is. You would store a starting t
by bl4k 16y ago
I would use redis ordered sets and shard between servers in your application.
1. Get the server ID based on what the timestamp is. You would store a starting time and a server ID. You then lookup what server your data is on based on the start of your range.
2. Use sorted sets to store your data, using the timestamp as the score. These are really fast in redis: http://code.google.com/p/redis/wiki/ZaddCommand http://code.google.com/p/redis/wiki/ZaddCommand
Other option is to checkout Raik, which will do the distributed part for you (a distributed hash-table with no master eg.) but it doesn't have the data structures that redis has (it is just key=>valu)
- willvarfar 16y agodoes redis support more data than it has RAM?
- bl4k 16y agoYes - disk swapping was added in a recent release, see: http://antirez.com/post/redis-virtual-memory-story.html http://antirez.com/post/redis-virtual-memory-story.html