5 ms·
"There are only two hard things in Computer Science: cache invalidation and naming things." -- Phil Karlton
by whizzkid 11y ago
"There are only two hard things in Computer Science:
cache invalidation and naming things."
-- Phil Karlton
- snyderize 11y agoYou forgot off-by-one errors
- ChuckMcM 11y agoI believe the quote is "There are 2 hard problems in computer science, naming things, cache invalidation, and off by 1 errors."
- calpaterson 11y agoThis is a famous quotation but in my experience it is not true. I have implemented web caching a few times and while some RPC-style forms/APIs have been difficult I've never put a cache in and had it go seriously wrong. Naming things is sometimes tricky but never profoundly difficult. The hard problems are probably things like doing something concurrently or maybe implementing the right feature...
- kevinbowman 11y agoIt's possible when you don't realise that something will be cached (for whatever reason - incorrect verb, missing etag or cache-control headers, some cookie confusion), and suddenly everyone starts seeing one person's experience (hopefully only a slightly tweaked page, but at worst their account screen). Turning the caching off is easy, but it can be really difficult to track down the cause after that because you tend to need a specifically-timed race condition, and even when you're sure you've fixed it everyone is really nervous to turn the cache back on again...
- whizzkid 11y ago"... it is not true. I have implemented web caching ..." As the quote says, it is not the implementing which is hard, it is the invalidating part that is little bit tricky. If you try to invalidate the cache in a strict manner, you will not enjoy the benefits of the caching much, since it will invalidate most of the time. If you have more relaxed implementation of it, there is a risk of this exact problem happening.
- adiabatty 11y agoIt sounds like some people forgot a `Vary: Cookie` header while they were all running around with their hair on fire because of the DDoS.
- mst 11y agoI, and many other ops-ish people I know, cringed at the obvious caching error that seemed like the most likely culprit. The "in the middle of a DDoS" makes it make a lot more sense, and while this is still a cringeworthy situation, the cringing at least on my part is now more sympathetic than horrified.
- adiabatty 11y agoIt sounds like some people forgot a `Vary: Cookie` header while they were all running around with their hair on fire because of the DDoS.
- ghrifter 11y agoThe hardest is gathering requirements...
- draw_down 11y agoThe third is refraining from posting this quote when one of those two issues comes up.