3 ms·
I'd argue in that case, the cache is more of a local read-only DB replica :) It's a subtle word change, but can communicate the slightly difference architectur
by dharmab 6y ago
I'd argue in that case, the cache is more of a local read-only DB replica :)
It's a subtle word change, but can communicate the slightly difference architecture and break the reader away from an assumption.
- jerf 6y agoYeah, I've had a similar thought to that before... as you scale up, the whole "cache" thing is just not a service you can have, because a cache must only speed up the thing being cached, it should ideally have no other visible impacts. As a site scales up and becomes dependent on a cache, it is really not a "cache" anymore, and both terminology and mindset should change as a result. If your site comes crashing down because the cache went down, it's not a cache anymore and you should use a different mindset in approaching it. The answer varies depending on a whole lot of relevant numbers that can vary widely, but an example of an answer I have in one of my systems is that I store all the cache queries more persistently than the cache answers. This particular system gets hammered with requests that are mostly the same as last time at certain times but spends a lot of time idle. The numbers work out that if I'm trying to compute the cache during one of my crunches, I need a huge amount of resources for just a couple of minutes, but if I restart the service between these crunches, there's plenty of time to recompute the entire cache before it is necessary with no additional resources. But that's just one particular example of not really being a "cache" anymore suitable in my very particular case.