-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Allow multiple endpoints in Envoy clusters configured with hostnames #21655
Merged
NiniOak
merged 2 commits into
hashicorp:main
from
t-davies:f-envoy-static-dns-multi-hostnames
Oct 28, 2024
Merged
Allow multiple endpoints in Envoy clusters configured with hostnames #21655
NiniOak
merged 2 commits into
hashicorp:main
from
t-davies:f-envoy-static-dns-multi-hostnames
Oct 28, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t-davies
commented
Aug 25, 2024
break | ||
|
||
if len(endpoints) == envoyMaxEndpoints { | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure we do still need to break early here to maintain the same behaviour that we had before with regards to how fallbacks are determined, but happy to be corrected so we can remove this slightly clunky check.
t-davies
force-pushed
the
f-envoy-static-dns-multi-hostnames
branch
from
August 25, 2024 13:44
5c93213
to
b533de4
Compare
t-davies
force-pushed
the
f-envoy-static-dns-multi-hostnames
branch
5 times, most recently
from
September 2, 2024 13:46
feea22c
to
63b6ecd
Compare
@blake - anyone that can take a look please? |
t-davies
force-pushed
the
f-envoy-static-dns-multi-hostnames
branch
2 times, most recently
from
September 12, 2024 08:04
064b6d8
to
8a0e573
Compare
t-davies
force-pushed
the
f-envoy-static-dns-multi-hostnames
branch
from
September 19, 2024 16:07
8a0e573
to
592a0ed
Compare
t-davies
force-pushed
the
f-envoy-static-dns-multi-hostnames
branch
from
September 28, 2024 10:47
592a0ed
to
a1a2fe3
Compare
t-davies
force-pushed
the
f-envoy-static-dns-multi-hostnames
branch
from
October 12, 2024 14:24
a1a2fe3
to
19ac4b3
Compare
t-davies
force-pushed
the
f-envoy-static-dns-multi-hostnames
branch
from
October 24, 2024 20:56
19ac4b3
to
f270ab5
Compare
NiniOak
approved these changes
Oct 28, 2024
jmurret
added
backport/ent/1.15
Changes are backported to 1.15 ent
backport/ent/1.18
Changes are backported to 1.18 ent
backport/1.20
Changes are backported to 1.20
backport/ent/1.19
Changes are backported to 1.19 ent
and removed
pr/no-backport
labels
Oct 29, 2024
4 tasks
jmurret
added
backport/ent/1.19
Changes are backported to 1.19 ent
and removed
backport/ent/1.19
Changes are backported to 1.19 ent
labels
Oct 29, 2024
missylbytes
pushed a commit
that referenced
this pull request
Oct 29, 2024
…21655) * xds: allow multiple endpoints for strict_dns * xds: fixes typo in multi hostname warning
missylbytes
pushed a commit
that referenced
this pull request
Oct 30, 2024
…21655) * xds: allow multiple endpoints for strict_dns * xds: fixes typo in multi hostname warning
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport/ent/1.15
Changes are backported to 1.15 ent
backport/ent/1.18
Changes are backported to 1.18 ent
backport/ent/1.19
Changes are backported to 1.19 ent
backport/1.20
Changes are backported to 1.20
theme/envoy/xds
Related to Envoy support
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently when Consul generates configuration for Envoy, it behaves the same for both
LOGICAL_DNS
andSTRICT_DNS
discovery types and provides only a single endpoint to Envoy in both modes. This means that when multiple hostnames are configured inSTRICT_DNS
mode, requests are not load balanced over all available hosts.This change configures Envoy with all available hostnames when the discovery type is set to
STRICT_DNS
. InLOGICAL_DNS
mode, Envoy supports only a single endpoint and so the current behaviour of Consul remains unchanged.Testing & Reproduction steps
Tested manually, as follows:
Create Consul cluster
Create 2 instances of the same service ("example-service"), with different hostnames.
Create terminating gateway, configured with "example-service" as a destination.
Fetch the Envoy config from the terminating gateway and observe that only a single hostname is present in
lb_endpoints
(since the default discovery type isLOGICAL_DNS
).Set
envoy_dns_discovery_type
to"STRICT_DNS"
in proxy-defaults.Refetch config and observe that the Envoy config now contains both hostnames in
lb_endpoints
and will load balance incoming requests across all configured endpoints.Links
PR Checklist