And it's far more likely you are continuously upgrading your process than Redis.
Ideally every significant part should live in its own universe, only interacting with other parts via well-defined interfaces. Sadly, it's either more expensive (even as Unix processes, to say nothing of Windows), slower (Erlang / Elixir), or both (microservices).
Or do you compare using separate processes to having multiple threads in a single process?
As far as isolation goes, if you are worried about the properties of reading and writing data to the disk then I simply don't know what to tell you. Isolation from what?
Perfomance-wise, I do not know of a nice portable way of flushing changes to disk securely that does not block (like, e.g. fsync does).
If you own the whole system and can tune whole kernel and userspace to run single application, sure, why overengineer. Otherwise software faults (bugs, crash due to memory overcommit, oom killer etc.) take down single process, and that can be less disruptive than full stop/start.
Not for Redis.
> I do not know of a nice portable way of flushing changes to disk securely that does not block (like, e.g. fsync does).
If you use Redis, you're either not waiting for writes to be acknowledged or you're waiting on fsync. You always fsync no matter whether it's in process or not or you're risking losing data.
Which process blocks doesn't affect performance, it's getting the data there in the first place.
> Otherwise software faults (bugs, crash due to memory overcommit, oom killer etc.) take down single process, and that can be less disruptive than full stop/start.
Even worse: Redis crashes and now your application (which hasn't crashed) can't read or write data, perhaps in the middle of ongoing operations. You have a whole new class of failure modes.
It does... and it's a blocking operation (Bad). It's used when storing data to a file to allow restarts w/o losing the said data.
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.
Redis helps you get to the point (need cache on separate machines) where you might want to consider moving to postgres, or not because you don't feel it warrants the investment of programmer hours at that point.
How could that very clear statement be misunderstood as to be well I am building a bunch of stuff I might need to tomorrow, it is the exact opposite of that!
I guess it's my fault, nobody on HN seems to understand a single thing I say even though the words seem reasonably clear to me.
But yeah redis is not an answer for most single machine questions.