Hey there welcome back friends. In this video we will talk about micro services. So let's get started. Reference when it comes to micro services, what are micro services? micro services? Are micro services deployed in different environment?
And that the micro services communicate with each other and definitely for the user. It's a single application. But this is cool this is nice but how the internal communication will take place? Or the answer could be the obvious answer could be that the communication will take place on network. Whether that is cool, but the addresses of the microservices may change time to time. For example, the apps may be removed from the development environment, new development or new microservices may be deployed in the development environment.
The addresses of the microservices may change. Moreover, a single micro service might be deployed into multiple environment for load balancing, even that is possible. Now, in order to automate all of these stuff, or in other words, in order to work with all of this dynamic environment, there are two things which we can do. Let us try to understand how we can resolve that versus what are the two solutions, which we can think of. First solution is hard coding the URL, the solution which we are using as of now, but hard coding the URL have definite disadvantages, because definitely, we are hard coding the stuff every time the address changes, we have to change the hard coded URL, and that is the scope of human error. Again, so hard coding the URL isn't a best solution.
The second solution is the use offered Discovery Service, not this Discovery Service well discover these micro services and provide the appropriate paths that to dynamically. So, Discovery Service is the way to go. So, when it comes to Discovery Service, there are two type of Discovery Service client side Discovery Service, we can note off the name it is client side. So much of the work will be done by client. Then there is the obvious next type of it is server side service discovery, where the server will likely do much of the work when it is client side service discovery client will do much of the work when it comes to server side service discovery definitely server will do much of the work. Let us start to understand how these architecture work.
First of all, we will discuss about client side service discovery The bad client will first ask for the address to the Discovery Service, the Discovery Service will give the address and finally based on the address, the client will communicate with the service. Definitely here client is doing much of the work. As a result the name is client side service discovery, definitely here much of the work is done by the client, but the dependency on the Discovery Service is less and for example, for some reason, the Discovery Service is not present. Even caching is something which is done in the background and for some time, using the cache again, the application may survive the application may still work even if the Discovery Service is not present for some time. So this is the advantage where much of the load is shared between client and the service and the discoveries Service is not the epicenter in the application and even after discovery services not present for some time, the application may work by taking help of the cache.
But when it comes to server side service discovery, Discovery Service is in the CORE Center. So, whenever we found an address, we will communicate with our Discovery Service and for the client Discovery Service is the service and Discovery Service will indeed be the channel it will be the gate insight and Discovery Service will communicate with the service and provide the result. So here, all the communication all the networking is via the Discovery Service as a result, that is a high level of dependency on the Discovery Service. And if the Discovery Service fails, your application failed, but here there is one more thing that could be multiple Discovery Service in both client side and server side service discovery. So, even if one of the Discovery Service fails, the remaining Discovery Service will take up the load and your application will still function. So there is always a fail safe mechanism that could be multiple clients, there could be multiple service, there could be multiple discovery services, where the load balancing will take place.
So whenever we work with microservices, scalability, and reliability is something which is very good, and very easy. So take a note of it. So this is how server side and client side work. So this is how the server side and client side discovery work. So this is nice, this is cool. And that's it.
This is the overview and in our next video, we will try to understand how to implement a server and how to discover these micro services. So Interesting stuff is coming up. All right now before ending this video at Eureka is the technology which we are planning to use and it is client side service discovery. There are a couple of more technologies like AWS and Angie, i and X, which are server side service discovery. So we will go with Eddie Rica, and we will discuss about Eddie rica in our forthcoming videos. All right.
So thanks for watching. Have a nice day and take care