-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Better handling of multiple hosts in VirtualService #51645
Labels
Comments
Do you see any problems for such change? |
We actually have exact logic like this for gateways: istio/pilot/pkg/networking/core/gateway.go Line 579 in 044be69
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
When user specifies more then one host in VirtualService, in envoy configuration there should be only one virutal host with all required domains.
Alternatives
Instead specifying multiple hosts in VirutalService, user can use EnvoyFilter to apply patch which will add custom domain to virtual host.
In my opinion it is problematic, because when application expose more then one port, user will need to patch multiple virtual hosts.
Affected product area
[ ] Ambient
[ ] Docs
[ ] Dual Stack
[ ] Installation
[ ] Networking
[x] Performance and Scalability
[ ] Extensions and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Affected features
[ ] Multi Cluster
[ ] Virtual Machine
[ ] Multi Control Plane
Additional context
We are migrating from our in-house envoy based service-mesh to istio.
We need to add custom host domain in VirtualService for easy migration to Istio from our own envoy based service-mesh. Without that migration will be very problematic for us.
We are fighting with huge difference in memory usage of data plane. We were looking what can cause such problems. And we find out that, if you specify multiple hosts in VirtualService it will create the same number of virtual hosts in envoy. Those virtual hosts are almost identical, the only difference is in name and list of domains.
So we removed additional hosts from VirutalService and memory consumption of istio data-plane drastically decrease.
In small service the difference is 100MB.
For service with
*/*
the difference is 3.5.GBAfter that we patched envoy with EnvoyFilter to add custom domains to virtual hosts and we didn't observed any significant changes in memory consumption.
How to reproduce that
You just need to apply VirtualService
Then just grab config from envoy via
istioctl d envoy
.I were using bookinfo example app. And here is example route config with multiple virtual hosts
Possible implementation
I'm not very familiar with istio code, but I briefly checked and it should be very easy to implement.
Here hosts from VirtualService are split based on existence in service registy.
And then here it is used to create virtual host. I think that it just need a little changes to create one virtual host with all required domains.
The text was updated successfully, but these errors were encountered: