Live data from Hacker News

Redis 8.8: New array data structure, rate limiter, performance improvements

redis.io

31–40 of 118 posts

Re: Redis 8.8: New array data structure, rate limiter, performance improvements

#31

Earlier quoted context omitted.

Probably because Redis gives you a very well-defined/understood set of rich data structures with built-in behavior like TTL, atomic operations, eviction, and persistence. These things are otherwise usually scattered across native types, helper classes, or entirely separate libraries.

It doesn’t seem like the right tool for the job, though. Aren’t your own programming language’s constructs much more well-defined / understood ?

I use PHP. None of the language tools or constructs available to me are adequate.

https://blog.codinghorror.com/the-php-singularity/

Re: Redis 8.8: New array data structure, rate limiter, performance improvements

#32
post #17
post #5

Earlier quoted context omitted.

Redis doesn't necessarily have to be used as a cache. Streams, for example, make it a great message queue; but a single-node message queue is a single point of failure and thus not viable for many setups.

That's why you run Redis Sentinel in production

That you do. Until you realise that there is only a single writer in that scenario, it doesn’t address any sharding concerns, you need to use compatible clients that opt into the sentinel protocol, during failover you’ll see client errors… there’s lots of room for improvement on redis HA.

Re: Redis 8.8: New array data structure, rate limiter, performance improvements

#33
post #7

Where did everyone end up on the Redis/Valkey split? Is there still a reason to use Redis after the license kerfuffle?

I've switched to Valkey and I'm not really looking back. I'm much more comfortable with those people maintaining the software.

Re: Redis 8.8: New array data structure, rate limiter, performance improvements

#34
post #17
post #5

Earlier quoted context omitted.

Redis doesn't necessarily have to be used as a cache. Streams, for example, make it a great message queue; but a single-node message queue is a single point of failure and thus not viable for many setups.

That's why you run Redis Sentinel in production

With the amount of problems I had using Redis Sentinel, I really wish there was another way. On multiple occasions, with completely different deployments, it got itself into a non-repairable state where the only option was to drop it and setup the replicas manually. I was hoping someone would do a Patroni-like project for Redis, but I've not found it yet. I've moved all persistent data to PostgreSQL and use a number of Valkeys behind Envoy proxy as a cache.

Re: Redis 8.8: New array data structure, rate limiter, performance improvements

#35

Earlier quoted context omitted.

Probably because Redis gives you a very well-defined/understood set of rich data structures with built-in behavior like TTL, atomic operations, eviction, and persistence. These things are otherwise usually scattered across native types, helper classes, or entirely separate libraries.

It doesn’t seem like the right tool for the job, though. Aren’t your own programming language’s constructs much more well-defined / understood ?

Language's own native data-structures are generally much more capable and vast. 99%+ developers use only a very limited set of those capabilities. This approach packages those most used ones into a nice, consistent DSL.

It's similar in effect to what busybox does to shell utilities, though the motives are different.

Re: Redis 8.8: New array data structure, rate limiter, performance improvements

#36
post #31

Earlier quoted context omitted.

It doesn’t seem like the right tool for the job, though. Aren’t your own programming language’s constructs much more well-defined / understood ?

I use PHP. None of the language tools or constructs available to me are adequate. https://blog.codinghorror.com/the-php-singularity/

And you want to embed Redis inside PHP as a solution?? That’s nuts.

Re: Redis 8.8: New array data structure, rate limiter, performance improvements

#37
post #7

Where did everyone end up on the Redis/Valkey split? Is there still a reason to use Redis after the license kerfuffle?

Valkey, because our cloud provider is hosting it and that's obviously what they prefer.

I feel like we're using about 1% of its features at this point - really just as a fast K/V store - so it would be easy to switch if needed, but I can't see a case where we would.

Re: Redis 8.8: New array data structure, rate limiter, performance improvements

#38
post #7

Where did everyone end up on the Redis/Valkey split? Is there still a reason to use Redis after the license kerfuffle?

Valkey, because our cloud provider is hosting it and that's obviously what they prefer. I feel like we're using about 1% of its features at this point - really just as a fast K/V store - so it would be easy to switch if needed, but I can't see a case where we would.

They prefer it because they don't have to pay to use it.

Re: Redis 8.8: New array data structure, rate limiter, performance improvements

#39
post #3

While I love Redis as a versatile tool for external data structures, it's still lacking in two areas IMHO: One, it would be cool to be able to embed it, similar to sqlite, directly into applications. Two, the HA story is so much more complicated than it should be. I totally acknowledge that concurrency and distributed computing is hard, but it should not require reading heaps of documentation and understanding two en…

What would be the point of embedding Redis into an application? What's the advantage of using Redis over using the builtin (or third party) data structures of the language the application is developed in? I'm asking as a non-webdev who never quite got what Redis actually does, but would love to learn.

Why would you embed SQLite?

It’s the same use case with a different api.

A typical (meaningful) example might be communication between threads or actors in a single process, or idempotent tests.

As with SQLite, an external xxx that does this for you is certainly better, etc. but it’s convenient sometimes, to have an application that doesn’t go “now before you run this install Postgres…”.

It’s seldom useful for a web app where you control everything.

Re: Redis 8.8: New array data structure, rate limiter, performance improvements

#40
post #30

Earlier quoted context omitted.

This case is exactly what he talks about. To get HA just setup more than one redis cache - or rebuild the session if it was lost in the redis cache.

It’s not. Imagine a web app that stores your user information in a session store, mapped by your cookie-provided session ID. Your web app searches redis 1 for the session id, but since that key is on redis 2, the lookup fails and the application thinks there is no such session, and rejects the request. Now you could solve this specific case by sharding by prefix, or by querying all instances, but then you still do no…

But that is his point. If you cannot find the session id in redis, you login again. If your Redis server crash, you start a new one and everyone just login again. No data is lost.
Post reply on HN