Spring Cloud Demo
Project Address: Https://github.com/hackyoMa/spring-cloud-demo
Component
Spring Cloud Demo based on spring Boot 2.0.4, Spring Cloud FINCHLEY.SR1
Examples of the following components are included:
- Eureka (service registration and discovery)
- Feign (service consumer)
- Zuul (Routing Gateway)
- Turbine (Circuit breaker aggregation monitoring)
- Zipkin (service link Tracking)
- Spring Boot Admin (Service Monitoring Center)
- Spring Cloud Config (Service configuration Center)
Component architecture
- External or internal non-spring cloud project Unified access to internal services via API Gateway (Zuul)
- After the gateway receives the request, it obtains the available services from the registry (Eureka)
- distributed to specific instances after load balancing by the Ribbon (feign integration)
- Communication between MicroServices via feign
- Hystrix (feign integration) is responsible for processing the service timeout fuse
- Spring Cloud config for unified management of service configurations
- Turbin the fuse information of the monitoring service
- Zipkin call information between monitoring services
- Spring Boot Admin monitors the operation status and properties of the service and other related information
Related address
- Registration Center Address: http://localhost:8881/
- Direct call to service address: http://localhost:8882/hi?name=6666
- Calling address via feign: http://localhost:8884/hi?name=6666
- Feign's Hystrix information: Http://localhost:8884/hystrix
- Call address via Zuul (config authentication): http://localhost:8885/feign/hi?name=6666&token=1234
- Turbine Information Address: Http://localhost:8886/turbine.stream
- Zipkin Information Address: http://localhost:9411/zipkin/
- Spring Cloud config Test address: Http://localhost:8888/eureka-client/dev
- Dynamic Refresh configuration (need to install rabbit MQ, send POST request): Http://localhost:8882/actuator/bus-refresh
- Spring Boot Admin Service address: http://localhost:8887
Spring Cloud Usage Sample