Refactor dns cluster api#36353
Conversation
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
072cab0 to
e1a1e5f
Compare
|
@markdroth @wbpcode Just wanted to check in that I'm going in the right direction |
a305ccc to
928ef02
Compare
928ef02 to
2f5e253
Compare
Signed-off-by: Steven Jin Xuan <sjinxuan@microsoft.com>
2f5e253 to
9048a69
Compare
|
@markdroth I would also appreciate some guidance on what you expect for testing. |
|
Sorry can you provide some context on this? /wait |
markdroth
left a comment
There was a problem hiding this comment.
@mattklein123 For context, see #35479 (comment).
@Stevenjin8, I'm not the right person to ask about testing for the Envoy implementation, so I'll let one of the Envoy maintainers do that. My feedback here is just on the xDS API changes.
Please let me know if you have any questions. Thanks!
Signed-off-by: Steven Jin Xuan <sjinxuan@microsoft.com>
Signed-off-by: Steven Jin Xuan <sjinxuan@microsoft.com>
Signed-off-by: Steven Jin Xuan <sjinxuan@microsoft.com>
|
Forgot to merge main. Should be ready for another review now (even though not much changed) |
Signed-off-by: Steven Jin Xuan <sjinxuan@microsoft.com>
Signed-off-by: Steven Jin Xuan <sjinxuan@microsoft.com>
Head branch was pushed to by a user without write access
|
/retest |
Signed-off-by: Steven Jin Xuan <sjinxuan@microsoft.com>
Signed-off-by: Steven Jin Xuan <sjinxuan@microsoft.com>
Signed-off-by: Steven Jin Xuan <sjinxuan@microsoft.com>
markdroth
left a comment
There was a problem hiding this comment.
Just one minor comment improvement needed -- otherwise, this looks great from an API perspective!
Signed-off-by: Steven Jin Xuan <sjinxuan@microsoft.com>
|
This looks great from an API perspective! /lgtm api |
mattklein123
left a comment
There was a problem hiding this comment.
Thanks for slogging through!
The main idea here is tackling #37145 (which is a follow up from #36353). This approach simplifies the code merging the two current implementation of DNS cluster (logical and strict) by removing unnecessary logical DNS, as it can be treated as a special case of strict DNS. According to the documentation: _When using **strict DNS** service discovery, Envoy will continuously and asynchronously resolve the specified DNS targets. Each returned IP address in the DNS result will be considered an explicit host in the upstream cluster. This means that if the query returns three IP addresses, Envoy will assume the cluster has three hosts, and all three should be load balanced to. If a host is removed from the result Envoy assumes it no longer exists and will drain traffic from any existing connection pools_ _**Logical DNS** uses a similar asynchronous resolution mechanism to strict DNS. However, instead of strictly taking the results of the DNS query and assuming that they comprise the entire upstream cluster, a logical DNS cluster only uses the first IP address returned when a new connection needs to be initiated. Thus, a single logical connection pool may contain physical connections to a variety of different upstream hosts. Connections are never drained, including on a successful DNS resolution that returns 0 hosts._ --------- Signed-off-by: Gustavo <grnmeira@gmail.com>
The main idea here is tackling envoyproxy#37145 (which is a follow up from envoyproxy#36353). This approach simplifies the code merging the two current implementation of DNS cluster (logical and strict) by removing unnecessary logical DNS, as it can be treated as a special case of strict DNS. According to the documentation: _When using **strict DNS** service discovery, Envoy will continuously and asynchronously resolve the specified DNS targets. Each returned IP address in the DNS result will be considered an explicit host in the upstream cluster. This means that if the query returns three IP addresses, Envoy will assume the cluster has three hosts, and all three should be load balanced to. If a host is removed from the result Envoy assumes it no longer exists and will drain traffic from any existing connection pools_ _**Logical DNS** uses a similar asynchronous resolution mechanism to strict DNS. However, instead of strictly taking the results of the DNS query and assuming that they comprise the entire upstream cluster, a logical DNS cluster only uses the first IP address returned when a new connection needs to be initiated. Thus, a single logical connection pool may contain physical connections to a variety of different upstream hosts. Connections are never drained, including on a successful DNS resolution that returns 0 hosts._ --------- Signed-off-by: Gustavo <grnmeira@gmail.com> Signed-off-by: Elisha Ziskind <eziskind@google.com>
TODO:
Commit Message: Refactor DNS cluster configuration in its own extension
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]