Redis is fast – I'll cache in Postgres
dizzy.zone
Redis is fast – I'll cache in Postgres
1–10 of 311 posts
Re: Redis is fast – I'll cache in Postgres
#2Re: Redis is fast – I'll cache in Postgres
#3I'd suggest using Redis pipelining -- or better: using the excellent rueidis redis client which performs auto-pipelining. Wouldn't be surprising to see a 10x performance boost.
Re: Redis is fast – I'll cache in Postgres
#4I didn't measure setting keys or req/sec because for my use case keys were updated infrequently.
I generally find ms to be a more useful metric than reqs/sec or latency at full load, as this is not a typical load. Or at least wasn't for my use case.
Of course all depends on your use case etc. etc. In some cases throughput does matter. I would encourage everyone to run their own benchmarks suited to their own use case to be sure – should be quick and easy.
As I rule I recommend starting with PostgreSQL and using something else only if you're heavily using the cache or you run in to problems. Redis isn't too hard to run, but still just one less service to worry about. Or alternatively, just use a in-memory DB. Not always appropriate of course, but sometimes it is.
Re: Redis is fast – I'll cache in Postgres
#5Re: Redis is fast – I'll cache in Postgres
#6Re: Redis is fast – I'll cache in Postgres
#7Definitely a premature optimization on my part.
Re: Redis is fast – I'll cache in Postgres
#8In similar vein, I’d always thought Redka ( https://github.com/nalgeon/redka ) was a neat idea since it gives you access to a subset of the Redis API backed by either SQLite or Postgres
Re: Redis is fast – I'll cache in Postgres
#9I think you just convinced me to drop redis for my new project. Definitely a premature optimization on my part.
Wherever you go, there you are.
Re: Redis is fast – I'll cache in Postgres
#10I think you just convinced me to drop redis for my new project. Definitely a premature optimization on my part.
“Dropping” something from a “new” project is premature optimization? Wherever you go, there you are.