Why memcached beats Redis when you just need a cache
The author argues that reaching for Redis by default is a trap rooted in operational reality, not features. Redis is so easy to use that teams stop treating it as a volatile cache and quietly start relying on it as a persistent database. Because ops teams still assume the data is throwaway, monitoring and alerting never account for that dependency — and the problem only surfaces during an upgrade, a node migration, or a hardware failure, by which point Redis is too entangled in the stack to remove. The result is a ‘pet’ service that demands constant babysitting.
memcached sidesteps these issues precisely because it does less. Client libraries typically swallow connection failures, so a downed server just returns the default value instead of cascading errors. Clustering is handled entirely client-side through key hashing across multiple endpoints, with automatic removal and reconnection of dead nodes — no built-in cluster machinery to operate. And since memcached never writes to disk, it is genuinely volatile, making it a clean fit for stateless, schedulable workloads that can be spun up cheaply (dozens of ~64MB instances with negligible overhead).
The broader point is architectural alignment: none of memcached’s advantages are impossible in Redis, but memcached’s design naturally pushes toward the stateless, fail-open behavior you actually want from a cache. The author closes with a pragmatic reminder that many ‘database too slow’ complaints are really slow queries or missing indexes, so optimizing queries often matters more than the cache choice.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.