Skip to content

Improve finding caught up replica for SidekiqServerMW [RUN ALL RSPEC] [RUN AS-IF-FOSS]

What does this MR do?

Improves finding caught-up replica for SidekiqServerMiddleware,
pretty similar to what we do in LoadBalancer#select_caught_up_hosts,
but searching only for the first host that fit instead of querying them all.

It ensures that we rotate replicas and improve the probability to find the caught replica to avoid retries/primary fallback.

Implements #330609 (closed)

Feature flag rollout issue: #333153 (closed)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

N/A

Related to #330609 (closed)

Edited by Danger bot

Merge request reports