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