
TL;DR
A blog post arguing for memcached over Redis sparked a heated HN debate. Here's the architectural argument for why memcached's constraints might actually be a feature.
Direct answer
A blog post arguing for memcached over Redis sparked a heated HN debate. Here's the architectural argument for why memcached's constraints might actually be a feature.
Best for
Developers comparing real tool tradeoffs before choosing a stack.
Covers
Verdict, tradeoffs, pricing signals, workflow fit, and related alternatives.
A blog post praising memcached hit the Hacker News front page with 242 points and 100 comments, reigniting the eternal Redis vs memcached debate. The core argument: Redis's flexibility is a trap that leads to operational pain.
The post generated some predictable "this is AI-written" accusations (it was not) but also surfaced a genuinely interesting architectural discussion about what caches should and should not do.
The author's thesis is simple: Redis gets deployed as a "cache" but inevitably becomes treated as a persistent database by developers who do not understand its volatility assumptions. When Redis goes down (upgrades, hardware failures), the impact is severe because it is now storing critical data.
Memcached, by contrast, is architecturally constrained in ways that prevent this drift:
1. Graceful degradation is built in. Client libraries ignore connection exceptions. A simple get returns the default value (or none) if the server is down. Your application does not crash - it just runs slower while the cache refills.
2. No built-in clustering forces client-side distribution. Memcached has no cluster mode. Clients handle distribution through key hashing. When nodes fail, clients automatically remove them from rotation and later attempt reconnection. This sounds like a limitation, but it means no cluster state to manage, no consensus protocols to debug at 3am.
3. No persistence means true statelessness. Memcached does not persist to disk. You can deploy it as a stateless workload without worrying about data loss because there is no data to lose. It is genuinely ephemeral.
The discussion produced some excellent technical depth.
The Redis defenders pushed back on the framing:
"Redis is brought into a stack because (most importantly!) it's fast and (almost as importantly!) because it's simple. I have very very rarely experienced Redis being treated as a persistent store."
One commenter with 15 years of Redis experience noted they had "never had to manage clustering or had any issues with it" even for games with 30- or 60-tick state updates across multiple regions.
The operations perspective was more sympathetic to the original post:
"I've had teammates that treated Redis as an actual durable production database and operated that way. It's not unreasonable for a new dev to assume this unless told otherwise."
Another commenter laid out the practical rules for using Redis safely as a cache:
The performance discussion was illuminating. A commenter from Notion reported:
"memcached is about a bazillion times faster than redis at doing the simple KV cache job. it's got threads. at notion we use redis for a lot of things, but actual caching we leave to memcached"
The numbers from another commenter comparing local cache (APCu), memcached, and MariaDB:
APCu avg=0.000318ms
Memcached avg=0.039714ms
MariaDB avg=0.019541ms
The interesting observation: MariaDB was actually faster than memcached in this test because the network hop dominates. "Don't even start a socket if possible."
The architecture purists argued for separation of concerns:
"Redis is a great piece of tech but it suffers from trying to be good at two different jobs (persistent data structures, volatile cache) which should not be combined. Indeed in Redis itself they don't combine well - persistence is globally on or off."
The pragmatists countered that most teams will end up needing Redis anyway:
"I'd almost guarantee a large enough team using memcache will find a way to need Redis. And then we're maintaining 2 cache technologies."
Get the weekly deep dive
Tutorials on Claude Code, AI agents, and dev tools - delivered free every week.
From the archive
Jun 23, 2026 • 8 min read
Jun 23, 2026 • 6 min read
Jun 23, 2026 • 6 min read
Jun 22, 2026 • 8 min read
Several commenters asked the practical question: when do you actually need to move from database-level caching to a dedicated cache layer?
One commenter summarized it well:
"The most common first thing to cache is getting the current user, because this ends up being a very hot path for most stateless systems. Because you need to get the current user for almost every request, it's quite easy for getting the current user to be 50% of database load."
Another offered a decision framework:
import Queue from queue might be enoughThe performance hierarchy from another commenter:
Servers are so insanely large (up to 400 Cores) now that you can
get meaningful scale on a single box. If you can colocate the app
and cache on the same server, you can get many orders of magnitude
better performance, regardless of which cache it is.
Several commenters noted that memcached is not actually as simple as it appears:
"The memcache slab pools are a leaky abstraction that you may end up having to manage operationally, and it's another way Redis is simpler."
Memcached pre-allocates memory in fixed-size "slabs" for items of different sizes. If you store a lot of 50-byte items and then start storing 500-byte items, you can run into slab starvation where the cache evicts data even though there is technically free memory. Most developers "just reach for redis at that point."
The thread surfaced several common patterns where Redis's extra features matter:
For these use cases, memcached is not a viable alternative - you need the data structures. The argument is really about whether you should use the same Redis instance for caching and for these stateful operations.
The discussion converged on a nuanced position:
For pure caching: Memcached's constraints are features. The lack of persistence, the dumb client-side clustering, the graceful degradation - these all push you toward correct cache usage patterns.
For stateful operations: Redis (or Valkey, now that licensing is weird) is the right tool. But configure it as a persistent store with appropriate backup strategies, not as a "cache that happens to persist."
For most teams: Pick one and be disciplined. The real problem is not the technology - it is developers who do not understand the difference between a cache and a database. Memcached makes it harder to confuse the two. Redis makes it easier to do powerful things and also easier to shoot yourself in the foot.
As one commenter put it: "if you're letting a junior dev who refuses to read product documentation the responsibility of architecting production systems, then your problem isn't Redis."
Read next
The new wrangler deploy --temporary flag creates ephemeral Cloudflare accounts for AI agents. 60-minute deployments, no OAuth, no browser - just deploy and claim later.
5 min readA developer discovered that Claude Code's thinking output is summarized, not the raw reasoning. Here's what Anthropic's docs actually say - and why it matters.
5 min readSwitzerland's fully open foundation model promises transparent training data and EU compliance. The HN crowd has questions about actual performance.
6 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.
Vercel's high-performance monorepo build system. Remote caching, task pipelines, and incremental builds. Drop into any p...
View ToolPolyglot monorepo platform from Nrwl. Project graph, generators, executors, distributed task execution, and Nx Cloud for...
View ToolRun full-stack apps on lightweight VMs at the edge. Deploy via flyctl, scale across regions, attach Postgres and Redis....
View Tool
The new wrangler deploy --temporary flag creates ephemeral Cloudflare accounts for AI agents. 60-minute deployments, no...

Unsloth's dynamic quantization makes GLM-5.2 runnable on a 256GB Mac or a 24GB GPU with CPU offloading. Here is the hard...

Baidu releases Unlimited OCR, an open-source vision-language model that parses 100+ page documents in a single pass with...

A new paper shows a 3B parameter model hitting 94.3 on AIME26 and 96.1% on LeetCode contests - matching or exceeding mod...

Switzerland's fully open foundation model promises transparent training data and EU compliance. The HN crowd has questio...

A developer discovered that Claude Code's thinking output is summarized, not the raw reasoning. Here's what Anthropic's...

New tutorials, open-source projects, and deep dives on coding agents - delivered weekly.