Live data from Hacker News

In praise of memcached

jchri.st

11–20 of 113 posts

Re: In praise of memcached

#11
post #8

Redis works great as a cache, but there are a few things you need to do in order to use it reliably as a cache. 1) Wrap your client library so that it's impossible to store anything without an expiry date. You don't want 6-months-old data suddenly coming up in your app! 2) Either turn off persistence, or use a separate database for the cache. In other words, don't mix volatile data with stuff you actually care about.…

> 1) Wrap your client library so that it's impossible to store anything without an expiry date. You don't want 6-months-old data suddenly coming up in your app!

No need for this client-side complexity, as you should be using `allkeys-lru`. FWIW, should likely be doing this anyway, as (generally speaking) all data stored in Redis is usually regarded as volatile because of what Redis actually is.

Re: In praise of memcached

#12
post #9

Memcached is meant to be a lightweight memory cache, which makes sense, but contrary to the article's claim that "Redis is brought into a stack as a cache, and it is run with the assumption that people treat it that way"—I have very very rarely experienced this. Redis is brought into a stack because (most importantly!) it's fast and (almost as importantly!) because it's simple. I don't think this article is written b…

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.

Re: In praise of memcached

#13

Earlier quoted context omitted.

I don’t think LLMs would write this: “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.”

Or this: “None of these things are impossible with Redis, it’s just that memcached’s architecture in general more leans towards these directions, which makes it much, much more straightforward from an operations point of view.”

It's become de rigueur on HN to accuse any article one thinks is trite, obvious, or simply disagreeable of being AI-written. ("That comment has three items in a list! No human would ever put three items in a list! Checkmate, bot!")

Re: In praise of memcached

#14
post #7

[flagged]

I'm not really sure memcached optimizes for operational simplicity. The only time I've run it at scale, it would have low cpu utilization then unexpectedly hit lock contention and fall over without warning.

Compared to what?

Re: In praise of memcached

#15
post #9

Memcached is meant to be a lightweight memory cache, which makes sense, but contrary to the article's claim that "Redis is brought into a stack as a cache, and it is run with the assumption that people treat it that way"—I have very very rarely experienced this. Redis is brought into a stack because (most importantly!) it's fast and (almost as importantly!) because it's simple. I don't think this article is written b…

> it handles consensus and clustering for you

Considering how complex and error prone this is, I don’t want it in my stack.

Re: In praise of memcached

#16
post #9

Memcached is meant to be a lightweight memory cache, which makes sense, but contrary to the article's claim that "Redis is brought into a stack as a cache, and it is run with the assumption that people treat it that way"—I have very very rarely experienced this. Redis is brought into a stack because (most importantly!) it's fast and (almost as importantly!) because it's simple. I don't think this article is written b…

> wtf even is a "default value"?

The article mentions the default value is a null, which would be the cue to run whatever computationally expensive op or query the db or hit the disk etc... that you would normally run if you had no cache to begin with.

> but screwdrivers make great hammers too

I don't know what your screwdrivers look like but that sounds like a rough time.

Re: In praise of memcached

#17
post #2

Oh God I'm tired of ai written thought pieces

I don’t think LLMs would write this: “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.”

So many it's not X it's Y. It might have been polished, but it was claude
Post reply on HN