Skip to content

Which metric can I use to be able to horizontal scale rr? #969

Answered by rustatian
lanphan asked this question in Q&A
Discussion options

You must be logged in to vote

isn't rr_http_requests_queue_sum a bit too late to scale? Customers are already waiting.

Metric is just a value. When to scale (the red point) depends on your application. If you decide that 300 waiting requests affect your users, try to start scaling when it would be 250 queued requests 😃

PHP FPM exposes total/running/idle workers, with these metrics you can scale in advance (for example if 80% of all workers are running/have less than 20% idle workers, scale up), before customers are queued. With rr_http_requests_queue_sum you can scale only if 100% of workers are running and there are some customers in queue, waiting.

RR has metrics for the free/busy/invalid number of workers, as w…

Replies: 5 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@Warxcell
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rustatian
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by rustatian
Comment options

You must be logged in to vote
6 replies
@Warxcell
Comment options

@RobCannon
Comment options

@rustatian
Comment options

@RobCannon
Comment options

@rustatian
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
R-question Question
4 participants