Tutorial on Microservices           in          Java

Microservices in Java Spring Boot,  How to build microservices in java?, Eureka, Resilience4j, Feign Client, Hystrix, Slueth, Zipkin, Spring Boot Admin Dashboard, Spring Boot Actuator etc.

@EnableEurekaServer We use Netflix Eureka to make a kind of server which can register the microservices & discover them when required by the other microservice. We call it Eureka Server or Discovery server. Every Microservice will register into the Eureka server with a service Id and Eureka server will have information(port, IP addresses etc.) of all the microservices running as client applications.

Netflix Eureka

@FeignClient(name=”ServiceId”). We also call it as Abstract Client or Declarative Rest Client. FeignClient is an interface, at runtime one class gets generated using Dynamic Proxy Pattern. This concept offers two annotations : @EnableFeignClients at starter class and define interface for one Consumer with annotation @FeignClient(name=”ServiceId”). we can get the load balancing feature enabled if we are using ‘Feign Client’ & ‘Eureka’.

Feign Client (Open Feign)

@CircuitBreaker, @RateLimiter,  @TimeLimiter,  @Bulkhead,   @Retry In order to implement complete Fault Tolerance, even including circuit breaker, we use Resilience4j API. It has multiple separate modules such as Rate Limiter, Time Limiter, Bulkhead, Circuit Breaker, Retry etc. We have separate annotations for each functionality as shown above.


Sleuth : Sleuth provides unique ids for the request flow. Further, the developer uses these ids to find out the flow of execution with the help of tools like Zipkin, ELK etc.  Zipkin : We use Zipkin in two parts : Zipkin Client and Zipkin Server. Zipkin Client contains Sampler which collects data from microservices with the help of Sleuth and provides it to the Zipkin Server.  In order to utilize the benefits of both tools, we should always add Zipkin Client’s dependency along with Sleuth in every microservice.

Zipkin & Sleuth

Spring Cloud Gateway is a simple, yet an effective way to route to APIs. It also offers implementation of various cross cutting concerns such as Security, Logging, Monitoring/metrics etc. It is built on top of Spring Webflux (A reactive programming approach), We need to add the dependency as given above in order to get features of Spring Cloud Gateway.

    Spring Cloud        Gateway


Lorem ipsum dolor sit amet, consectetur adipiscing elit.

The top five languages that are using Microservices are Java, Python, C++, Ruby and Golang. Again Microservices in Java is leading the table. Needless to say, our focus will only be on Microservices in Java that you are expecting from us to discuss here.