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

add new thread pool strategy for Consumer, allow all service calls to share the same thread pool. #5891

Merged
merged 2 commits into from
Mar 27, 2020

Conversation

chickenlj
Copy link
Contributor

@chickenlj chickenlj commented Mar 19, 2020

If you want to share one single thread pool for all services and requests, configure like this:

<dubbo:consumer threadpool="fixed" threads="700">
        <dubbo:parameter key="share-threadpool" value="true"/>
</dubbo:consumer>

There's no strict rules for which strategy is the best, every strategy has its pros and cons, just pick the one that is suitable for your case. Sharing the same fixed-size thread pool can be very helpful for Consumers working as a proxy.

@chickenlj chickenlj changed the title add new thread pool strategy for Consumer, allow all services share the same thread pool. add new thread pool strategy for Consumer, allow all service calls to share the same thread pool. Mar 19, 2020
@codecov-io
Copy link

Codecov Report

Merging #5891 into 2.6.x will decrease coverage by 0.08%.
The diff coverage is 72.72%.

Impacted file tree graph

@@             Coverage Diff              @@
##              2.6.x    #5891      +/-   ##
============================================
- Coverage     47.47%   47.38%   -0.09%     
+ Complexity     4609     4608       -1     
============================================
  Files           577      577              
  Lines         26509    26455      -54     
  Branches       4691     4694       +3     
============================================
- Hits          12585    12536      -49     
+ Misses        12007    12001       -6     
- Partials       1917     1918       +1     
Impacted Files Coverage Δ Complexity Δ
.../main/java/com/alibaba/dubbo/common/Constants.java 88.88% <ø> (ø) 1.00 <0.00> (ø)
...ibaba/dubbo/remoting/transport/AbstractClient.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...ba/dubbo/common/store/support/SimpleDataStore.java 94.44% <100.00%> (ø) 8.00 <1.00> (ø)
...ng/transport/dispatcher/WrappedChannelHandler.java 55.31% <100.00%> (+20.18%) 8.00 <4.00> (+4.00)
...alibaba/dubbo/rpc/protocol/thrift/ThriftUtils.java 63.15% <0.00%> (-12.26%) 6.00% <0.00%> (ø%)
...aba/dubbo/remoting/transport/mina/MinaChannel.java 42.25% <0.00%> (-11.27%) 15.00% <0.00%> (-1.00%)
.../remoting/transport/netty4/NettyServerHandler.java 72.22% <0.00%> (-11.12%) 6.00% <0.00%> (-1.00%)
...om/alibaba/dubbo/rpc/filter/ActiveLimitFilter.java 77.77% <0.00%> (-11.12%) 5.00% <0.00%> (-2.00%)
...ba/dubbo/remoting/transport/netty/NettyHelper.java 31.25% <0.00%> (-6.25%) 2.00% <0.00%> (ø%)
...onfig/spring/extension/SpringExtensionFactory.java 78.37% <0.00%> (-5.41%) 9.00% <0.00%> (ø%)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bada690...a189b39. Read the comment docs.

@chickenlj chickenlj added this to the 2.6.9 milestone Mar 27, 2020
@chickenlj chickenlj merged commit 585bb11 into apache:2.6.x Mar 27, 2020
@chickenlj chickenlj deleted the consumer-share-threadpool branch April 7, 2020 03:50
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.

2 participants