Menu

Redis Is Durable, You're Just Poor
📰

Redis Is Durable, You're Just Poor

DEV Community: redis·Zhalok Rahman·13 days ago
#Cixyxm3a
#devtoredis#devto#dev#memory#redis
Reading 0:00
15s threshold

What exactly is the difference between redis and any other typical databases and why exactly you can not use redis as your primary database?

Most of us think redis stores data into the memory and databases store data into the disk and thus redis is not durable and data will be wiped out if any crash takes place

But it turns out both the redis and typical databases primary store data into memory pages and writes logs into the disks which makes data recoverable in both

Then whats the difference exactly?

The difference lies not in how they store the data but how they evict the data from the memory

Since memory is a limited resource, therefore you can not fit all your data into the memory and thus you need to evict existing memory pages and remove some of the data from the memory when new data comes in and your memory is full

In redis the evicted page data is completely lost but in typical databases the evicted page is writen into the disk which makes its data persisted permanently

And this is exactly the…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.