This is the 30th day of my participation in the August Challenge

If you don’t know about micro services, it is recommended to pit dad version, because Netflix ecosystem is no longer open source. Read on if needed.

1. Cluster, distributed, and load balancing servers are different

Cluster is a physical concept. It refers to a system that is deployed on multiple servers, and many servers are centralized to provide the same service. In the eyes of clients, it looks like only one server. Clusters can achieve high computational speed by using multiple computers for parallel computation.

As for the division of labor among cluster servers, the concept of load balancing needs to be introduced. Load balancing refers to the allocation of requests to multiple operation units, that is, servers deployed separately. Nginx is a commonly used reverse proxy server, which can be used for load balancing. Clustering and load balancing are closely related and can be understood in combination.

2. What is distributed

Distributed will focus on a system is divided into several business units, such as a portal site may have a login, video, pictures, etc., each of which can split out independent deployment, and each one can make it into a cluster, and video services cluster, photo service clusters, the primary system can be to call these subsystems, can have a call relationship between subsystems can also have no, Depending on the actual business situation.

3. Distributed advantages

  1. Increase system capacity. We need more than one machine to handle the growing volume of business. We need more than one machine to handle large-scale application scenarios. Therefore, we need to split business systems vertically or horizontally into a distributed architecture.
  2. Enhancement system available. As our business becomes more critical, we need to improve the usability of the entire system architecture, which means no single point of failure in the architecture. In this way, the whole system will not be unusable because of the failure of one machine. Therefore, the system needs to be redundant through distributed architecture to eliminate single point of failure and improve system availability.
  3. Because of modularization, the system module reuse degree is higher.
  4. Because software service modules are broken up, development and distribution can be faster in parallel.
  5. System expansibility is higher.
  6. Team collaboration processes will also improve.

4. The Spring Cloud

Spring Cloud is a complete framework for implementing microservices based on Spring Boot. It provides configuration management, service discovery, circuit breakers, intelligent routing, microproxy, control bus, global locking, decision campaign, distributed session, and cluster state management components required for microservice development. Most importantly, working with the Spring Boot framework makes it very convenient for you to develop cloud services with microservices architecture. Spring Cloud contains many sub-frameworks, among which, Spring Cloud Netflix is a set of frameworks developed by Netflix and later incorporated into the Spring Cloud family. It mainly provides modules including: Service discovery, circuit breaker and monitoring, intelligent routing, client load balancing, etc.

5. The Spring Cloud ecosystem

  1. The Spring Cloud Config configuration center utilizes Git to centrally manage the configuration of programs.
  2. Spring Cloud Netflix integrates with many of Netflix’s open source software
  3. Spring Cloud Bus Message Bus, which connects services and service instances together using distributed messages for propagating changes in state across a cluster.
  4. Spring Cloud for Cloud Foundry Integrates your applications with Pivotal Cloud Foundry
  5. Spring Cloud Cloud Foundry Service Broker provides a starting point for establishing a Service Broker that manages Cloud managed services.
  6. Spring Cloud Cluster abstracts and implements leadership elections and civilian state patterns based on Zookeeper, Redis, Hazelcast, Consul implementations.
  7. Spring Cloud Consul implements service discovery and configuration management based on Hashicorp Consul.
  8. Spring Cloud Security provides load balancing for OAuth2 REST clients and authentication header forwarding in the Zuul proxy
  9. SpringCloud Sleuth distributed tracking system for SpringCloud applications, compatible with Zipkin, HTrace, and ELK.
  10. Spring Cloud Data Flow a Cloud native application and operation model that comprises Data microservices on a structured platform.
  11. Spring Cloud Stream is a messaging microservice based on Redis,Rabbit,Kafka, and a simple declarational model for sending and receiving messages in Spring Cloud applications. 12. Spring Cloud Stream App Starters provide Spring integration for external systems based on Spring Boot.
  12. Spring Cloud Task is a short life cycle microservice that adds functional and non-functional features to SpringBooot application simple declarations.
  13. Spring Cloud Task App Starters
  14. The Spring Cloud Zookeeper service discovery and configuration management are based on Apache Zookeeper.
  15. Spring Cloud for Amazon Web Services fast integration with Amazon Web Services.
  16. Spring Cloud Connectors make it easy for PaaS applications to connect to back-end services like databases and message broking services on a variety of platforms.
  17. Spring Cloud Starters (project discontinued and merged with other projects in version after Angel.sr2)
  18. The Spring Cloud CLI plugin uses Groovy to quickly create Spring Cloud component applications.

6.Spring Cloud Common Components of Netflix

  1. Eureka, Service Registration and Discovery, provides a service registry, a client for service discovery, and a convenient interface to view all registered services. All services use Eureka’s service discovery client to register themselves with Eureka’s servers.
  2. Zuul, gateway, through which all clients request access to back-end services. It can use certain routing configurations to determine which service handles a URL. And get the registered service from Eureka to forward the request.
  3. The Ribbon sends a request to an application for a service. If a service has multiple instances started, the Zuul Gateway uses a load balancing policy to send the request to a service instance.
  4. Feign, a service client. If services need to access each other, you can use RestTemplate or Feign client to access each other. It uses the Ribbon by default for load balancing.
  5. Hystrix, monitoring and circuit breakers. We just need to add the Hystrix tag to the service interface, and we can implement the monitoring and circuit breaker function of this interface.
  6. Hystrix Dashboard, monitoring panel, which provides an interface to monitor the time consumed by service calls on individual services, etc.
  7. Turbine, monitoring aggregation, using Hystrix monitoring, we need to open the monitoring information of each service instance to see. Turbine can help us aggregate the monitoring information of all service instances into one place for unified viewing. So you don’t have to go from page to page

7. Spring Cloud flow chart