Difference between weight, current_weight, effective_weight, etc?

Maxim Dounin mdounin at mdounin.ru
Tue May 15 03:18:19 UTC 2018


On Mon, May 14, 2018 at 08:04:22PM -0700, Pablo Fischer wrote:

> We are looking (unless it already exists) to add load feedback
> functionality to our setup, this basically means to have an API
> (either lua or through C) that we can use to change the weight of
> servers "dynamically" (either async or by hitting a specific URL).
> However when reading the code I'm a little confused on the difference
> between those weight variables, seems that sometimes you compare them
> against each other so not sure what is the difference in them.
> What is the difference between weight, current_weight and
> effective_weight? I'm assuming that total_weight is the sum of all
> weights (weight?) for a given upstream.

Try reading this commit:


Maxim Dounin

More information about the nginx-devel mailing list