First, what is the microservices architecture
MicroServices are a design style on a system architecture that is designed to split a separate system into smaller services that run in separate processes and communicate between services through an HTTP-based restful API. Each of the small services that are broken up is built around one or more coupled business functions in the system, and each service maintains its own data storage, business development, automated test cases, and standalone deployment mechanisms.
Second, the service invocation mode
In a service architecture, you typically use two service invocation methods:
1), the use of HTTP RESTful API or lightweight message sending protocol, to achieve information delivery and service invocation trigger.
2), by passing messages on the lightweight message bus, similar to RABBITMQ, and other middleware that provides reliable asynchronous switching.
Introduction of Spring Cloud
Spring Cloud is a development tool for microservices architectures based on the spring boot implementation. It provides a simple development method for configuration management, service governance, circuit breaker, intelligent routing, micro-agent, Control bus, global lock, decision campaign, distributed reply and cluster state management in the MicroServices architecture.
Spring Cloud contains several sub-projects, as described below.
1) Spring Cloud Config: Configuration Management tool, supports the use of git storage configuration content, can use it to implement the application configuration of the external storage, and support client configuration information refresh, encryption/decryption configuration content and so on.
2) Spring Cloud Netflix: Core components to integrate a Netflix OSS open source suite.
- Eureka: A service governance component that contains the implementation of a service registry, service registration, and discovery mechanism.
- Hystrix: Fault-tolerant management components that implement circuit breaker patterns, help with latency in service dependencies, and provide robust fault tolerance for failures.
- Ribbon: The service invocation component of the client load balancer.
- Feign: A declarative service invocation component based on ribbon and hystrix.
- Zuul: Gateway component, providing intelligent routing, access filtering and other functions.
- Archaius: The external configuration component.
3) Spring Cloud bus: event, message bus, used to propagate state changes or events in a cluster to trigger subsequent processing, such as for dynamic refresh of the configuration.
4) Spring Cloud Cluster: The implementation of the Zookeeper, Redis, Hazelcast, consul election algorithms and common State mode.
5) Spring Cloud Cloudfoundry: Integrated support with pivotal Cloudfoundry.
6) Spring Cloud Consul: Service discovery and Configuration management tools.
7) Spring Cloud Stream: Consumer MicroServices implemented with Redis, rabbit, or Kafka can send and receive messages through a simple declarative model.
8) Spring Cloud AWS: A component for simplifying the integration of Amazon Web service.
9) Spring Cloud Security: Safety Toolkit, which provides repeaters for OAUTH2 client requests in the Zuul agent.
A distributed tracking implementation of Spring Cloud Sleuth:spring cloud application that integrates Zipkin seamlessly.
Spring Cloud Zookeeper: Zookeeper-based service discovery and configuration management components.
Spring Cloud Starters:spring Cloud's base component, which is the base dependent module for spring boot-style projects.
Spring Cloud CLI: Spring Boot CLI Plug-in for quick creation of spring cloud apps in groovy.
......
Basic knowledge of Spring cloud MicroServices