zlacker

[return to "Do you really need Redis? How to get away with just PostgreSQL"]
1. chmod7+K[view] [source] 2021-06-12 07:07:15
>>hyzyla+(OP)
Funny. My approach is usually the other way around: Can I get away with just Redis?
◧◩
2. wokwok+T3[view] [source] 2021-06-12 07:44:04
>>chmod7+K
Why would you choose to use a system that doesn't scale by default?

Single user local applications? Fair.

Web applications? Very strange choice imo.

Reddis is great, but it is *not* a database, and it's thoroughly rubbish at high load concurrency without clustering, which is (still) a massive pain in the ass to setup manually.

Of course, you can just use a hosted version off a cloud provider... but, it's generally about 10x more expensive than just a plain old database.

/shrug

I mean, sure, it's (arguably...) step up from just using sqlite, but... really, it's easy, and that's good... but it isn't good enough as a general replacement for having a real database.

(To be fair, sqlite has got some pretty sophisticated functionality too, even some support for concurrency; it's probably a step up from redis in many circumstances).

◧◩◪
3. tehbea+y4[view] [source] 2021-06-12 07:52:10
>>wokwok+T3
> Why would you choose to use a system that doesn't scale by default?

By all accounts Postgres seems to be a pain to scale off a single machine, much more so than redis.

◧◩◪◨
4. hardwa+gd[view] [source] 2021-06-12 09:31:20
>>tehbea+y4
Postgres is not as automatic as other tools but is mostly an artifact of it being around so long, and focus being on other things. Few projects have been around and stayed as relevant as postgres.

Most of the time, you really don't need to scale postgres more than vertically (outside of the usual read replicas), and if you have tons of reads (that aren't hitting cache, I guess), then you can scale reads relatively easily. The problem is that the guarantees that postgres gives you around your data are research-level hard -- you either quorum or you 2pc.

Once you start looking into solutions that scale easily, if they don't ding you on performance, things get murky really quick and all of a sudden you hear a lot of "read-your-writes" or "eventual consistency" -- they're weakening the problem so it can be solved easily.

All that said -- Citus and PostgresXL do exist. They're not perfect by any means, but you also have solutions that scale at the table-level like TimescaleDB and others. You can literally use Postgres for something it was never designed for and still be in a manageable situation -- try that with other tools.

All that said, KeyDB[0] looks pretty awesome. Multithreaded, easy clustering, and flash-as-memory in a pinch, I'm way more excited to roll that out than I am Redis these days.

[0]: https://github.com/EQ-Alpha/KeyDB

◧◩◪◨⬒
5. victor+3r[view] [source] 2021-06-12 12:14:09
>>hardwa+gd
KeyDB is really good. We use it in production to achieve millisecond response times on millions of requests per second.
◧◩◪◨⬒⬓
6. killin+aJ[view] [source] 2021-06-12 15:15:51
>>victor+3r
Are you Google search? How do you have millions of requests per second?
◧◩◪◨⬒⬓⬔
7. maniga+QM[view] [source] 2021-06-12 15:52:38
>>killin+aJ
Lots of industries and applications can get to that scale. My last few companies were in adtech where that is common.
◧◩◪◨⬒⬓⬔⧯
8. killin+OF1[view] [source] 2021-06-13 00:31:37
>>maniga+QM
Thanks, I had no idea!
[go to top]