Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Redis data volatile?

Tags:

redis

I am trying to figure out something and I've been searching for a while with no results.

What happens if a Redis server loses power or gets shut down or something that would wipe the RAM? Does it keep a backup somewhere?

I am wanting to use Redis for a SaaS style app so if I go to app.com/usernamesapp it would use redis to verify usernamesapp exists and get the ID... At which point it would use MySQL for all the rest of the stuff... Reasons being I want to begin showing the page ASAP and most of the stuff is javascript so all the MySQL would happen after the fact.

Thanks

like image 507
Steven Avatar asked Sep 26 '12 19:09

Steven


2 Answers

Redis can be configured to write to disk at regular intervals so if the server fails you wont lose your data. http://redis.io/topics/persistence

like image 192
ArthurGuy Avatar answered Jan 03 '23 13:01

ArthurGuy


From the Redis FAQ

Redis is an in-memory but persistent on disk database

So a critical failure should not result in data loss. Read more at http://redis.io/topics/faq

like image 36
akronymn Avatar answered Jan 03 '23 15:01

akronymn