Spring Cloud 与 Dubbo

Introduction

Spring Cloud is an ordered collection of a series of frameworks. It uses Spring Boot's development convenience to cleverly simplifies the development of distributed system infrastructure, such as service discovery registration, configuration center, message bus, load balancing, circuit breakers, data monitoring, etc., can all be done in Spring Boot development style To one-click launch and deployment.

Spring does not re-manufacture wheels, it just combines the relatively mature and practical service frameworks developed by various companies, and uses Spring Boot style to repackage and shield complex configurations and implementation principles, and finally develop The authors set aside a set of distributed system development kits that are easy to understand, easy to deploy, and easy to maintain.

Currently the latest version: Dalston.SR3

Official website: http://projects.spring.io/spring-cloud/

characteristic

Spring Cloud focuses on providing good out-of-the-box experience with typical use cases and scalability mechanism coverage.

  • Distributed/versioned configuration

  • Service registration and discovery

  • routing

  • service-to-service call

  • Load balancing

  • breaker

  • Distributed messaging

Subproject

The sub-projects of Spring Cloud can be roughly divided into two categories. The first category is the encapsulation and abstraction of the existing mature framework "Spring Boot", which is also the largest number of projects; the second category is the development of a part of the infrastructure of a distributed system Realization, for example, Spring Cloud Stream plays a role such as kafka and ActiveMQ. For developers who want to quickly practice microservices, the first type of sub-projects are sufficient, such as:

  • Spring Cloud Netflix

It is an encapsulation of a distributed service framework developed by Netflix, including service discovery and registration, load balancing, circuit breakers, REST clients, request routing, etc.

  • Spring Cloud Config

Externally store the configuration information, and can cooperate with Spring Cloud Bus to dynamically modify the configuration file.

  • Spring Cloud Bus

Distributed message queue is an encapsulation of Kafka and MQ.

  • Spring Cloud Security

It is an encapsulation of Spring Security, which can implement authentication calls and security protection between services, and can be used with Netflix.  

  • Spring Cloud Zookeeper

The encapsulation of Zookeeper enables it to be used by other Spring Cloud sub-projects.

  • Spring Cloud Eureka

It is part of the Spring Cloud Netflix microservice suite. It is based on Netflix Eureka to do a secondary subassembly, and is mainly responsible for completing the service governance function in the microservice architecture.

prospect

Spring Cloud is a boon for small and medium-sized Internet companies, because such companies often do not have the strength or sufficient funds to develop their own distributed system infrastructure. Using Spring Cloud one-stop solution can calmly deal with business Greatly reduce development costs while developing. At the same time, with the popularity of the microservice architecture and Docker container concept in recent years, Spring Cloud will also have a place in the increasingly "cloud" software development style in the future, especially in the current diverse distributed solutions. Provides a standardized, full-site technical solution, the significance may be comparable to the birth of the current Servlet specification, effectively promoting the progress of the server software system technology level.

Comparison with dubbo

Component Dubbo Spring Cloud
Service Registry Zookeeper Spring Cloud Netflix Eureka
Service invocation method RPC REST API
Service gateway no Spring Cloud Netflix Zuul
breaker imperfect Spring Cloud Netflix Hystrix
Distributed configuration no Spring Cloud Config
Service tracking no Spring Cloud Sleuth
Message bus no Spring Cloud Bus
data flow no Spring Cloud Stream
Batch task no Spring Cloud Task
... ... ...

Therefore, the comparison shows that there is no comparison. Dubbo is only a subset of Spring Cloud. Spring Cloud is a series of distributed solution packages. However, with the current Dubbo official re-declaration of maintenance and attention, the Dubbo ecosystem will gradually become stronger.

Guess you like

Origin blog.csdn.net/keepfriend/article/details/113591980