All Questions

Coding

Someone using Redis as main DB?

Is it possible? Benefits?

author WBE User

Reply
20 Answers

Don’t. It is possible, though.

What you can do: load your main db (mysql, postgre, whatever) or parts into RAM/Redis on each boot if you need that performance for reading. You need an updater/sync as well (on each write: push the changes to Redis).

Reason: Redis is in-memory only and to my knowledge only the enterprise version supports a sync to persist changes to the disk.

writen by Benedikt

You’re probably looking for sth. like SAP Hana?

writen by Benedikt

Well, I was just curious, if it’s possible 😊 I was reading some article about it few weeks back. I’m not currently looking for something like this.

writen by WBE User

It’s a very interesting topic

writen by Benedikt

> Reason: Redis is in-memory only and to my knowledge only the enterprise version supports a sync to persist changes to the disk. My understanding is redis open source can persist to disk.

writen by Iain Cambridge

But the real question is why would you want to use Redis as your main datastore?

writen by Iain Cambridge

One word ‘Speed’

writen by WBE User

What do you want to do performantly writes or reads?

writen by Iain Cambridge

Are you currently experiencing performanances issues or are you just thinking ahead?

writen by Iain Cambridge

Well I don’t wanna do nothing yet I was just reading it’s pretty fast if you use it as main storage

writen by WBE User

So I was curious if anyone has experience

writen by WBE User

Wolfgang Gassler - any input from your side here? Someone is asking a database question 😎

writen by Luise Haack

I’ve used Redis as the primary database for a web crawler before and it was ok. Bottom line is you have to be ok with losing at least some data and your data model will be extremely inflexible. RDB + AOF persistence will (usually) make sure you don’t lose everything so long as you back up the files regularly.

writen by Skylar Givens

IMO KV stores are a good fit if your app is reasonably mature with an established data model and/or you need very, very fast reads and writes. MongoDB, Cassandra, ScyllaDB, DynamoDB, etc.

writen by Skylar Givens

For a startup or anything exploratory that is likely to change, just use a relational database. It will save you so much heartache. Postgres can emulate a KV store, it can operate on large datasets, it can do full-text search, it has TimescaleDB if you’re doing time series data, PostGIS for geospatial data, and the tooling is very mature.

writen by Skylar Givens

If you want to go lightweight and fast while still being flexible, SQLite is gaining a lot of traction right now thanks to http://Fly.io|Fly.io. https://litestream.io/|Litestream improves the durability story for SQLite considerably through offsite backups.

writen by Skylar Givens

I’m currently running Postgres and it’s okay for me

writen by WBE User

But thanks for insights

writen by WBE User

For sure. Let me know if you’re ever wanna chat about databases. I have a lot of experience with data up to multi-petabyte scale and up to 1m+ requests per second architectures.

writen by Skylar Givens

Thanks! I’ll hit you up, if I need anything in the future.

writen by WBE User

Do you want to ask a question?


Related Questions