How to take advantage of Redis just adding it to your stack (2011)
oldblog.antirez.com
oldblog.antirez.com
Since it writes everything to disk, is it really faster than a SQL DB with adequate cache RAM?
You can do SQL in pure memory too, but for the use cases I've had for redis, there isn't need for a schema or firm transaction guarantees, etc, so the setup and operational simplicity of Redis wins out.
In MySQL, this is the MEMORY engine:
http://stackoverflow.com/questions/10692398/how-do-i-make-a-...
The InnoDB memory cache gets you pretty close as well:
http://dba.stackexchange.com/questions/11099/is-innodb-engin...
http://cramer.io/2014/05/12/scaling-sql-with-redis/
The examples are in Python.
If you're using Python and want to shard in the client, check out nydus - https://github.com/disqus/nydus
Primarily we use it as a cache backend, and also as a temporary storage for processing data (the expire feature plays very nicely).
in a recent project I was trying to store more information in Redis (such as view counts etc..) but faced the problem of querying the data later (as it relies mainly on keys/regexp).