Previous projects have been used Dubbo, lately SpringCloud More fire , It happens that this period is quite special , I studied it at home SpringCloud, But in the process of learning, we found that SpringCloud It's not necessarily for everyone : It's mainly about communication protocols ,Springcloud use HTTP Of REST agreement ,Dubbo use RPC call .

1, It is not recommended for projects with high performance requirements SpringCloud【 and Dubbo In comparison with , Performance difference at least twice 】

2, The project was completed by Java Project composition is not recommended SpringCloud【 If it's Cross lingual , use Springcloud Better , after all REST agreement 】

3, The project requires fast development progress 【Dubbo Just define an interface , however SpringCloud Of REST The convenience of agreement is also a double-edged sword , Interface consistency is difficult to control 】

Make one Jmeter Let's have a performance test . The test is simple , namely dubbo Make one (provider,consumer One for each ),springcloud Make the simplest demo(consumer One ;provider Fang I started two , Otherwise, the concurrent number of pressure test will die soon , The parameters are simply optimized ), Then use the Jmeter Carry out pressure test , You're interested in doing it yourself . Here is a snapshot of the results to share .

Jmeter The number of threads for is set to 1000, loop 100 second .

One ,Dubbo pattern 17 Run in seconds 10w Requests .

Two ,SpringCloud pattern 51 Run in seconds 10w Requests .

 

The boss must like it SpringCloud You can use it .

Of course, different people have different opinions , You can use whatever you like . After all, a black cat and a white cat are good cats when they catch mice .

 

=======================================================

Let's follow up with some technical dry goods , Study hard by yourself .

SpringCloud Component architecture for

Dubbo The framework of

 

Dubbo and SpringCloud Performance comparison of

 

Technology
©2019-2020 Toolsou All rights reserved,
Final review of database : Summary of comprehensive application questions use Python Make simple games Laplance operator ( Second derivative ) Convert hard disk to GPT Partition format Python Implementation of Hanoi Tower code about String How to create objects vue3 Learning journey 1—— establish vue3 project java String from back to front _Java String String summary use Python Write a story about plants versus zombies 【 Greedy Algorithm 】 Huffman coding problem