8 ms·
Now you're making it complicated again. I think a good rule of thumb is: * If you need it from a single process and it doesn't need to survive process restart
by mcv 2y ago
Now you're making it complicated again.
I think a good rule of thumb is:
* If you need it from a single process and it doesn't need to survive process restarts, just use basic in-process data structures.
* If you need it from multiple processes or it needs to survive process restarts, but not system restarts, use redis.
* If it needs persistence across system restarts, use a real DB.
- throwaway81523 2y agoRedis is nice but you take a huge speed hit depending on what you're doing, compared to using in-memory structures. Note that Redis can also persist to disk, either by forking or by writing an append-only op log that can be replayed for reloading or replication. Anyway, you'veve forgotten the case where you want not only the data structures, but also the open network connections to persist across process restarts. That's what passing file descriptors through unix domain sockets lets you do. It gets you the equivalent of Erlang's hot upgrades.