I was talking more about the app servers would be up and running and their cache layer would just go offline and the app servers would get 100% of the traffic. The `flush all` would be to simulate the cache going away. Populating caches on app boot is a bad idea, it'll slow the boot times, and if the cache is down, now your apps can't boot either to at least run in a degraded state. Cache should never be in the critical path like that, it's a cache, and it going away is not unexpected. Just my 2 cents.
Some cool info about SO
From 2019
> Layers of Cache at Stack Overflow
> We have our own “L1”/”L2” caches here at Stack Overflow, but I’ll refrain from referring to them that way to avoid confusion with the CPU caches mentioned above. What we have is several types of cache. Let’s first quickly cover local and memory caches here for terminology before a deep dive into the common bits used by them:
> “Global Cache”: In-memory cache (global, per web server, and backed by Redis on miss)
> Usually things like a user’s top bar counts, shared across the network
> This hits local memory (shared keyspace), and then Redis (shared keyspace, using Redis database 0)
> “Site Cache”: In-memory cache (per site, per web server, and backed by Redis on miss)
> Usually things like question lists or user lists that are per-site
> This hits local memory (per-site keyspace, using prefixing), and then Redis (per-site keyspace, using Redis databases)
> “Local Cache”: In-memory cache (per site, per web server, backed by nothing)
> Usually things that are cheap to fetch, but huge to stream and the Redis hop isn’t worth it
> This hits local memory only (per-site keyspace, using prefixing)
and
> For the curious, some quick stats from last Tuesday (2019-07-30) This is across all instances on the primary boxes (because we split them up for organization, not performance…one instance could handle everything we do quite easily):
> Our Redis physical servers have 256GB of memory, but less than 96GB used.
- 1,586,553,473 commands processed per day (3,726,580,897 commands and 86,982 per second peak across all instances – due to replicas)
- Average of 2.01% CPU utilization (3.04% peak) for the entire server (- 124,415,398 active keys (422,818,481 including replicas)
- Those numbers are across 308,065,226 HTTP hits (64,717,337 of which were question pages)
https://nickcraver.com/blog/2019/08/06/stack-overflow-how-we...