-
Hello @rustatian , |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 8 replies
-
Hey @lanphan )) Nice to meet you again 😄 |
Beta Was this translation helpful? Give feedback.
-
Also, it's better to use 2-3 RR instances in 1 node (with 10-20 workers) (RR supports |
Beta Was this translation helpful? Give feedback.
-
@rustatian , thanks so much again. |
Beta Was this translation helpful? Give feedback.
-
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 😃
RR has metrics for the free/busy/invalid number of workers, as well as consumed memory and it's state.
To activate these metrics, add the following to your config: http:
address: 127.0.0.1:12811
max_request_size: 1024
middleware: [ "http_metrics" ] # <---- |
Beta Was this translation helpful? Give feedback.
-
I recently adjusted HPA to scale based on free workers. this is custom:
- seriesQuery: 'rr_http_total_workers{namespace!="",pod!=""}'
resources:
overrides:
namespace:
resource: "namespace"
pod:
resource: "pod"
name:
matches: "rr_http_total_workers"
as: "php_workers_utilization"
metricsQuery: 'avg(100 - (rr_http_workers_ready{<<.LabelMatchers>>} / rr_http_total_workers{<<.LabelMatchers>>} * 100)) by (<<.GroupBy>>)' and then add this part to HPA config metrics:
- type: Pods
pods:
metric:
name: php_workers_utilization
target:
type: AverageValue
averageValue: "% of not available workers" seems to be working sweet! Test setup: each pod have 1 worker. Started single pod, 50% scale on 50% of not available workers |
Beta Was this translation helpful? Give feedback.
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 😃
RR has metrics for the free/busy/invalid number of workers, as w…