This project demonstrates microservices architectural pattern using the spring boot and spring cloud.
- Eureka Server - Open source service discovery server.
Microservices
- Product Service
- Coupon Service
Zuul API gateway
Helps put all the crossing cutting concerns in one single place like security,tracing and service aggregation and rate limits.
Zuul is just another microservice and it will register itself with Eureka.
API gateway as a single point of entry for all front end clients.
Zuul automatically gives us server side load balancing using Ribbon internally.
When invoking microservices from front end clients like Angular, invoke using this format
https://<servername>:8765/microservice-name/uriwhere 8765 is port for Zuul gateway server and microservice name is the name of the microservice registered under the Eureka naming server.
Feign
Develop rest clients using Feign instead of RestTemplate.
Eg. Coupon service is invoked from Product Service using Feign.
Helps avoid hardcoding of URLs.
Hystrix
Used for fault tolerance.
Is integrated within the product service.If coupon service is down, then product service handles errors gracefully.
Sleuth and Zipkin
* Used for request tracking. * Zipkin provides a dashboard to view the trace of a http request.
Config Server
- Used for centralized configuration management
- Requires the installation and running of Rabbit MQ .
- Can refresh client properties for all microservice instances by using the actuator endpoint - http://localhost:9090/actuator/bus-refresh








