Open yanjunxiang-google opened 8 months ago
/assign @RyanTheOptimist @yanavlasov @adisuissa
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
/wait
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
Title: Happy Eyeball routines should not call sortAddress() in data path during creating connection
Description: Currently happy eyeball routine is calling sortAddress() in data. path when creating connection:
https://github.com/envoyproxy/envoy/blob/c9fb17a6fabd1d2030ce8f5192780e947a335e01/source/common/upstream/upstream_impl.cc#L531
https://github.com/envoyproxy/envoy/blob/c9fb17a6fabd1d2030ce8f5192780e947a335e01/source/common/network/happy_eyeballs_connection_impl.cc#L21
https://github.com/envoyproxy/envoy/blob/c9fb17a6fabd1d2030ce8f5192780e947a335e01/source/common/network/happy_eyeballs_connection_impl.cc#L103
If the address vector is relatively big, and rarely changes, which is normal, then this is very inefficient.
The code should try to sort the address in control plane, like DNS refreshing, when new addresses are added to the host, and store that sorted result in host. And data plane just use that sorted result.