Skip to content

nj11/springcloud

Repository files navigation

Microservices with springcloud

This project demonstrates microservices architectural pattern using the spring boot and spring cloud.

Spring cloud compnents:

  • Eureka Server - Open source service discovery server.

Alt desc

  • 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/uri where 8765 is port for Zuul gateway server and microservice name is the name of the microservice registered under the Eureka naming server.

Alt desc

Alt desc

  • 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.

    Alt desc

    Alt desc

    • Sleuth and Zipkin

       * Used for request tracking.
       
       * Zipkin provides a dashboard to view the trace of a http request.
      

Alt desc

Alt desc

Alt desc

  • 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

Alt desc

About

Spring cloud microservices architecture with examples of how to containerize microservices using Docker and deploy them using an AWS container orchestrator like ECS.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors