4 ms·
I suspect this will be unpopular but I'm a Redis avoider these days. I have run it in production for a few years on large projects and while it does what it say
by baz00 3y ago
I suspect this will be unpopular but I'm a Redis avoider these days. I have run it in production for a few years on large projects and while it does what it says on the tin, I'd rather use another solution because having a proper schema and database engine turns out to be a really important thing on anything more than trivial. Numerous scary moments over the years which involve late nights unfucking things which would not have been issues on schema'd and carefully typed databases.
My position is that memcache is still a better cache (with a suitable static type system and serializer) and postgres is still a better database.
- showerst 3y agoSounds like you were just using Redis for something you shouldn't have been. I think Redis is great in the space of "I need a little bit more structure than memcache", but if you're rising to the level of unscrewing a data structure or needing nontrivial types, then Redis was not the tool for that job.
- deleted 3y ago[deleted]
- baz00 3y agoI think postgres handles all those scenarios absolutely fine too. Edit: worth noting when you under-engineer something for Redis, it's far more difficult to get it out again later than it is to add more schema to a relational DB.
- culi 3y agoTry redis-schema https://hackage.haskell.org/package/redis-schema https://hackage.haskell.org/package/redis-schema
- baz00 3y agoAbsolutely no way am I going down that route when there are databases with schemas available.
- esafak 3y agoWhich in-memory database did you use?
- baz00 3y agoPostgres + lots of RAM. In memory database is fine until you have to recover a 20 gig AOF.
- m_0x 3y agoWe use H2 in production for a non-critical small app. If it goes down we just launch it again and it fetches data from other internal webapps. I'd not recommend it for heavy-use in Production.
- kedean 3y agoThe main sell of redis is the flexibility, if you take that away then why use redis over something that treats schemas as a first class citizen?
- deleted 3y ago[deleted]
- hipadev23 3y agoYou’re not wrong but you’ve been using redis incorrectly and were unsurprisingly happier when you used a proper rdbms.
- baz00 3y agoActually we were using it correctly according to many common patterns we were using. It was however, just bad at it compared to even a relational DB.