02. Understanding Netflix OSS

9 minutes
Share the link to this page
Copied
  Completed

Transcript

Session, let us get an understanding about Netflix oysters, and Spring Cloud Netflix. Oysters open source software. Netflix voices is a framework plus library which is used for building micro services. The self got its own runtime containers, libraries and services. With the help of which you can build micro services. You can go to the browser and search for Netflix who uses let me show you directly.

Here I have searched for Netflix voices. I am going in with the first to the Netflix Open Source Software Center. It is from GitHub. You can just go through the site to understand more about Netflix oysters. What actually we are doing with this Netflix is for we are using Netflix for building micro services. It has got its own components with the help of which you can create scalable micro services.

I will go back to my slides. The components of Netflix voices that are used for developing micro services are Eureka hystrix those ribbons and Fie Eureka This is the service registry. Whenever you are creating micro services, they have to be registered in the service registry only then it will be available for the client of these micro services. The clients can be either another micro service or it can be a web application. So, for example, if you are developing an application like online that you are not going to create it as a monolithic application, you are going to develop it as loosely coupled services, order service Inventory Service cart service, user service, history service and so one. In this case, order service can be assigned to Inventory Service a web application can be a client for order service.

So, what actually they will do is they will go and check in the registry for the Service Act that they want order service or to go and check in the registry for Inventory Service. Okay. Now, your microphone services which comprise one book application, all these micro services are registered in the Eureka service registry. Next, let us talk about his six hystrix has a latency and fault tolerance library when one multiple Microsoft services are there, and when you are trying to ask if any of the micro service is down. If an exception occurs in any of the micro service, in that scenario, you may want to show the exception to the user. Instead, you want to show a fallback method that can be done with the help of hystrix.

So He takes a surprise tolerance library. And if you want to monitor the performance of a micro service, how many requests to scattering? What is the traffic that is coming into this application and how long it can tolerate exceptions. If you want to know more about your micro service, you need to use hystrix. Then Zoo zoo is a gateway service. It has like a gatekeeper.

You are Have you are in a micro service a Cobalts, like my super micro service complex one application. When a web application from an outside world wants to connect to this micro service. They don't have to touch the micro service directly they can go through the zone. zone is a gateway service which is used for filtering the request based on the authentication. It is used for monitoring. Then it is used for routing dynamically routes the services based on the name that you have given and it is also used For security purpose, it means are the mean that whatever request is coming from the fronton they have to pass on these rules, they cannot pass to the micro service directly you will not know in which server or in which port number that particular micro service is running.

Next Ribbon Ribbon is a client side load balancer. assume you've got two micro services order service an inventory service. Now, my instances of inventory services running this particular client or a service wants to connect to Inventory Service but there are multiple instances. We don't know whether the server is up and running or not which server is proper. So with the help of ribbon, we can achieve this ribbon will go and check in for the service availability. What is the traffic there based on the configuration that we have provided this order service can connect to Inventory Service repair is responsible for identifying the server and connecting to With free service, I hope it is clear.

So Reuben is a client side load balancer. And of course on a server side load balancer. The last component is seen seen as a declarative web service client. You may also write a client to access a REST API. We have done it already. When we were learning spring MVC, we need to use this template identify the URL with the URL purpose, we were connecting to the REST API.

But with fin it is not required. fee helps to create the client for a micro service. With seeing Of course, you can also achieve fault tolerance, it will take care of the hysterics part. And also it will take care of the low balancing part also. So the scene you don't have to use this template. It has to responsible for generating the client side code to connect to a micro service.

It allows us to take care of the fallback part that is the fault tolerance and it'll also take cannot be load balancing part. These are the components of Netflix choices. Let me just show you a simple pictorial representation. Say for example, I bought a micro service a COBOL. I have got order service. The same example only I'm talking about connecting to Inventory Service.

Then I've got user service. Then cart service, talking to order order talking to inventory. User service wants to search for books so he can connect to inventory directly. So there are multiple loosely coupled services available. There is a bit back then it's a web app. It can be from the desktop or it can be a normal client or a mobile client.

They cannot talk to the micro service directly they care they have to connect only through Zul the lunacy gateway API, and both the mobile client and the desktop client connects to doulas responsible for identifying the micro services. And on how actually jewel will identify, it is also going to check in the Eureka service registry, all these services, they are all I mean, they have all registered themselves to the service registry. And one more thing, this cart service is a client for Inventory Service. So this cart can have a ribbon and also can have free so that declarative web service client can be generated for our service, and also for God service. I will just show you a proper picture of this. You can just have a look.

This is the application. I have got web app mobile app API integration, which is from the outside world, they are connecting to the micro service ecosystem through Zul Zul is the gateway service API. And each service can have ribbon fin and hystrix. attached to it. ribbon so like I mean, Robin has a load balancer features a declarative web service and his sixes for fault tolerance. We will be talking about the real feature in the upcoming session.

Next, let us also understand about the Spring Cloud micro service and Netflix. Whenever you want to develop micro services using spring, you need to use the Spring Cloud Netflix. It provides Netflix oysters integration for Spring Boot. So these are the things service for service discovery you need to use Netflix Eureka for load balancer ribbon fault tolerance hystrix. And there are much more. These are the libraries which we'll be using by while creating a Spring Boot application so that we can utilize the components of Netflix oysters in our micro service application.

This is about Spring Cloud Netflix. In the upcoming sessions, we will be learning all the components of Netflix oysters, these are the examples that I have shown you in the upcoming sessions. So first one is creating a server then creating a micro service how to access one micro service from another micro service, how to use his fig jewels, ribbon and feel So, these are the examples that I have created for your understanding I have shown this particular slide is all about Netflix releases. Thank you

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.