relay icon indicating copy to clipboard operation
relay copied to clipboard

Switch `redis-rs` to async

Open olksdr opened this issue 3 years ago • 5 comments

As follow-up for migration to the new tokio runtime, we want to look into migrating more code to async model.

With upgrade done in https://github.com/getsentry/relay/pull/1538 - redis-rs crate supports async (and tokio) and we should take the opportunity to look into switching our sync code to async model.

olksdr avatar Nov 30 '22 12:11 olksdr

We might still want to wait a bit till the https://github.com/redis-rs/redis-rs/issues/745 done - which introduces the async cluster functionality into the crate.

olksdr avatar Jan 03 '23 20:01 olksdr

@olksdr this still relevant?

jernejstrasner avatar Dec 13 '23 15:12 jernejstrasner

@jernejstrasner yeah, this is still relevant.

We mentioned this today with @jjbayer and @Dav1dde , eventually we should pick it up.

olksdr avatar Dec 13 '23 16:12 olksdr

This could have helped to prevent the INC-587, so we should definitely look into this.

Dav1dde avatar Dec 13 '23 17:12 Dav1dde

This may have helped with INC-888 as well:

because its workers are limited and it spends ~20% of its time on non-CPU work (waiting for redis), it never triggers the autoscaling condition when it's overloaded, so even a small increase in req/s can push it over the edge.

mwarkentin avatar Sep 25 '24 12:09 mwarkentin

redis for projectconfig is now async but the others are not so I leave this ticket open

Litarnus avatar Dec 18 '24 09:12 Litarnus

Does this mean we could become a bit more aggressive with our cpu autoscaler targets?

mwarkentin avatar Apr 26 '25 20:04 mwarkentin

Yes we can, we should first look into enabling KEDA though.

Dav1dde avatar Apr 29 '25 13:04 Dav1dde