Live data from Hacker News

Replacing a cache service with a database

avi.im

1–10 of 69 posts

Re: Replacing a cache service with a database

#6
A friend of mine once argued that adding a cache to a system is almost always an indication that you have an architectural problem further down the stack, and you should try to address that instead.

The more software development experience I gain the more I agree with him on that!

Re: Replacing a cache service with a database

#8
post #6

A friend of mine once argued that adding a cache to a system is almost always an indication that you have an architectural problem further down the stack, and you should try to address that instead. The more software development experience I gain the more I agree with him on that!

Yeah my architecture problem is that Postgres RDS EBS storage is slow as dog. Sure our data won’t go poof if we lose an instance but it’s so slow.

(It’s not really my architecture problem. My architecture problem is that we store pages as grains of sand in a db instead of in a bucket, and that we allow user defined schemas)

Re: Replacing a cache service with a database

#9
post #6

A friend of mine once argued that adding a cache to a system is almost always an indication that you have an architectural problem further down the stack, and you should try to address that instead. The more software development experience I gain the more I agree with him on that!

That's true in my experience.

Caches have perfectly valid uses, but they are so often used in fundamentally poor ways, especially with databases.

Re: Replacing a cache service with a database

#10
post #6

A friend of mine once argued that adding a cache to a system is almost always an indication that you have an architectural problem further down the stack, and you should try to address that instead. The more software development experience I gain the more I agree with him on that!

I disagree. For large search pages where you're building payloads from multiple records that don't change often, it could be beneficial to use a cache. Your cache ends up helping the most common results to be fetched less often and return data faster.
Post reply on HN