Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How should we set L4/L7 traffic weights? #441

Open
ShyunnY opened this issue Oct 25, 2024 · 0 comments
Open

How should we set L4/L7 traffic weights? #441

ShyunnY opened this issue Oct 25, 2024 · 0 comments

Comments

@ShyunnY
Copy link

ShyunnY commented Oct 25, 2024

I'm not sure if there is a similar issue mentioning this.

I'm new to pingora and I want to be able to configure traffic weights at the L4/L7 layer.

I see the default configuration of weight=1 in the source code, and I don't seem to find where I should configure this weight:

{
  let mut upstreams = BTreeSet::new();
  for addrs in iter.into_iter() {
  let addrs = addrs.to_socket_addrs()?.map(|addr| Backend {
    ...
    weight: 1, 
  });
  ...
  }
  Ok(Self::new(upstreams))
}

Are there any helper functions or examples? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant