Skip to content
Tech News
← Back to articles

In praise of memcached

read original more articles
Why This Matters

This article highlights the importance of understanding the primary purpose of caching solutions like memcached and Redis. Misusing these tools as persistent data stores can lead to operational challenges and data integrity issues, emphasizing the need for clear infrastructure roles. For the tech industry and consumers, it underscores the importance of proper tool selection and awareness of each technology's capabilities and limitations.

Key Takeaways

If you happen to find yourself in a sysadmin position, or a position where you just so happen to maintain someone’s infrastructure, chances are that at some point in time the topic “we need a cache” comes up.

You think for a moment and reach out for Redis, because you’re used to it, it’s fully featured, and it works! You remember it being a good, solid cache, and you wonder which new features recent releases have brought, and head to its homepage:

Your agents aren’t failing. Their context is. Inquiring agents want to know: How can I use Redis Iris as a real-time context engine for AI apps?

Right, so probably something with AI. This is sort of understandable, because Redis is a company that wants to make money.

Anyways, Redis homepage aside, you deploy it, and off you go - your trusty cache. You hand the connection string to the people who asked for it, and off you go.

Few months later

After a while, it turns out that cache.set("key", "value") is a really simple abstraction, and definitely easier than INSERT INTO table VALUES ('key', 'value') . People start treating the REmote DIctionary Server as something that’s always there, something that persists data, something that is a database.

You don’t know this. Your ops colleagues don’t know this. Therefore, your alerting doesn’t know this either, because you assume that people treat the cache as something volatile.

You find out that this has been going on when you happen to do something to Redis. Maybe you upgrade it, maybe you move it to another node, maybe your cat hits the eject button on your RAID0 server’s HDD tray.

The issue isn’t that Redis doesn’t have persistence, the issue is that usually, Redis is brought into a stack as a cache, and it is run with the assumption that people treat it that way.

... continue reading