Microservice’s independent scaling can improve overall performance. But how, and how much ? – Part 2, different minimum computing resource

In previous article we brought up the question, and we had a conclusion:

If services need the same minimum computing resource to run, 
then the performance of monolith and the performance of micro-services are the same. 

In this article we’ll example how it is like if the services have different minimum computing resources


See conclusion

Method and Assumptions

The methods and assumptions are basically the same as previous article .

Difference is A and B here will have the same RT, but different minimum compute units (machine hardware) .

A and B run in parallel

Parallel, request distribution is A:B = 1:1

Parallel, request distribution is A:B = 1:2

Parallel, request distribution is A:B = 2:1

Parallel, request distribution is A:B = 4:1

A summary of parallel mode

Request distributionBundled or DistributedQPS/CUWeighted QPS/CUWinner

The performance in distributed mode is better than or equal to that in bundled mode. Specifically,

  • In bundled mode, if the request distribution makes you have to let some computing resource be idle some time (there is 0.5s idle in 1:1 and 1:2) while others are working, then its performance will be worse than that in distributed mode.
  • Otherwise, the performance will be the same.

A and B run in series

A calls B

B calls A

A summary of serial mode

Who calls whoBundled or DistributedQPS/CUWeighted QPS/CU
Light service calls heavy serviceBundled0.331
Heavy service calls light serviceBundled0.331

The performance of bundled mode and the performance of distributed are always the same!

Why? if you check the diagrams above, you can see even in bundled mode, the compute resources are never idle.


If services have different minimum computation resources,

Service topologyPerformance winerCaveat
Services in parallelRequest distribution will cause some idle time regardless of instance allocationDistributed mode
Request distribution won’t cause some idle time if instance allocation is goodDraw
Services in seriesIn a perfect world where scaling up can lead to linear performance improvementDraw

The previous article and this article are using assumptions in an ideal world. For more discussions in a real word, please check part 3

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.