redis cluster

20 days ago by gandalf_der_13te to c/programmer_humor

FishFace 32 points 19 days ago

We pronouncing "redis" like "radish" now?

image

path: 0 25972222, hotness: undefined, score: 32, children: 3
Dicska 6 points 19 days ago

If 'redis' was an actual word in my language, it would be pronounced almost exactly like 'radish'.

path: 0 25972222 25973364, hotness: undefined, score: 6, children: 1
FishFace 3 points 19 days ago

If you either pronounce e and a the same, or s and sh the same, it's a fine pun. But with both being different in English, it's bad IMO

path: 0 25972222 25973364 25973472, hotness: undefined, score: 3, children: 0
victorz 3 points 19 days ago

Works better in Scandinavian languages. Almost the same word.

path: 0 25972222 25974870, hotness: undefined, score: 3, children: 0
Tja 20 points 19 days ago

Is it caching data from MangoDB?

path: 0 25970954, hotness: undefined, score: 20, children: 1
egrets 6 points 19 days ago

To scale horizontally, they're using the chard pattern.

path: 0 25970954 25971129, hotness: undefined, score: 6, children: 0
SkaveRat 12 points 19 days ago

Looks like it's executed by the root user

Not recommended

path: 0 25972689, hotness: undefined, score: 12, children: 0
Gonzako 3 points 19 days ago

Do people have uses for redis? What does it do better than just the standard DB queue?

path: 0 25972489, hotness: undefined, score: 3, children: 4
expr 14 points 19 days ago

I'm not sure what you mean by "standard DB queue" (perhaps you mean a message queue, I guess?), but yeah Redis (or really, Valkey, now, since Redis tried to change license on everyone) is a very important tool in the toolbox for system design. In-memory databases trade persistence guarantees for raw throughput, and are very well-suited for different workloads than a traditional database is. It's great for caching, rate-limiting, realtime analytics, leaderboards... Basically anything with ephemeral data or data that can easily be reconstructed from some other source of truth. It's an optimization tool that can significantly reduce the load on your primary application database for certain workloads (and achieve higher throughput).

path: 0 25972489 25973125, hotness: undefined, score: 14, children: 2
Gonzako 2 points 18 days ago

Gotcha, so, as an example, the postgress instance would calculate once the statistics of a view and you'd store that onto redis.

I operate with the logic of "If I don't know what something is for cut it out and see what breaks" and I've yet to really have a need of an in-memory database tho, I think I'd find an use for it for one case where I get deadlocks for data that I really want to be up to date.

path: 0 25972489 25973125 25987333, hotness: undefined, score: 2, children: 1
expr 2 points 17 days ago

Deadlocks aren't generally too much of an issue with an MVCC DB like Postgres (though it certainly can happen if you use explicit locks and such), but yeah ultimately it's all about the kind of workload we're talking about. I honestly think of it much less like a database and more like a high-performance synchronization mechanism that can cross process boundaries. There's many times where you want to coordinate the behavior of many independent processes (like horizontally-scaled services), such as rate-limiting your requests to an external service. Implementing a distributed rate-limiting algorithm with a RDBMS is a pretty poor choice, because the data used for any synchronization is ephemeral, unimportant, and short-lived (and this, ACID guarantees are pretty irrelevant), and you would incur a lot of contention overhead for shared resources. You might even get bottlenecks that prevent you from achieving the rate you're trying to limit yourself to. Something like Valkey gives you simple, fast atomic writes with built-in TTL mechanisms, which is perfect for a rate-limiting system. There are many other examples like this where it makes a lot of sense.

Or consider even something incredibly simple like, I dunno, a realtime user counter. Valkey has an atomic primitive operation for this built-in (INCR). With an RDBMS, this is not trivial as you scale up the number of clients, because either you have to deal with a ton of row-level contention (if the counter is stored in a single row that gets updated), or you end up hammering your disk with increasingly large aggregate operations (if there's a row-per-user and the total is computed across them, somehow).

As I said, it's really just very different workloads where they are valuable.

path: 0 25972489 25973125 25987333 26002813, hotness: undefined, score: 2, children: 0
marcos 6 points 19 days ago

What does it do better than just the standard DB queue?

It makes a queue without loading the DB.

ACID DBs don't scale indefinitely, and it's a very easy win if you are having performance issues even before scaling them.

path: 0 25972489 25974515, hotness: undefined, score: 6, children: 0
UnLocoPoco 2 points 19 days ago
path: 0 25973568, hotness: undefined, score: 2, children: 0
chuckleslord 2 points 19 days ago

path: 0 25973432, hotness: undefined, score: 2, children: 0
programmer_humor
programmer_humor

@programming.dev

login for more options
33571
2550
7101

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
    • If the mod doesn't find it funny, you're banned. Ha-ha!... For real: do not use the community for "statements". There are other places for such content. Keep it chill and funny.

go to feed...