Posts

Showing posts with the label Netflix

MicroServices: Spring cloud ribbon with Discovery Server

Image
In this article, I am going to share my knowledge on Spring Cloud Ribbon and how can we use Ribbon with RestTemplate as well as with Feign Client. We will also see how Enabling discovery Sever will improve the scalability of Microservice. Before jumping into Spring Cloud, I am assuming you must be having knowledge of Eureka Server, Feign Client, and Client-Side load balancer. If not then read my below blog before jumping to Spring Cloud ribbon. Also, I am going to use my existing code to implement Ribbon . URLs: Declarative REST Client: Feign Microservices: Service Registry and Discovery Netflix Hystrix Circuit Breaker In my previous blog, I have already talked about the Eureka Server and how other applications are taking advantages of Eureka Server to fetch the host/port of client application. We have seen that three microservices application are up and running i.e. Discovery Server Product Service Price Service Where Product and Price service will register themselves to...

Netflix Hystrix Circuit Breaker

Image
Netflix Hystrix Circuit Breaker In one of my previous blogs, I have already discussed the Circuit breaker pattern and its usage, Today, we will see how can we implement it in our application using Spring Cloud Netflix Hystrix . In this document, I’ll walk you through the process of applying circuit breakers to potentially-failing method calls using the Netflix Hystrix fault tolerance library. Hystrix is watching methods for failing calls to related services. If there is such a failure, it will open the circuit and forward the call to a fallback method. To understand it in a better way, I’ll take the same problem statement that I have already discussed in my previous blog i.e. E-commerce Portal.  I am assuming you must be aware of Spring boot framework as this implementation is completely based on it. As per problem statement, we need two applications i.e. Product Service & Price Service but in this tutorial, I’ll talk about just Product Service as Price Service ...