Skip to content

Conversation

@AndrewChubatiuk
Copy link
Collaborator

@AndrewChubatiuk AndrewChubatiuk commented Nov 1, 2025

@github-actions github-actions bot added k8s-stack k8s-stack helm chart related issue single VictoriaMetrics Single node helm chart related issue logs metrics hack labels Nov 1, 2025
@AndrewChubatiuk AndrewChubatiuk force-pushed the mixed-balancer-disable-vmagent branch 5 times, most recently from 4d1143d to b5f67ee Compare November 1, 2025 19:28
@AndrewChubatiuk AndrewChubatiuk changed the title distributed: inroduce mixed balancer, allow disabling vmagents distributed: inroduce mixed balancer Nov 1, 2025
@AndrewChubatiuk AndrewChubatiuk force-pushed the mixed-balancer-disable-vmagent branch 4 times, most recently from d782457 to e6e34ad Compare November 1, 2025 21:00
@AndrewChubatiuk AndrewChubatiuk changed the title distributed: inroduce mixed balancer distributed: introduce mixed balancer Nov 2, 2025
@AndrewChubatiuk AndrewChubatiuk force-pushed the mixed-balancer-disable-vmagent branch from e6e34ad to 37d503e Compare November 2, 2025 15:20
@AndrewChubatiuk AndrewChubatiuk force-pushed the mixed-balancer-disable-vmagent branch from 37d503e to f6df877 Compare November 2, 2025 15:23
@YuryHrytsuk
Copy link

YuryHrytsuk commented Nov 2, 2025

@AndrewChubatiuk could you explain the purpose of this PR? And why / how is it related to the issue linked?

@AndrewChubatiuk
Copy link
Collaborator Author

@YuryHrytsuk updated description

@YuryHrytsuk
Copy link

@YuryHrytsuk updated description

Thanks

What confuses me is word mixed balancer. Based on what I read, to write data to VM Single / Cluster, one uses vm-agent and to read data from VM Single / Cluster one uses vm-auth.

So word mixed implies that there is only one entity doing both? But if vm-agent cannot read data and vm-auth cannot write data (probably my assumption is wrong), what is actually a mixed balancer?

@AndrewChubatiuk AndrewChubatiuk force-pushed the mixed-balancer-disable-vmagent branch from f6df877 to 1980cab Compare November 3, 2025 20:31
@AndrewChubatiuk AndrewChubatiuk changed the title distributed: introduce mixed balancer distributed: introduce r/w balancer Nov 3, 2025
@AndrewChubatiuk AndrewChubatiuk force-pushed the mixed-balancer-disable-vmagent branch from 1980cab to c08be65 Compare November 3, 2025 20:33
@AndrewChubatiuk
Copy link
Collaborator Author

AndrewChubatiuk commented Nov 3, 2025

this PR introduces ability to set remoteWrites for extra VMAgent (if it's enabled) to a list of VMSingle/VMCluster endpoints in global write balancer is disabled

@AndrewChubatiuk AndrewChubatiuk force-pushed the mixed-balancer-disable-vmagent branch from c08be65 to 11cb9e2 Compare November 4, 2025 10:15
@AndrewChubatiuk AndrewChubatiuk changed the title distributed: introduce r/w balancer distributed: allow targeting extra vmagent to vmsingle/vmcluster directly Nov 4, 2025
@Haleygo
Copy link
Member

Haleygo commented Nov 6, 2025

@AndrewChubatiuk please check fix for extra vmagent -remoteWrite arg in a7fd168.

@Haleygo Haleygo force-pushed the mixed-balancer-disable-vmagent branch from da17148 to a7fd168 Compare November 6, 2025 06:26
Copy link
Member

@Haleygo Haleygo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM!
Let's merge it if you're ok with my commits.

retry_status_codes: [500, 502, 503]
drop_src_path_prefix_parts: 2
src_paths:
- /select/.+
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default src_paths for vmsingle read&write look a bit weird though.

@YuryHrytsuk
Copy link

Why wouldn't it be like this by default (instead of vmauth-write-lb + 2 vm agents)?

The new architecture (judging by image) still contains vmauth-write-loadbalancer and I don't understand why this is necessary

image

@Haleygo
Copy link
Member

Haleygo commented Nov 8, 2025

Why wouldn't it be like this by default (instead of vmauth-write-lb + 2 vm agents)?

The new architecture (judging by image) still contains vmauth-write-loadbalancer and I don't understand why this is necessary

image

See

Note:
The default topology tolerates zone outages by deploying components in every availability zone and enabling minimum-downtime during outages. If not required, some components(including vmauth-global-write, vmagent(per-zone), vmauth-read-proxy(per-zone)) are optional and can be disabled based on your use case, please refer to Parameters section for details.

and #2517 (comment)

vmauth-global-write: global write entrypoint, proxies requests to one of the zone vmagent with least_loaded policy.
The main responsibility of vmagent(per-zone) is to buffer data on disk when zone is unavailable to ingest.


vmauth-global-write and vmagent(per-zone) can be disabled as noted in #2517 (comment). If disabled, the extra-vmagent (configured automatically in this PR) or other collectors/clients must be configured to write to both vmsingle/vmcluster.
However, that won't be the default setup; by default, we aim to provide the maximum SLA and a default buffer layer. See also https://docs.victoriametrics.com/guides/vm-architectures/#multi-cluster-and-multi-az.

@AndrewChubatiuk AndrewChubatiuk force-pushed the master branch 2 times, most recently from a842d33 to 141fdd6 Compare December 2, 2025 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hack k8s-stack k8s-stack helm chart related issue logs metrics single VictoriaMetrics Single node helm chart related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants