4 ms·
When I've used Redis, I've turned disk persistence off. This is for cases where (a) consistent performance is more important than being able to recover data (li
by majormajor 12y ago
When I've used Redis, I've turned disk persistence off. This is for cases where (a) consistent performance is more important than being able to recover data (like when the data expires or otherwise is used quickly, and not needed for long), and for online operations failing to a replicated slave is a more robust solution than trying to relaunch a single node and have it read data back from disk (which doesn't help you if the machine itself dies). Or, (b), the long-term persistence is handled in a separate layer that's written to separately and the Redis instances are just used for fast on-line usage (again with slaves set up to avoid losing the data from memory entirely).
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.
- toomuchtodo 12y ago> You can do SQL in pure memory too In MySQL, this is the MEMORY engine: http://stackoverflow.com/questions/10692398/how-do-i-make-a-mysql-database-run-completely-in-memory 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-engine-up-to-speed-against-memory-engine http://dba.stackexchange.com/questions/11099/is-innodb-engin...