envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.99k stars 4.81k forks source link

mobile: performance improvements for significant number of virtual clusters #24978

Open Augustyniak opened 1 year ago

Augustyniak commented 1 year ago

Title: Implement performance improvements that would allow Envoy Mobile to run multiple hundreds of virtual clusters without performance impact to the app launch

Description: Adding hundreds of virtual clusters to Envoy Mobile results in negative performance impact to the application launch time (the negative performance impact was observer after adding 700-900 virtual clusters). An application may want to add a lot of virtual clusters if it's interested in tracking stats for multiple routes/endpoints. An application launch time is an important metric from the perspective of any mobile app.

There are multiple contributing factors in here:

  1. JSON/YAML parsing being expensive https://github.com/envoyproxy/envoy/issues/24976
  2. Regex matching in EM's config: https://github.com/envoyproxy/envoy/blob/fb48a7d2d41e6237640d73d5ec39d103feb8e73e/mobile/library/common/config/config.cc#L507-L508. It was discussed in https://github.com/envoyproxy/envoy/pull/24733.
  3. Some further optimization that are being discussed/prototyped in https://github.com/envoyproxy/envoy/pull/24521
Augustyniak commented 1 year ago

cc @jpsim

Augustyniak commented 1 year ago

On top of the performance related to the CPU usage there are also some improvements related to data bandwidth usage (over the wire)

github-actions[bot] commented 1 year ago

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.

github-actions[bot] commented 1 year ago

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.