Spring Boot and Spring Cloud Microservice Architecture

Contact me if you need SpringCloud video

QQ:2583606117

Introduction to Spring Cloud

 

Spring  Cloud is a cloud application development tool based on Spring Boot. It provides configuration management, service discovery, circuit breaker, intelligent routing, micro-agent, control bus, global lock, decision-making campaign, distributed Operations such as session and cluster state management provide an easy way to develop.

Comparison of Spring Cloud and Dubbo

When it comes to Dubbo, I want to mention ESB by the way. CCTV Xinhua News Agency is also using ESB for task scheduling. Here is a comparison between Dubbo and ESB:

 

  • ESB (Enterprise Data Bus) generally adopts centralized forwarding of requests, which is suitable for the integration of a large number of heterogeneous systems, and focuses on the arrangement of tasks. Performance problems can be avoided through heterogeneous methods, and cannot support particularly large concurrency.
  • Dubbo (service registration management) uses distributed calls. The registration center only records address information, and then makes direct calls, which is suitable for concurrent and stressful situations; it focuses on service governance, granulating each service, and each sub-business The system completes the business arrangement in the program logic.

 

Returning to the topic, what is the difference between Spring Cloud and Dubbo? First of all, let's take a look at the similarities. Both of them have functions related to distributed service governance, and both can provide service registration, discovery, routing, load balancing, etc. Speaking of which, Dubbo seems to have so many functions, but Spring Cloud is a perfect solution to provide a complete set of enterprise-level distributed cloud applications, which can be combined with Spring Boot and Docker to achieve rapid development, so Dubbo only has Spring Part of the RPC function of Cloud, and it's not good or bad. However, the Dubbo project has stopped updating. Taobao replaces dubbo with hsf. I think more people will tend to Spring Cloud.

From the development point of view, Dubbo is often combined with Spring and zookeeper, and the implementation only configures the service address, name, and port through xml. The intrusiveness of the code is very small. Compared with Spring Cloud, its implementation requires class annotations, etc. How many somewhat invasive.

Spring Cloud subproject

 

Spring Cloud includes multiple sub-projects (for multiple different open source products involved in distributed systems), which were also introduced in the first chapter, such as: Spring Cloud Config, Spring Cloud Netflix, Spring Cloud CloudFoundry, Spring Cloud AWS, For projects such as Spring Cloud Security, Spring Cloud Commons, Spring Cloud Zookeeper, and Spring Cloud CLI, you can skip to (1) to see.

configuration service

Spring Cloud provides Config Server, which has the function of external configuration in distributed system development. Through Config Server, we can centrally store the configuration files of all applications. Config Server supports Git or places configuration files in the file system (GitLab). Usually, we use different formats to distinguish different configuration files for different applications. In the cloud computing environment, it is customary to use YAML configuration, and the location of the general configuration file is placed in the config directory under the classpath.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326280386&siteId=291194637