Reducing server load with Redis(crashlytics.com)
crashlytics.com
Reducing server load with Redis
http://www.crashlytics.com/blog/reducing-mongodb-traffic-by-78-with-redis-caching/
4 comments
Quite wrong title not relevant to MongoDB. And it can be done much easier using redis-store and standart caches_action method.
https://github.com/jodosha/redis-store
http://stackoverflow.com/questions/1988658/rails-action-cach...
https://github.com/jodosha/redis-store
http://stackoverflow.com/questions/1988658/rails-action-cach...
Thanks Leonid! Have you used these in production?
IMHO this other use of Redis inside Crashlytics, doing heavy use of bitmaps, is more interesting:
http://www.slideshare.net/crashlytics/crashlytics-on-redis-a...
http://www.slideshare.net/crashlytics/crashlytics-on-redis-a...
Indeed... as presented before:
http://blog.getspool.com/2011/11/29/fast-easy-realtime-metri...
And the HN posts / comments:
https://news.ycombinator.com/item?id=3292542 http://news.ycombinator.com/item?id=3748239
And the Redis warning on setting large bitmaps (Re: split your bitmaps):
http://redis.io/commands/setbit
Note: I know I'm responding to someone who is probably already aware of this information, but the crashly slides are lite on the techniques technical side.
http://blog.getspool.com/2011/11/29/fast-easy-realtime-metri...
And the HN posts / comments:
https://news.ycombinator.com/item?id=3292542 http://news.ycombinator.com/item?id=3748239
And the Redis warning on setting large bitmaps (Re: split your bitmaps):
http://redis.io/commands/setbit
Note: I know I'm responding to someone who is probably already aware of this information, but the crashly slides are lite on the techniques technical side.
I totally agree, tracking using bitmaps is something where Redis really shines and it is relevant for nearly every site.
Leonid is bringing up some good points, but I was always wondering: How do you get to do auto-expiring page-caching.
While Leonid is right that Action Caching with Rails.cache is much easier to do, action caching still lets the request hit the stack, while it does not do so with this proposed solution. Page caching makes the expiration of the cache harder then this solution.
Question: It seems this solution has nearly the ease of action caching, but the performance gain like page caching. Is there a low-level gem/solution available to do something like this?
While Leonid is right that Action Caching with Rails.cache is much easier to do, action caching still lets the request hit the stack, while it does not do so with this proposed solution. Page caching makes the expiration of the cache harder then this solution.
Question: It seems this solution has nearly the ease of action caching, but the performance gain like page caching. Is there a low-level gem/solution available to do something like this?
I'm really not sure, so please don't shoot me if I'm wrong. I'd be happy to learn more/be proven wrong.
I think the redis-store cache in rails also uses a rack middleware, and supports setting ttl on keys which will auto-expire on redis...?
https://github.com/jodosha/redis-store/blob/master/redis-rac...
I think the redis-store cache in rails also uses a rack middleware, and supports setting ttl on keys which will auto-expire on redis...?
https://github.com/jodosha/redis-store/blob/master/redis-rac...
Also, using appropriate cache headers and putting a Varnish cache in front of the Rack server would be far easier and faster and would also reduce the load on the Rack server itself. Oh, but then I couldn't say I created a DSL...