News for hackers. Stuff that matters.

dizzyVik

Re:Ask HN: Could you share your personal website here? on Saturday January 17, 2026 @08:24AM (#46657878)
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.

Re:Redis is fast – I'll cache in Postgres on Friday September 26, 2025 @02:32AM (#45383405)
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.
Re:Redis is fast – I'll cache in Postgres on Friday September 26, 2025 @02:29AM (#45383376)
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.

Re:Redis is fast – I'll cache in Postgres on Friday September 26, 2025 @01:59AM (#45383183)
I still end up recommending using postgres though, don't I?
Re:Redis is fast – I'll cache in Postgres on Friday September 26, 2025 @12:54AM (#45382801)
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.

Re:Redis is fast – I'll cache in Postgres on Friday September 26, 2025 @12:11AM (#45382549)
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.
Re:Redis is fast – I'll cache in Postgres on Thursday September 25, 2025 @11:51PM (#45382436)
Not on my computer right now but I think it's 45 bytes per value
Re:Redis is fast – I'll cache in Postgres on Thursday September 25, 2025 @11:25PM (#45382284)
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.
Re:Related posts for Hugo via text embeddings on Tuesday December 03, 2024 @03:18PM (#42310814)
I've done a quick experiment with text embeddings on my blog, for recommended posts.
Re:Probabilistic Early Expiration in Go on Tuesday September 24, 2024 @08:07AM (#41635644)
Probabilistic early expiration allows one to refresh a cache entry based on how close we are to the expiry of that cache entry. It's a tool that can help alleviate the problems of cache stampedes. Here's how to do it in go.
Re:Enums in Go on Friday July 12, 2024 @08:52AM (#40945080)
These both look like great tools. I'll give them a spin!

Calling all devs – BOUNTIES for building privacy applications

Hey guys, I’m a dev @ MysteriumNetwork and we’ve just released our first ever developer bounties. We’re a distributed, permissionless privacy network at our core. We have grown a global residential IP network for dVPNs and privacy applications to be built on top of it.We want to work with developers who can help us put an end to internet censorship, data breaches and surveillance.Our “Can’t be...

( Read More... | no comments | 10 points | on HN )