Skip to content

Conversation

@frittentheke
Copy link
Contributor

@frittentheke frittentheke commented Oct 21, 2025

What this PR does / why we need it:
Allow configuration of service trafficDistribution parameter

Which issue(s) this PR fixes:
Fixes #19557

Special notes for your reviewer:
While this is about exposing a simple Kubernetes service parameter .... Looking at this again, after having just pushed a PR implementing this, I am wondering if trafficDistribution even helps in reducing the cross-AZ traffic:

Looking at https://grafana.com/docs/loki/latest/get-started/architecture/#loki-architecture ...

  1. Write-Path - Ingesters are addressed via hashing of the log streams (https://grafana.com/docs/loki/latest/get-started/architecture/#write-path) and don't care about the service Endpoints?

  2. Read-Path - Queries come in to the query-frontends and then go to the queriers and ingesters (for very recent data).
    Do the frontends actually use the service endpoints or also use the hash, again distributing queries to all instances in all AZs?

  3. I also found an old issue, Availability zone local replication #5319, discussing exactly what I am trying to achieve: save on VERY expensive cross-AZ traffic.

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@frittentheke frittentheke force-pushed the trafficDistribution branch 2 times, most recently from 4c9bee9 to 105cb07 Compare October 21, 2025 13:58
@frittentheke frittentheke marked this pull request as ready for review October 21, 2025 13:59
@frittentheke frittentheke requested a review from a team as a code owner October 21, 2025 13:59
@JStickler JStickler changed the title feat: allow configuration of service trafficDistribution parameter feat(helm): allow configuration of service trafficDistribution parameter Oct 22, 2025
@jkroepke
Copy link
Contributor

Please run make helm-docs as well.

@jkroepke
Copy link
Contributor

LGTM, I hope I get some fries now.

@frittentheke
Copy link
Contributor Author

LGTM, I hope I get some fries now.
Hope that worked out for ya?

Would you kindly let them tests run to see if there is anything I missed or messed up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[helm] Expose trafficDistribution parameter for Loki services to avoid expensive cross AZ traffic

2 participants