Live data from Hacker News

Redis is fast – I'll cache in Postgres

dizzy.zone

271–280 of 311 posts

Re: Redis is fast – I'll cache in Postgres

#271
post #269

Earlier quoted context omitted.

> No need to be so combative. You're confusing being "combative" with asking you to substantiate your extraordinary claims. You opted to make some outlandish and very broad sweeping statements, and when asked to provide any degree of substance, you resorted to talk about "chill pills"? What does that say about the substance if your claims? > If postgres has issues, it can affect the reliability of the service further…

> You're confusing being "combative" with asking you to substantiate your extraordinary claims. You opted to make some outlandish and very broad sweeping statements, and when asked to provide any degree of substance, you resorted to talk about "chill pills"? what are these "extraordinary claims" you speak of? I believe it's you who are confusing me with someone else. I am not GP. You appear to be fighting windmills.

> what are these "extraordinary claims" you speak of?

The claim that using postgres to store data, such as a cache, "is a bit concerning in terms of reliability".

Re: Redis is fast – I'll cache in Postgres

#272
post #66

Is this engagement bait? Sigh... fine, at least I bite the bait here: 1. The use-case is super specific to homelab where consistency doesn't matter. You didn't show us the Redis persistence setup. What is the persistence/durability setting? I bet you'd lose data the one day you forgot and flip the breaker of your homelab. 2. What happened when data is bigger than your 8GB of RAM on Redis? 3. You didn't show us the PG…

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 i…

> No persistence for redis

In this case, I would expect that a fairer comparison would be running Postgres on tmpfs. UNLOGGED only skips WAL writes, not all writes; if you do a clean shutdown, your data is still there. It's only lost on crash.

Re: Redis is fast – I'll cache in Postgres

#273
post #172

Earlier quoted context omitted.

> "If we don't need performance, we don't need caches" feels like a great broader takeaway here. I don't think this holds true. Caches are used for reasons other than performance. For example, caches are used in some scenarios for stampede protection to mitigate DoS attacks. Also, the impact of caches on performance is sometimes negative. With distributed caching, each match and put require a network request. Even wh…

DoS is a performance problem, if your server was infinitely fast with infinite storage they wouldnt be an issue.

> DoS is a performance problem

Not really. Running out of computational resources to fulfill requests is not a performance issue. Think of thinks such as exhausting a connection pool. More often than not, some components of a system can't scale horizontally.

Re: Redis is fast – I'll cache in Postgres

#274
post #263
post #253

Earlier quoted context omitted.

"Saying that anybody can learn to unblock a sink by watching youtube is your tipical HN mentality of stating opinons as facts." I don't understand what you mean. Are you saying that it's not true that anyone could learn to unblock a sink by watching YouTube videos?

Yes I do think not all people could fix it with Youtube. My grandma couldn't for example. I had a neigbor come for help with something like that too. Is not that hard to understan mate. Maybe put my comment in the LLM so you can get it. What is your point again?

My analogy holds up. Anyone could type "optimize my PostgreSQL database by editing the configuration file" into an LLM, but most people won't - same as most people won't watch YouTube to figure out how to unblock a sink.

If you don't like the sink analogy what analogy would you use instead for this? I'm confident there's a "people could learn X from YouTube but chose to pay someone else instead" that's more effective than the sink one.

Re: Redis is fast – I'll cache in Postgres

#275
post #268
post #254

Earlier quoted context omitted.

Personally I'd like to hire a DB expert who also knows how to drive an agentic coding system to help them accelerate their work. AI tools, used correctly, act as an amplifier of existing knowledge and experience.

As far as I know nobody has really came up with proof that LLMs act as an amplifier of existing knoledge. It does make people FEEL more productive.

What would a "proof" of that even look like?

There are thousands (probably millions) of us walking around with anecdotal personal evidence at this point.

Re: Redis is fast – I'll cache in Postgres

#276
post #7

I 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.

I was referring to adding redis prematurely

Re: Redis is fast – I'll cache in Postgres

#277
post #269

Earlier quoted context omitted.

> You're confusing being "combative" with asking you to substantiate your extraordinary claims. You opted to make some outlandish and very broad sweeping statements, and when asked to provide any degree of substance, you resorted to talk about "chill pills"? what are these "extraordinary claims" you speak of? I believe it's you who are confusing me with someone else. I am not GP. You appear to be fighting windmills.

> what are these "extraordinary claims" you speak of? The claim that using postgres to store data, such as a cache, "is a bit concerning in terms of reliability".

Can you point to where I made that claim?

Re: Redis is fast – I'll cache in Postgres

#278
post #262

> Both postgres and redis are used with the out of the box settings Ugh. I know this gives the illusion of fairness, but it's not how any self-respecting software engineer should approach benchmarks. You have hardware. Perhaps you have virtualized hardware. You tune to the hardware. There simply isn't another way, if you want to be taken seriously. Some will say that in a container-orchestrated environment, tuning go…

Yep. I worked in a famous-big-company that had a 15 years old service that was dogslow, systemd restarts would take multiple hours. Everyone was talking about C++ optimizations, mutex everywhere etc - which was in fact a problem. However.. I seemed to be the first person to actually try to debug what the database was doing, and it was going to disk all the time with a very small cache.. weird.. I see the MySQL settin…

At one startup, all I did was increase the innodb buffer pool size. They were using default settings.

Re: Redis is fast – I'll cache in Postgres

#279
post #275
post #268

Earlier quoted context omitted.

As far as I know nobody has really came up with proof that LLMs act as an amplifier of existing knoledge. It does make people FEEL more productive.

What would a "proof" of that even look like? There are thousands (probably millions) of us walking around with anecdotal personal evidence at this point.

Some years ago when everybody here gave their anecdotal evidence about how Bitcoin and Blockchain were the future and they used it every day. You were a fool if you did not jump on the bandwagon.

If the personal opinions on this site were true, half of the code in the world would be functional, lisp would be one of the languages most used and Microsoft would have not bougth DropBox.

I really think HN hive minds opinions means nothing. Too much money here to be real.

Re: Redis is fast – I'll cache in Postgres

#280
post #261
post #252

Earlier quoted context omitted.

You can learn how to pour a drink in 1 minute, that is why most bartenders earn minimum wage. You can't become a db expert with a promt. I hope you make a lot of money with your lies and good luck.

You can become a DB expert by reading books, forums and practicing hard. These days you can replace those books and forums with a top tier LLM, but you still need to put in the practice yourself. Even with AI assistance that's still a lot of work.

You could not replace good books with Intenert and you can't replace good books with a any LLM.

You can replace books with your own time and research.

Again making statements that are just not true. Typical HN behavior.

Post reply on HN