News for hackers. Stuff that matters.
Re:Staying Out of TTL Hell by hyperpape on Wednesday March 10, 2021 @12:00PM (#26413397)
It's a pool, not a cache per se, but the Hikari database connection pool subtracts up to a random amount up to a few percent from each connection's lifetime to avoid a similar problem. If you have a 30 minute lifetime, you spread the expirations (and recreations) over half a minute or so.
Re:Staying Out of TTL Hell by jeffbee on Wednesday March 10, 2021 @03:14PM (#26415579)
Another probabilistic approach is to have an increasing probability of an artificial cache miss as the TTL approaches zero. This forces some unlucky client to refresh it for everybody, avoiding the thundering herd.

We used that technique in Google's DNS cache to fix what had been a monumental herd effect every 30 seconds when the RRs for outlook-com.olc.protection.outlook.com expired.