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 #1689

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

daizhenyu
Copy link
Collaborator

@daizhenyu daizhenyu commented Nov 29, 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.

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 35.15625% with 83 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...r/spring/interceptor/OkHttp3ClientInterceptor.java 0.00% 18 Missing ⚠️
...ring/interceptor/HttpAsyncClient4xInterceptor.java 0.00% 15 Missing ⚠️
...terceptor/HttpUrlConnectionConnectInterceptor.java 0.00% 13 Missing ⚠️
...er/spring/interceptor/HttpClient4xInterceptor.java 0.00% 11 Missing ⚠️
...sermant/router/spring/utils/SpringRouterUtils.java 0.00% 10 Missing ⚠️
...io/sermant/router/common/xds/XdsRouterHandler.java 73.91% 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 ⚠️
...plement/service/xds/route/XdsRouteServiceImpl.java 0.00% 1 Missing ⚠️
... and 1 more
Flag Coverage Δ Complexity Δ
unittests 44.17% <35.15%> (-0.02%) 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 76.31% <76.92%> (+4.22%) 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.26% <73.91%> (-3.56%) 0.00 <0.00> (ø)
...sermant/router/spring/utils/SpringRouterUtils.java 22.58% <0.00%> (-3.35%) 0.00 <0.00> (ø)
... and 4 more

... and 2 files with indirect coverage changes

@lilai23 lilai23 merged commit 331fb06 into sermant-io:2.1.x Nov 29, 2024
281 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.

3 participants