relay
relay copied to clipboard
Switch `redis-rs` to async
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.
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 this still relevant?
@jernejstrasner yeah, this is still relevant.
We mentioned this today with @jjbayer and @Dav1dde , eventually we should pick it up.
This could have helped to prevent the INC-587, so we should definitely look into this.
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.
redis for projectconfig is now async but the others are not so I leave this ticket open
Does this mean we could become a bit more aggressive with our cpu autoscaler targets?
Yes we can, we should first look into enabling KEDA though.