Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the common components of microservices

Shulou Source: shulou.com Published: 2022-06-03 05:43:13 10月04日 Update

This article mainly introduces "what are the common components of micro-services". In the daily operation, I believe many people have doubts about the common components of micro-services. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the questions about "what are the common components of micro-services?" Next, please follow the editor to study!

Micro-service has been very popular in recent years. After going through some materials and getting rid of those mysterious projects that have not been implemented at present, I personally think that micro-service is just a new distributed system, gradually breaking up the traditional centralized business system. This technical route is not born out of thin air, but has a long origin, separated from the earlier SOA, business logic code and system code. The way of decoupling components such as front-end separation and so on.

At present, the common components of microservices that I understand are as follows:

Service Discovery-Netflix Eureka (Nacos)

Customer server load balancer-Netflix Ribbon (Ribbon)

Circuit breaker-Netflix Hystrix (Sentinel)

Service Gateway-Netflix Zuul (Spring Cloud Gateway)

Distributed configuration-Spring Cloud Config

Service discovery

A RESTful service that locates middle-tier services running in the AWS region (Region). It consists of two components: the Eureka server and the Eureka client. The Eureka server is used as the service registration server. The Eureka client is a java client that simplifies interaction with the server, acts as a polling load balancer, and provides failover support for services. Netflix uses a different client in its production environment, which provides weighted load balancing based on traffic, resource utilization, and error status.

Circuit breaker

A circuit breaker prevents an application from repeatedly trying to perform an operation that is likely to fail, allowing it to continue without waiting for fault recovery or wasting CPU cycles, and it determines that the fault is persistent. Circuit breaker mode also enables the application to detect whether the fault has been resolved. If the problem seems to have been corrected, the application can try to invoke the operation.

Service gateway

Similar to nginx, reverse proxy function, but netflix itself adds some features to work with other components.

Distributed configuration

The Ribbon client component provides a complete set of configuration options, such as connection timeout, retry, retry algorithm, and so on. Ribbon has built-in pluggable and customizable load balancing components.

Client load balancing

This is still static and needs to be updated dynamically with Spring Cloud Bus.

At this point, the study on "what are the common components of micro-services" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Services components customers clients Common Equalization faults Circuit Breakers servers Learning configuration distributed applications programs Systems applications Business Code more Gateways Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Huawei Microsoft Apple MariaDB