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
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
> 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
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
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
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