HackerLangs
TopNewTrendsCommentsPastAskShowJobs

dizzyVik

no profile record

Submissions

[untitled]

1 points·by dizzyVik·10 mesi fa·0 comments

comments

dizzyVik
·6 mesi fa·discuss
https://dizzy.zone

I've been on a bit of a hiatus as we've got a new human to look after, but I do blog here, and intend to blog there once I have the time available again.
dizzyVik
·10 mesi fa·discuss
I don't think this is a fair assessment. Had my benchmarks shown, say, that postgres crumbled under heavy write load then the conclusion would be different. That's exactly why I decided to do this - to see what the difference was.
dizzyVik
·10 mesi fa·discuss
I completely agree that this is not relevant for anyone running such workloads, the article is not aimed at them at all.

Within the constraints of my setup, postgres came out slower but still fast enough. I don't think I can quantify what fast enough is though. Is it 1000 req/s? Is it 200? It all depends on what you're doing with it. For many of my hobby projects which see tens of requests per second it definitely is fast enough.

You could argue that caching is indeed redundant in such cases, but some of those have quite a lot of data that takes a while to query.
dizzyVik
·10 mesi fa·discuss
I still end up recommending using postgres though, don't I?
dizzyVik
·10 mesi fa·discuss
1. No persistence for redis. 2. Redis would get OOM killed. 3. The default config coming with the image was used. 4. Yes, I gave it 2 cpus.

I wanted to compare how would my http server behave if I used postgres for caching and what the difference would be if I used redis instead.

This benchmark is only here to drive the point that sometimes you might not even need a dedicated kv store. Maybe using postgres for this is good enough for your use case.

The term production environment might mean many things. Perhaps you're processing hundreds of thousands of requests per second then you'll definitely need a different architecture with HA, scaling, dedicated shared caches etc. However, not many applications reach such a point and often end up using more than necessary to serve their consumers.

So I guess I'm just trying to say keep it simple.
dizzyVik
·10 mesi fa·discuss
There's a reason this is on my blog and not a paper in a journal. This isn't supposed to show the absolute speed of either tool, the benchmark is not set up for that. I do state that redis has more performance on the table in the blog post.
dizzyVik
·10 mesi fa·discuss
Not on my computer right now but I think it's 45 bytes per value
dizzyVik
·10 mesi fa·discuss
Author here. Redis is definitely faster. I was specifically not going for absolute peak performance for either redis or postgres - that would require going down to the wire protocols. The idea was emphasize that there' a "good enough" level of performance. Once you need that sort of speed - sure, there are ways to achieve it.