Skip to content
DevMeme
5996 of 7590
Performance Post #6565 · source on Telegram

The Universal Performance Panacea: Just Add Cache

Description

This is a 'Hide the Pain Harold' meme format. The top text reads, 'Developers presenting their groundbreaking solutions to performance'. Below this, a stock photo shows a group of four smiling business professionals holding up a white sign. The central figure is András Arató, known as 'Hide the Pain Harold,' whose forced smile barely conceals a look of deep unease and pain. The text on the sign they are holding says, 'just one more CACHE bro'. The meme humorously critiques the common developer habit of suggesting caching as a default, and often overly simplistic, solution for all performance-related problems. It highlights the irony of presenting a well-worn tactic as a 'groundbreaking' innovation. For senior engineers, the joke resonates because they understand that while caching is a powerful tool, adding layers of it indiscriminately can introduce significant complexity, such as cache invalidation nightmares, data consistency issues, and debugging challenges. Harold's pained smile perfectly captures the weary resignation of an experienced developer hearing a junior colleague propose to 'just add a cache' to solve a deep-rooted architectural problem

Comments

28
Anonymous ★ Top Pick There are only two hard things in Computer Science: cache invalidation and naming things. And adding another cache layer, which inevitably makes both of the other two things exponentially harder
  1. Anonymous ★ Top Pick

    There are only two hard things in Computer Science: cache invalidation and naming things. And adding another cache layer, which inevitably makes both of the other two things exponentially harder

  2. Anonymous

    “Just one more cache” has turned our data path into a Matryoshka doll - blazing fast until you need the real source of truth, then it’s hide-and-seek across six conflicting TTLs

  3. Anonymous

    After 15 years in the industry, I've learned there are only two hard problems in computer science: cache invalidation, naming things, and convincing management that adding a seventh caching layer won't fix the O(n³) algorithm in production

  4. Anonymous

    Ah yes, the classic 'cache all the things' approach to performance optimization. Because why profile your database queries, optimize your algorithms, or fix your N+1 problems when you can just add another Redis instance? It's like treating a memory leak by buying more RAM - technically it works until it doesn't. The real groundbreaking solution would be admitting that cache invalidation is one of the two hard problems in computer science, but that presentation wouldn't get past the architecture review board

  5. Anonymous

    Just one more cache layer - because nothing scales like a fragility pyramid where invalidation is harder than naming things

  6. Anonymous

    Nothing says enterprise architecture like fixing latency by putting a read‑through cache in front of the write‑back cache - shipping a distributed invalidation bug with extra steps

  7. Anonymous

    Added one more cache: P99 dropped, correctness is behind a TTL, and the source of truth is now whoever warmed last

  8. @GLXBX 1y

    Ngl, I have used 300ms cache to optimize api rate limit usage

  9. @samorosnie 1y

    My current project started as a cache layer 🥰

  10. @babibobii 1y

    There are only two hard things in Computer Science: cache invalidation and naming things. -- Phil Karlton

    1. @TheRamenDutchman 1y

      And off by one errors

  11. @TheRamenDutchman 1y

    Also "more cpu/ram", never fails

    1. @SamsonovAnton 1y

      Extensive approach to system scaling is the root of all evil.

    2. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

      Damn an insurance company where I was, bragged to me that their database is super fast now since they upgraded to a 1TB RAM caching all of the database in RAM for read and lookups😭💀🤌

      1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

        Just give me a tenth of this and I will be happy

      2. @azizhakberdiev 1y

        They clearly don't understand a shit about RAM

        1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

          Well it works and that's exactly how RAM works but it's expensive as fuck

          1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

            And i hope they prioritize writes otherwise you have a bigger time windows for unexpected shutdown

          2. @azizhakberdiev 1y

            I suppose that's not how RAM supposed to work. Even though accessing an address in O(1) in theory, such big RAM is significantly slower. I don't think this was 1TB in a single RAM, more like combined

            1. @theKAKAN 5mo

              Yeah, but it'll be faster than disk still. So the statement that their database is now super fast might still be true Like imagine they moved from HDD to a proper RAM cache+HDD for cold storage. Obviously, that's not the case most likely, but can be 🤷🏻‍♀️

              1. @azizhakberdiev 5mo

                databases never work on a single hard disk, there's several hard disks containing same data, and they have to optimize read operations from there. Cache is used for different purposes, you know what I mean

  12. @TheRamenDutchman 1y

    Also this https://thedailywtf.com/articles/The-Speedup-Loop

    1. @RiedleroD 1y

      15min read for what could've been a single paragraph …

      1. @TheRamenDutchman 1y

        I think it's called “storytelling”, people tend to enjoy it from time to time

        1. @RiedleroD 1y

          sure, but I was in for a simple blog post, and got a short story instead. When I wanna read stories, I do.

  13. @theKAKAN 5mo

    If you're sane, sure. To make things simple, we can always assume 1 of each. Doesn't make sense, but gets the message across 🤷🏻‍♀️

  14. @theKAKAN 5mo

    There's Calibre which loads the entire DB in memory and then works and later dumps it into your disk lol

    1. @azizhakberdiev 5mo

      not sure how exactly it works, but if the purpose is caching, then it has to be done in a use-case specific manner. You get much more of it if you store materialized copy of relations resulting from heavy join operations for example rather than just bunch of data that still requires processing

Use J and K for navigation