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

Implementation of Weights Data structures #4468

Merged
merged 17 commits into from
Sep 7, 2018
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions website/source/docs/agent/services.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ example shows all possible fields, but note that only a few are required.
"command": [],
"config": {}
}
},
"weights": {
"passing": 5,
"warning": 1
}
}
}
Expand Down Expand Up @@ -151,6 +155,17 @@ are used to configure the proxy and are specified in the [proxy
docs](/docs/connect/proxies.html). If `native` is true, it is an error to also
specifiy a managed proxy instance.

The `weights` field is an optional field to specify the weight of a service in
DNS SRV responses. If this field is not specified, its default value is:
`"weights": {"passing": 1, "warning": 1}`.
When a service is `critical`, it is excluded from DNS responses, `warning` services
will be in DNS responses as well unless the `only_passing = true` is set in the
Copy link
Member

Choose a reason for hiding this comment

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

nit: this reads a little confusingly and might be interpreted backwards, instead we could simplify it into multiple sentences:

When a service is critical, it is excluded from DNS responses. Services with warning checks are in included in responses by default, but excluded if the optional param only_passing = true is present in agent DNS configuration or ?passing is used via the API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

DNS configuration of the agent.
When DNS SRV requests are issued, response will include the weight in the SRV
response accordingly to the state of service. It allows to put more weights
on services running on larger nodes and optionnally to put less pressure on
services being in `warning` state.
Copy link
Member

Choose a reason for hiding this comment

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

When DNS SRV requests are made, the response will include the weights specified given the state of the service. This allows some instances to be given hight weight if they have more capacity, and optionally allows reducing load on services with checks in warning status by giving passing instances a higher weight.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@banks DONE as well in next patch


## Multiple Service Definitions

Multiple services definitions can be provided at once using the plural
Expand Down