spring cloud microservice

Project service, very popular recently; Spring Clound and Dubbo

Dubbo (Double reading) RpC just implements service governance (registration discovery, etc.), and there are many sub-projects under Spring Cloud covering all aspects of the microservice architecture

spring cloud Chinese network

Actual combat of distributed system architecture based on Dubbo

Spring Cloud Microservices Practical Video Course 51CTO   Zhou Li



Dragon Fruit Academy - Spring Cloud Season 1


Programmer DD Spring Clound series   master spring boot github source code 

Master-Zhangxd-Spring boot Cloud


Advantage:

1: Development is relatively simple 

2: The technology stack is flexible (microservices: the technology stack is very flexible, and different functions are implemented in different languages;)

3: Service independent decoupling 

4: High possibility

Disadvantages and challenges:

1: Increased maintenance and deployment complexity 2: Inter-service communication costs 3: Data consistency (distributed things) 4: System integration testing


Microservice registration logic: service center, service provider, service consumer (service consumption goes to the service center to subscribe services, service provider goes to the service center to register the service, and the service center is responsible for managing consumption and providers)

Service registration components: Eureka  [ureka] Eureka


Load balancing implementation 1: The server is responsible for balancing, using ngxin reverse proxy 2: Using the ribbon client to achieve load balancing, polling, , , methods will be used from multiple clients

feign   sub- client


Spring cloud's service registration and discovery, not only eureka , but also Zookeeper and Consul . The default is eureka. Spring encapsulates eureka, making it very simple and easy to use. It only needs to add a line of code compared to traditional applications. This line of code is an annotation. We implement the service registration and discovery functions as follows.
zookeeper : Zookeeper


I decided to start with Spring Cloud Netflix, which provides the following features:

  • Service discovery: Eureka-server instance, as a service provider, can be registered in the service registry, and Eureka clients can discover instances through Spring-managed beans;
  • Service discovery: Nested Eureka services can be created through declarative Java configuration files;
  • Circuit breaker: Using annotations, you can create a simple Hystrix client;
  • Circuit breaker: An embedded Hystrix control panel can be created through a Java configuration file;
  • Declarative REST client: Use Feign to create declarative, templated HTTP clients;
  • Client Load Balancer: Ribbon
  • Routers and Filters: Zuul can provide routing functions, authentication, service migration, canary publishing, etc. in a microservices architecture.

This article plans to use Eureka to implement a short-answer example of service registration and discovery. Three roles need to be created: service registry, service provider, and service consumer.


Links




Guess you like

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