6 ms·
My trick is saying no to redis full stop. Every project where it was used as a cache only it developed retention ans backup requirements and every project where
by ohgr 2y ago
My trick is saying no to redis full stop. Every project where it was used as a cache only it developed retention ans backup requirements and every project where it was a key value store someone built a relational database on top of it.
There’s nothing worse than when someone does the latter. I had to write a tool to remove deletes from the AOF log because someone fucked up ordering of operations big time trying to pretend they had proper transactions.
- ysavir 2y agoI love Redis, but my rule is that we should be able to flush the redis data at any time without any problems. Any code that makes that unfeasible is rejected.
- vrosas 2y agoI've never done it IRL but I've always wanted to delete my company's redis instances and see what happens, chaos monkey style. If you're service breaks because it expected the cache to be there or your database immediately goes down because of too many requests, you're going to have a bad time _eventually_.
- zombiwoof 2y agoYes, this design rule it’s very useful
- Delomomonl 2y agoI don't get it I'm using redis only for temp state data like a session (when I can't use a jwt). Or when I have to scale and need a warmed up cache Is that bad now? I'm also wondering right now why there is no local cache with p2p self discovery and sync. Should be easier than deploying an extra piece of software.
- jiggawatts 2y ago> I'm also wondering right now why there is no local cache with p2p self discovery and sync. Should be easier than deploying an extra piece of software. The whole design space for this type of API is weirdly under-explored, but there are some well-supported mainstream solutions out there. Fundamentally, Redis ought to be a NuGet library, a Rust crate, or something like it. It's just a distributed hash table, putting it onto its own servers is a bit bizarre if the only need is caching. Microsoft's Service Fabric platform and the Orleans library both implement distributed hash tables as fundamental building blocks. Both can trivially be used "just" as a cache to replace Redis, and both support a relatively rich set of features if you need more advanced capabilities. Of course, there's Scala's Akka and the Akka.NET port also.
- neonsunset 2y agoI think you could make Garnet work as a library. Or, at the very least, use FASTER/Tsavorite KV for that instead.
- jiggawatts 2y agoGarnet, like Redis, is explicitly designed to be remotely accessed over the network, which is frankly disappointing and derivative. Microsoft could do better than that! For example, Azure App Service could use an out-of-process shared cache feature so that web apps could have local low-latency caches that survive app restarts.
- neonsunset 2y ago> Garnet, like Redis, is explicitly designed to be remotely accessed over the network I know, but it is written in a sane language so my suggestion was that you can literally reference a project and make it into an embedded database. But then again, I would've tried Tsavorite/FASTER KV first.