Skip to content
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

xDS router performance optimization #1681

Merged

Conversation

daizhenyu
Copy link
Collaborator

@daizhenyu daizhenyu commented Nov 25, 2024

What type of PR is this?

Refactor.

What this PR does / why we need it?

The code logic of xds router is optimized to improve performance.
The extra CPU usage decreases to 1.5%, and the call delay decreases to 0.1 ms.

Which issue(s) this PR fixes?

Fixes #1680

Does this PR introduce a user-facing change?

No

Checklist

  • Make sure there is a GitHub_issue related with this PR before you start working on it.
  • Make sure you have squashed your change to one single commit.
  • GitHub Actions works fine in this PR.

@daizhenyu daizhenyu force-pushed the develop-xds-router-optimize branch from 622f881 to 7658d16 Compare November 25, 2024 06:18
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 37.32394% with 89 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...r/spring/interceptor/OkHttp3ClientInterceptor.java 0.00% 17 Missing ⚠️
...o/sermant/router/common/metric/MetricsManager.java 36.84% 12 Missing ⚠️
...ring/interceptor/HttpAsyncClient4xInterceptor.java 0.00% 12 Missing ⚠️
...terceptor/HttpUrlConnectionConnectInterceptor.java 0.00% 12 Missing ⚠️
...er/spring/interceptor/HttpClient4xInterceptor.java 0.00% 10 Missing ⚠️
...sermant/router/spring/utils/SpringRouterUtils.java 0.00% 10 Missing ⚠️
...io/sermant/router/common/xds/XdsRouterHandler.java 75.00% 5 Missing and 1 partial ⚠️
...io/sermant/router/common/utils/XdsRouterUtils.java 50.00% 2 Missing and 2 partials ⚠️
...eptor/OkHttpClientInterceptorChainInterceptor.java 76.92% 2 Missing and 1 partial ⚠️
...ice/xds/loadbalance/XdsLoadBalanceServiceImpl.java 0.00% 1 Missing ⚠️
... and 2 more
Flag Coverage Δ Complexity Δ
unittests 44.03% <37.32%> (+0.11%) 181.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ Complexity Δ
...service/xds/discovery/XdsServiceDiscoveryImpl.java 72.34% <100.00%> (+0.60%) 0.00 <0.00> (ø)
...t/router/common/xds/lb/XdsLoadBalancerFactory.java 68.75% <100.00%> (ø) 0.00 <0.00> (ø)
...rmant/router/spring/utils/BaseHttpRouterUtils.java 93.54% <100.00%> (-6.46%) 0.00 <0.00> (ø)
...ice/xds/loadbalance/XdsLoadBalanceServiceImpl.java 87.50% <0.00%> (-12.50%) 0.00 <0.00> (ø)
...plement/service/xds/route/XdsRouteServiceImpl.java 85.71% <0.00%> (-14.29%) 0.00 <0.00> (ø)
...er/spring/interceptor/LoadBalancerInterceptor.java 61.29% <66.66%> (ø) 0.00 <0.00> (ø)
...eptor/OkHttpClientInterceptorChainInterceptor.java 60.00% <76.92%> (+1.81%) 0.00 <0.00> (ø)
...io/sermant/router/common/utils/XdsRouterUtils.java 76.31% <50.00%> (+2.78%) 0.00 <0.00> (ø)
...io/sermant/router/common/xds/XdsRouterHandler.java 78.49% <75.00%> (-2.69%) 0.00 <0.00> (ø)
...er/spring/interceptor/HttpClient4xInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
... and 5 more

... and 32 files with indirect coverage changes

@lilai23 lilai23 changed the title xds router performance optimization xDS router performance optimization Nov 25, 2024
@daizhenyu daizhenyu force-pushed the develop-xds-router-optimize branch from 7658d16 to 37aefc5 Compare November 25, 2024 08:58
@daizhenyu daizhenyu force-pushed the develop-xds-router-optimize branch 2 times, most recently from ec29bab to 3644bdc Compare November 26, 2024 08:38
lilai23
lilai23 previously approved these changes Nov 26, 2024
@daizhenyu daizhenyu force-pushed the develop-xds-router-optimize branch 3 times, most recently from 09e778b to 474c7c2 Compare November 27, 2024 02:40
lilai23
lilai23 previously approved these changes Nov 27, 2024
@daizhenyu daizhenyu force-pushed the develop-xds-router-optimize branch 3 times, most recently from 114e963 to fa32ef4 Compare November 28, 2024 08:28
lilai23
lilai23 previously approved these changes Nov 28, 2024
@Sherlockhan Sherlockhan merged commit d7a054d into sermant-io:develop Nov 29, 2024
300 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

the xds router performance needs to be improved
5 participants