cortex-tenant icon indicating copy to clipboard operation
cortex-tenant copied to clipboard

[K8S] HPA working but loadbalancing not working as expected

Open Ronan-WeScale opened this issue 2 years ago • 2 comments

I have HPA enabled on my cortex-tenant deployment, but after scale, other pod doesn't receive timeseries.
When I check"cortex_tenant_timeseries_received" metrics only the first pod has count
But when I check cortex_tenant_timeseries_batches_received metrics, other pod receive some batch but no much like the first pod :

Result series: 3

pod 1 : 25353 pod 2: 4 pod 3 : 15

Maybe we can add an nginx proxy (or other app) to loadbalance the query between the backend ?
Tell me and I can try to implement it.

Ronan-WeScale avatar Aug 11 '23 13:08 Ronan-WeScale

maybe the problem come from prometheus remote write process, I need to analyse this

Ronan-WeScale avatar Aug 11 '23 14:08 Ronan-WeScale

maybe the problem come from prometheus remote write process

I did some research and the problem is indeed prometheus shards (see queue_config). Prometheus uses an auto-sizing algorithm for the number of shards, and it's entirely possible that the number of shards is 1, so only 1 cortex-tenant pod is used.

ksrt12 avatar Mar 08 '24 10:03 ksrt12