←back to thread

127 points maypok86 | 1 comments | | HN request time: 0.206s | source
Show context
regecks ◴[] No.44448030[source]
We’re looking for a distributed Go cache.

We don’t want to round trip to a network endpoint in the ideal path, but we run multiple instances of our monolith and we want a shared cache tier for efficiency.

Any architecture/library recommendations?

replies(8): >>44448526 #>>44448621 #>>44449247 #>>44449260 #>>44449523 #>>44450156 #>>44450474 #>>44450952 #
1. stackskipton ◴[] No.44449260[source]
Since you mention no network endpoint, I assume it's on a single server. If so, have you considered SQLite? Assuming your cache is not massive, the file is likely to end up in Filesystem cache so most of reads will come from memory and writes on modern SSD will be fine as well.

It's easy to understand system with well battle tested library and getting rid of cache is easy, delete the file.

EDIT: I will say for most use cases, the database cache is probably plenty. Don't add power until you really need it.