JAVA Microservices pattern - How EUREKA works internally ? | Service Discovery | Spring Cloud #7
Estimated read time: 1:20
Learn to use AI like a Pro
Get the latest AI workflows to boost your productivity and business performance, delivered weekly by expert consultants. Enjoy step-by-step guides, weekly Q&A sessions, and full access to our AI workflow archive.
Summary
In this session, we delve into the intricate workings of the Eureka service in a microservices architecture, exploring how service discovery is implemented using Eureka in the Spring Cloud ecosystem. The session covers topics such as the auto-configuration of Eureka servers and clients, registry management, and heartbeat mechanisms, all crucial for efficient service discovery and communication between microservices. The instructor provides in-depth explanations and real-life examples, making complex concepts more digestible. By leveraging the Eureka server, microservices can seamlessly communicate without hardcoding URLs, showcasing the prowess of Spring Cloud's service discovery capabilities.
Highlights
Starting a Eureka server is as simple as adding the right annotation in your Spring Boot application. ⚙️
Microservices register with Eureka via RESTful APIs, creating a dynamic and centralized service registry. 🌐
Heartbeat intervals in Eureka help in keeping track of active services and their statuses. 💓
Eureka's Delta mechanism ensures that microservices only fetch updated data, reducing unnecessary load. 📉
Eureka's internal workings involve managing service registration and deregistration through specific RESTful calls. 🔄
Key Takeaways
Eureka auto-configuration simplifies microservices setup in Spring Cloud, activating servers and clients automatically. 📦
Microservices communicate with Eureka servers via RESTful endpoints, making service discovery dynamic. 🔄
Eureka servers manage service registries and maintain client heartbeats to monitor service availability. ❤️
Delta calls in Eureka minimize data transfer by retrieving only updated registry information. 🚀
Overview
The session kicks off with an exploration of how Eureka fits into the Java microservices ecosystem, particularly focusing on service discovery within Spring Cloud applications. By enabling Eureka servers, developers can forego hardcoding service URLs, thereby promoting a more dynamic communication model among distributed services.
Diving deeper, the concept of service registration and heartbeat management is unveiled. Eureka handles auto-configuration effortlessly, thanks to Spring Boot annotations, and maintains registries that reflect the current state of the microservice environment. Heartbeats sent by Eureka clients are pivotal in tracking service uptime and availability.
Towards the end, the practicality of Eureka's Delta call is highlighted. This feature allows microservices to efficiently exchange only recently altered registry information, avoiding the overhead of transmitting unchanged data. Such mechanisms ensure that your system remains agile and responsive to changes, enhancing both performance and reliability.
Chapters
00:00 - 02:00: Introduction to Eureka and Auto Configuration The chapter introduces the concept of Eureka and its auto-configuration capabilities in Java applications. It discusses how auto-configuration is automatically triggered when the Eureka dependency is added to the classpath. The chapter further explores how this auto-configuration facilitates the process of making Delta calls from an employee service to a discovery service, enabling the discovery service to retrieve necessary data.
02:00 - 05:00: Setting Up Eureka Server This chapter discusses the process of setting up a Eureka Server for service registration and discovery in a microservices architecture. It begins by explaining the role of heartbeats in maintaining the connection between microservices and the Eureka Server. The importance of at least one successful heartbeat for registration in the Eureka registry is emphasized. The segment describes how Eureka server waits for this verification before registering services, ensuring reliable service discovery.
05:00 - 10:00: Eureka Server Auto Configuration This chapter explains the process of communication between Eureka clients and the Eureka server, specifically through RESTful endpoints.
10:00 - 20:00: Understanding Eureka Registry The chapter titled 'Understanding Eureka Registry' discusses the internal workings of the Eureka Discovery service. It covers topics such as how Eureka communicates and facilitates the discovery of services, the methodology for making client calls between different clients, and how microservices can communicate using the Eureka service without the need to hard code URLs.
20:00 - 30:00: Eureka Client and Server Communication The chapter discusses the Eureka Client and Server Communication, starting with an introduction about the Eureka internals. Before diving deep, the speaker inquires if the audience recalls how to set up a Eureka server, suggesting that they need to add a startup configuration. This sets the stage for a detailed explanation of the Eureka server setup process, ensuring everyone is on the same page.
30:00 - 40:00: Heartbeat Mechanism and Registry Updates The chapter discusses the setup and components of a heartbeat mechanism and registry updates within a system. It focuses on using the Eureka server and Eureka client for service discovery. The transcript explains the process of adding a startup configuration, specifically mentioning the need for including the Spring Cloud starter Netflix Eureka server dependency in the pom.xml file to integrate the Eureka server with the application.
40:00 - 60:00: Practical Example and Demonstration In this chapter, the focus is on triggering the Eureka server in an application. The discussion includes a practical example of how to enable auto-configuration of the Eureka server using annotations. The key point covered is the use of the annotation '@EnableEurekaServer', which helps initiate the Eureka server automatically even if it is not manually started.
60:00 - 80:00: Explanation of TCP/IP Monitor The chapter discusses an annotation used in Eureka's auto-configuration. It is explained that this annotation helps create a bean named 'Marker'. When applied, it automatically generates this bean and integrates it into the application's context, simplifying the process for the developer.
80:00 - 100:00: Delta Fetch and Registry Updates Whenever the application starts, the Eureka Auto configuration or Eureka Server Auto configuration is automatically triggered if the Eureka dependency is present in the class path. This Auto configuration sets up the Eureka server by relying on a bean, where there is a conditional check for the bean to initiate the server.
100:00 - 120:00: Conclusion and Debugging Tips The chapter focuses on a component called 'marker' which is integral to the Eureka server marker auto configuration. It explains that within this setup, a class named 'marker' is utilized to instantiate a bean. This bean's role within the application class path is crucial, as it provides auto-configuration capabilities integral to the application's functionality. The discussion likely includes insights into how this marker setup eases certain configuration tasks, streamlining the overall application deployment and debugging process.
JAVA Microservices pattern - How EUREKA works internally ? | Service Discovery | Spring Cloud #7 Transcription
00:00 - 00:30 laughs this Auto configuration automatically triggers because you know you have your Eureka dependency in your class path and what this Auto configuration does slash Eureka slash apps okay and now look at that you this is your registry information whenever you're gonna make a Delta call from the employee service to you know Discovery service Discovery service will only get you those data
00:30 - 01:00 what is basically the difference between this last time whenever you made a fetch now nothing is there now see the first heartbeat it came at 8 54 next one please after 10 seconds don't disappoint me yeah the Eureka Discovery service will wait once at least one heartbeat it will accept from the micro service then only it is going to register that inside the registry this is the concept of let's say there is a Eureka server and there
01:00 - 01:30 are many Eureka clients how this Eureka clients communicates with this Eureka server and all happens using the restful endpoints foreign [Music]
01:30 - 02:00 so in today's lesson we're going to be going deeper with Eureka Discovery service we'll be learning uh in a more internals about the Eureka like how does it communicates and how can we discover our services using the Eureka Discovery and how can we make client calls from one client to another so we're going to be communicating with our microservices today using the Eureka service and we will not be hard coding our URL in our
02:00 - 02:30 application so this is going to be an exciting Journey but before that we just need to you know talk about a little more about the Eureka internals so that I will be making sure that we all are in the same page so before we get started I just have few questions uh to you guys like how to set up a Eureka server anybody remember from the last station how can we set up a Eureka server what thing we have to do how to start we need to add a startup
02:30 - 03:00 for that we need to add a startup for that correct and what what starter is that it's a Eureka server and Eureka client okay one second can I open the Eureka Discovery service and the pom.xml file and this is the startup that we have added for our server so this is the uh you know dependency spring Cloud starter Netflix Eureka server in order to have the Eureka server in with our application can I
03:00 - 03:30 know how can I trigger the Eureka server in my application when is if you remember it [Music] um like how can I how can I trigger the auto configuration of Eureka like you know there is an annotation yeah enable uh exactly and this is um enable Eureka server this guy will help you uh to start your Eureka server even if you are not going to have it then the Eureka server will not be Auto configured so this annotations make sure
03:30 - 04:00 that the auto configuration if uh that you have for Eureka triggers so basically guys you know to be make it very simple what this annotation does is it basically helps you create to create a bean call Marker okay it basically there is a bean called marker and this guy whenever you put this annotation over here it basically create a bean and put it in your application context the bin name is marker okay and the next
04:00 - 04:30 time whenever this application starts off there is a um you know there is a Eureka Auto config or Eureka server Auto configuration this Auto configuration automatically triggers because you know you have your Eureka dependency in your class path and what this Auto configuration does is basically set off the Eureka server for you how because based on a bean you can see there is a conditional on beam and it is looking
04:30 - 05:00 for a bean called marker okay and where this marker presents is present inside the Eureka server marker Auto configuration if you go inside that you can see this class is basically help you to create a bean for a class called marker and this marker class is here okay there is a marker class this particular class basically creates a bin for marker class and whenever this being presents inside your uh application class path uh basically uh the auto
05:00 - 05:30 configuration trigger so if I'll come with the flow one more time maybe I will close everything I'll close the pump file as well so it all starts from here this all starts from here whenever you have the annotation called enable Eureka server if you want to go inside this annotation you're going to be seeing that it is importing a configuration right here and this is basically Eureka server marker configuration so what it
05:30 - 06:00 does is basically helps you to create a bean what mean is that the bean called marker what is the marker this is just a simple class this there is not no code inside here this is just two just they are two you know work is a marker by by writing this particular annotation here you are basically creating a marker Bean okay and once that marker win is available uh when once you start your application and the if you have this
06:00 - 06:30 annotation the market bin is available and whenever right now the Eureka server Auto configuration uh triggers is gonna check okay whether there is a bean present inside the class path called marker you can see a marker is a class which is there inside this particular class right it is a class inside a class so if we have this class present inside our uh you know this class and this is a bean if there is a bean present of marker then obviously the auto configuration triggers and that's how
06:30 - 07:00 this guy basically does the magic I think you guys understand this okay a good answer Manish now the next thing next question for you guys that how do you turn off the fetch registry from the server side uh and I just want to I just want to ask you two questions why do you okay first tell tell me two things how do you turn off the face registry what is what is the face registry and um you know why do you want to turn it off in your server side
07:00 - 07:30 any answer to this why do we want to turn off the face registry from the server side [Music] yes yes and that is basically yeah that is basically registered with Eureka we we don't want our service because these Services end of the day this is also a
07:30 - 08:00 micro service and we said register with Eureka equal to false if you don't set it to false if it is true then this application is also going to be registered with your Eureka Discovery service and that's what I don't want because right now this is the only Central Eureka server that I have and I know the port number and URL of this and that's why I do not want this to be registered with my Eureka and I do not want my Eureka to track the IP and the
08:00 - 08:30 addresses of this particular microservice when I start this instance inside a server right now this is the answer for this guy register with Eureka what do you mean by Page registry and why did I set it to false here if you talk about the discovery service any answer exactly
08:30 - 09:00 uh so it will keep on after every 30 seconds and again it will not get that data so to make uh so here we know that we don't have 8761 registered exactly like that server available so we made this as a pulse so basically which server is that uh hush you are absolutely correct pinpoint answer I just want to know like if I start this application and if this phase registry is set to true then what
09:00 - 09:30 this application is going to connect to to what port number eight seven six seven okay by default it is 8761 there is a survey so there is something running on that particular server let's say you said eight seven six one man B if I if I'll make this to true this application is by default is going to look for a another micro service but is that a micro service is that a another Discovery server that's what I want to ask uh it is exactly because every time the discovery
09:30 - 10:00 service will think that there is another Discovery service present inside the localhost and it is available in some Port so if you're gonna make it true then obviously it's going to whenever we start this application it will try to fetch the registry what uh from that particular server what do you mean by registry hers so basically uh this is a point where our other micro services are installed themselves exactly so whenever they will get up or down uh
10:00 - 10:30 it will automatically send the outbid accordingly it will for understand exactly exactly basically I'll tell you guys I'll tell you I'll show you the registry I'll show you the registry okay registry means what any other answer horse you are correct any other answer what do you mean by registry if anyone else wants to you know answer this question yes please actually registry is nothing like uh you
10:30 - 11:00 can say that if there are uh 10 30 students coming to school every day right so teacher actually class teacher actually maintains the register who is present and who is not present correct is simple it's just analogous to that what what a beautiful answer one is thank you very much maybe nice answer if the student is present then it will be maintained inside the registry if the student is
11:00 - 11:30 not present then this will be absent nobody will call that particular student so right now do we have anything inside the registry right now I just started the discovery server you can see there is no instances registered with this application so there is nothing inside our Eureka server but right now whenever we start any of the micro services for an example if a status micro services in a port um let's say 8082 then right now this will be a registered start with our application and once we start this
11:30 - 12:00 application it will be registered with our Eureka service right because this you can think like this this is a server this is a Eureka server this is a microservice we made it a client which client is that which client is that how can we how did we make it a client we did make it a client by putting this thing right here called Spring Cloud starter Netflix Eureka client and what this guy does this basically help us to register our application or our microservices with
12:00 - 12:30 our Discovery service right here and right now wherever we started this server like an address service it is running on port number 8082 and it is on localhost every information of this will be registered with my Eureka if I do refresh this you can see other services right now register with this thing and this is how it is maintaining a registry instances currently registered with Eureka but basically um you know what guys how does um basically
12:30 - 13:00 um you know for example I I told you one thing okay before I talk about the registry like you know I'll tell you how it fits it guys can you tell me like whenever I started this address microservice right here you can see address microservices started on 8082 when I started this do you think this is going to also fetch the registry from the Eureka Discovery service uh complementing horse answer I just want to know yes or no do you think whenever I start this application automatically it is going to fetch the
13:00 - 13:30 registry from the Eureka Discovery service this application will tell to discover the service that okay I'm starting off let me know what are the instances you already got so that anytime the other service needs to make a call to any of the micro services like Employee Service it can use that registry and can find and discover the you know URL and the port number of Employee Service to make a call is that correct or is that that is not correct right now I'm not talking about the server I'm talking about this address service which is the instance which is a
13:30 - 14:00 Eureka instancer which is our micro service do you think whenever it starts off it fails the registry from the discovery service yes or no okay why do you think so why do you think the address service whenever it is going to start off it is going to face the register information from the discovery service and where where how can you prove it anyone yes we can just shut down this responsibly and see if still service
14:00 - 14:30 oriented okay that's a different okay that's that that's that's a particular this is a brilliant answer uh prashanth so what Prashant is saying okay you told me that okay Discovery service is our service registry whenever this micro service will start off other service will start off it will face the registry information from the discovery service and it will cache it inside the address service because this is the client and whenever it is going to make a call to Employee Service it doesn't does not
14:30 - 15:00 need to face the registry information again from the discovery service it has it already so if you're gonna turn this off still we can make a call from here to here um you know without using Discovery service maybe I I'm agreeing to this answer and I'll be proving that as well but can we make it um can you just make a little uh simple for me Prashant how can you show me or how can you prove me whenever I am starting this address service it is facing the registry information from the discovery service and how it is communicating from the
15:00 - 15:30 address service to Discovery service it will come good answer Manish right now you can see this is my address service console okay now it is Discovery service and this is my address service console and whenever my address service is starting off are you saying it is registering the uh service with the Eureka but before it registering it should
15:30 - 16:00 issued getting all the instant registry from the Eureka server and the response is 200 so before it starts let's try to fetch all the register information from the Eureka service and the Eureka service has given a 200 response so maybe it had made a call this application right now makes a call to this application through rest template and right now Discovery service is given all the responses like all the registry information and uh is this given you a
16:00 - 16:30 200 response and after that is basically register itself address service address service register itself with Eureka how can you how basically this application couple of application communicates how basically the other service gets the information from the discovery service is basically hitting some rest endpoints right and what is that endpoint Eureka and what is the port number where Eureka is running right now 5000 okay slash Eureka slash apps okay and
16:30 - 17:00 now look at that you this is your registry information now look at that a little carefully let me restart my camera so what information you're finding what you are thinking what it is anyone the information of all the success okay anyone else
17:00 - 17:30 okay okay go ahead go ahead correct correct Prashant any other answer what do you think what it is status exactly so basically so basically this is my application that is how many instances of this application running call address service you can see there is one application is up and that application name is address service and this is the instance details like this
17:30 - 18:00 is our instance ID this is where it it exists right now inside This Server this is our application this the status is up and the blah blah blah information like Legion four Legion for means what you can see there is something called lease info that means this address service application is basically going to send and heartbeat to my Registries or Discovery service in each 30 second so basically you know what you know what
18:00 - 18:30 one thing I want to tell you that if right now this Eureka service got a address service here but basically how basically this discover service knows that there is some application is getting registered and when to add it when to remove it basically this is how your things are you have your server you have your Eureka client and this is let's say this is service air this is service B this is one Eureka client or one Eureka instance and there are a couple of instances over here you can
18:30 - 19:00 think one is as your employee service manager address service and both are registered with Eureka whenever they start stuff and in every 30 second date do send a hard bits okay signals to the Eureka server that hey don't remove me I'm alive I'm not dead and this is how Eureka server tracks because in East 32nd it is going to it is going to receive and add weight from the client instance or from the client application and that's how we can see in every 30
19:00 - 19:30 seconds because see Netflix people has found that 30 second interval is a good interval can you change it do you want like Eureka client to send a heartbeat to the Eureka server in every 90 second or every 120 second is it possible absolutely but by default all the clients that we have whenever they will be registered in each 30 second they will be sending hard bits to the server so that the server can track that this
19:30 - 20:00 instances are available and If the server tracks that for there let's say there is another service here maybe I can show you this one and okay one second if if the server sends that or if the server finds that if the heartbeat is not coming on a regular interval and if there is an instance called Eureka client and it is B service B if the service B is not sending heartbeat for the next 90 second then this service will be removed from the Eureka server
20:00 - 20:30 and from the Eureka registry if for 90 second Eureka server will not receive the hard bits from the client then it will re-register deregister the service from the registry of the Eureka okay so this is how the thing goes Eureka client sends a heartbeat in every 30 seconds to the Eureka server Eureka server removes the instance if it did not receive any heartbeat for the 90 second interval and there is couple of way you can set your heartbeat the first way is lease renewal
20:30 - 21:00 interval in second and if you're gonna set this property to 90 second or 120 second in that interval only the heartbeat will come to the Eureka server from the client by default it is set to 90 second and by default the Eureka server will remove a instance after 90 second if it does not send heart bits now you that is the default one you can also change it by using this property called lease expiration duration in
21:00 - 21:30 seconds and you can set this expiry over here and basically you can by default it is 90 otherwise you can set it to 120 or 130 second right so this is what it says if you're gonna go to this app you can see this is my Eureka server so Eureka server register right now and there is one application is up this application name is address service and for the address service this is the lease information that means that is this is your Hardware information and the
21:30 - 22:00 renewal interval in second is 30 seconds so every 30 second it will this address service will send a heartbeat to my Eureka server and this is how my urica server will track it and duration in second forget about this I'll come back to this maybe um maybe this is something that I want to talk about right now and you can see right now if you're gonna check my uh address service if you go to my Discovery service right now you can see in every 30 second you are in every 30 second you are
22:00 - 22:30 getting a heartbeat this is basically a this is a heartbeat one second yeah this is a heartbeat uh register instances yeah this is a heartbeat you can see 8082 it is coming from this address and the status is up so this uh this particular uh this particular line confirms that right now basically your Discovery service gets an hard weight from this service called address service and I will show you how
22:30 - 23:00 I'll show you how in a few minutes and also if you want to change this you can go to address service you can open the properties of address service like this and go there open with generic editor and you can just type please here please and you can get your renewal information can I say that and see leads a renewal interval in second by default indicates how often
23:00 - 23:30 the Eureka client needs to send heartbeats to the Eureka server to indicate that it is still alive right and right now you can see the default is 30 second so if you're gonna change it to 90 second now this address service is going to send an heartbeat to the Discovery service in every 90 second but by default it is 30 second and that's the that's the value that Netflix Eureka people found that that's the suitable value so right now I can see one thing
23:30 - 24:00 you can see right now I have my Eureka if you're gonna refresh it you can see it is over over here it is register yourself inside Eureka but the moment you're gonna kill this instance Discovery service can I go over there the moment I'm gonna be killing this this address service now it shuts down if it search down means it is going to deregister okay and if it is going to deregister you're going to be seeing that there is no instance available but this is not the registry this is the registry slash Eureka slash apps do
24:00 - 24:30 enter now you can see that the app has been gone from here all right so now inside the registry we do not have the data we do not have the registry information and you can see one more thing when the address service we shot down if you're gonna go to the Discovery service log you'll be seeing that canceled instance and again you can see whenever the address service shut down this is my this is my address service which is right now terminated when I
24:30 - 25:00 stopped this it is on registering itself and it is making a call to the Discovery client to make a de-registration okay and the status is 200 that means the delete that means it is removing the address service from the discovery service and for that it is hitting my Discovery service using this um some URL and this is basically a delete request by nature and if you're gonna go to the Discovery service console right now by switching it over you can see right here
25:00 - 25:30 canceled and you can see this instances is right now remove moved right so far it is making sense guys whatever I explained it little theoretical yeah but but one thing you make sure basically how this Services communicates with each other I'll let me tell you a little bit um Eureka rest uh API kind of just like this can I go to the Netflix GitHub page and you can see these are all the end points
25:30 - 26:00 that basically my microservices hits and it basically goes to Utica and basically this is how Eureka basically communicates you can see just now I told you about it delete one right can I see one second also just see deregister an application whenever you want to de-register an application one application need to hit this endpoint Eureka slash V2 forget about V2 right now Eureka's last apps slash app ID and
26:00 - 26:30 the instance ID this is going to hit by one service to another and that is basically going to uh you know delete the application for an example I'll show you I'll show you don't know it okay once again right now if I'm gonna say localhost five thousand slash apps slash Eureka is my best endpoint apps okay now I don't have anything over here right I'll tell you one thing now let me start one instance
26:30 - 27:00 let me start one Discovery one Android service I'll tell you few information then I'll show you something in real time it is going to be fun so my address service right now started can you see it over here now you can see the registry still does not have the address but if you're gonna go over here do a refresh you can see the order service is registered but if you're gonna hit this register link now it is up so what is the logic behind it so guys remember this thing never get confused whenever you start this address
27:00 - 27:30 service right it is going to be immediately once it is started it is going to be immediately show inside the web UI right here inside the Eureka UI but this is the registry information right whenever you hit this endpoint this is not going to instantly pop up that how many instances are running of address service right now it is saying up one and this is the information and the status is up see why it did not immediately pop out over here because the Eureka registry
27:30 - 28:00 will only show the details right now I can see this is my address service and this is my Discovery service now you can see the discovery service got once the hardware service is registered with Eureka here it was canceled right now once it is registered it is basically given a heartbeat okay this is the heart bit status is equal to up and basically
28:00 - 28:30 a hardware there is a like the registration happens and once it basically accept the first heartbeat once the discovery service gets the first heartbeat from the address service then only it will be put that instance inside the registry okay so you got to wait for some time whenever you start the service doesn't mean that it will be going to the Eureka registry instantly the Eureka Discovery service will wait once the once at least one heartbeat it
28:30 - 29:00 will accept from the micro service then only it is going to register that inside the registry and just like that for an example if you're gonna stop this right right address service stop it I stopped it now if you're gonna go over here to enter see still we have it see still we have it but we stopped it but if you refresh here you will not be finding it here so here it will be removed directly but this is actually the registry and now it will wait like
29:00 - 29:30 for the missing heart Bits And once the heartbeat is gone it is going to remove that from the registry itself so this is the end point using what we are getting the registry uh whenever any micro Services starts off so right now whenever this micro Services starts off you can see right now whenever this microservices starts off it is going to face the registry from this microservice and how it will be fetching it it will be fetching it by hitting this end point called slash
29:30 - 30:00 theoreka apps okay now I have a question for you imagine I got three instances of address service let me start this now all these instances will be registered with my Discovery services in it okay let's see that okay now it's all started now if you go over here do refresh it didn't come up now it came up there are three instances of address service instance one instance 2 and instance 3 and these are the
30:00 - 30:30 details in XML how do you want to get the details in uh Json you need to hit this with your Postman right here you can open a new tab Ctrl V do a get you're gonna be getting it by default in XML but if you want to get it in Json go to the headers how can you get it in Json any idea except by default we are accepting it in anything right so just have accept and
30:30 - 31:00 what is the value applications yes to ascend now you are getting the same thing in Json so if you want to get it in Json this is the way you can get the data now my question is um what I wanted to say this is one important thing okay guys now this answer horse has given me now guys tell me when I started this application right when I started all this application let's say right now address service is
31:00 - 31:30 started okay and there are couple of instances of address service now imagine I want to start my employee service I'm starting my employee service so first what employee service is going to do if I'm going to start the employee service once okay what happened there can I run it like this run as Java application if I'll start my employee service not found plus not loading
31:30 - 32:00 may I have an update spring button yes the entire I did run it as springboard app right now okay one second um having update project force update to an update run as spring boot app still same problem no it's starting right now employee service is starting
32:00 - 32:30 now guys when employee service starts is registered itself we can see registered instance of employee service inside the discovery Service employee service is registered now if I'll go to the employee service okay now the employee service is going to do what it is right now it is right now whenever it started before it registered the application it should have faced the data right from the discovery service can you see that that can you see that log for me are you
32:30 - 33:00 finding it where it may take all initializing the server in U.S us EST one because by default that's the default Zone because they use the AWS standards there yeah there you go right getting all instances registered from the Eureka server so whenever my employee service starts is basically started fetching all the instances from my Eureka server right now what do you think right now first time it basically faced all the information right now my
33:00 - 33:30 employee is a client right now I can I can just show you one thing uh can I open my annotator and can I go somewhere now my question is guys imagine this is your Discovery service okay now if the discovery service there are three application registered okay this is these are all address service now this is my employee service okay now my employee service is starting off whenever it starts off it basically fetch all this data 2 here and is going
33:30 - 34:00 to Cache it over here cool now next time there is a another service registered here so how employee service will get it any idea any assumption yeah exactly the same so basically previously how did it gets the data is to use slash app what is this app huh
34:00 - 34:30 app it did hit and just get all the data so next time if there are two more services are registered what endpoint the employee service will hit to get the data again it is going to hit employee Eureka slash app no no maybe the storage service will update no Discovery service will not update this guy this guy Prashant will keep on fetching the data
34:30 - 35:00 in each 30 second I think 30 second interval in every 30 second it try to sync off with the discovery service and it is going to ask for like let's say any new Services if it is registered and is it going to hit the same endpoint Eureka slash app no it is right now Eureka slash Delta I think app.delta or Delta dot app I don't know Delta slash app I'll tell you what is the difference between this
35:00 - 35:30 endpoint and this end point now Delta slash app means guys do not I don't want to get the entire registry again I already have it just tell me the difference like last time I called you at let's say 6 pm 6 30 PM let's say now I'm I'm again making a call but last time you already gave me the entire cash right don't get me the entire cash right now just get me the new
35:30 - 36:00 please register instances over here okay so the Eureka Delta whenever you're gonna make a Delta call from the employee service to you know Discovery service Discovery service will only get you those data which has been registered recently or what is basically the difference between this last time whenever you made a Fetch and right now let's say you are making a call at 6 35 let's say I'm saying 635 but it will happen after 30 second but let's say whenever you're gonna make a call at 6
36:00 - 36:30 35 it will be basically find the difference Delta means difference what is the difference um now or what is the newly added services or modified things that you have and what basically this employee service does not have so now if you're gonna see here guys now if I'll turn this off and if I'll go to here and right now I think app slash Delta I think that is endpoint C this is
36:30 - 37:00 the Delta and whenever I am going to hit Delta I'm not finding anything right because there is nothing has been changed but right now whenever I am going to hit uh this let's say this is my territor right can I hit you record slash apps I'm getting everything but Delta means I'm not getting anything right now right Delta is not giving me anything but right now let me let me do one more thing Employee Service how many application is running one huh let me start another one or let me start
37:00 - 37:30 another another address service can I duplicate this ah duplicate config and let me just do open config and let me just uh started in eight zero eight seven port and the arguments let me just give eight zero eight seven and that's it to apply close go over here to start the application now let's see what's gonna happen
37:30 - 38:00 okay it started right now and basically what and can you do one more thing sir you can delete the existing one so that actually we can have a clear understanding yes yes yes yes but before I do that see when I hit this what I what I am getting when I'm hitting the Delta what I'm getting how many instances I'm getting right now there are five services off but the Delta call has given me how many instances one see Manish one instance
38:00 - 38:30 only right yes yeah because this is the newly added thing so Delta will not give you the entire information it'll only give you the information that like you know which has been newly added or the service which has been removed things but if you're gonna go to the other endpoint and if if you're gonna sorry if you're gonna make a hit to this end point slash apps it is gonna get you everything see it's gonna get you all
38:30 - 39:00 the instances of address service and all the instances of Employee Service now one employee service and four address Services running okay so it's gonna get you all the information but the Delta will basically get you the difference okay just remember that much and you can use all these endpoints to make call for an example you want to get less said right now one more thing see guys now I will take I told you that if you're gonna make a apps call you're gonna get
39:00 - 39:30 all the apps which are running right now and register with my Discovery service this is basically my Discovery service registry now let's say you want to get information about my address service specifically you can just do apps slash address service here and you're gonna get only the information about the address service not the employee service now the employee service is gone now if you want to get the information about only one instance use this instance ID and just do S-Class and watch the
39:30 - 40:00 instant I paste the instance ID do enter right now you are only getting the instance information of that instance ID only like where the address is what is the address what is the status now the status is off we can also the status may be down also right maybe what is this 8087 port number right now can I go over here and eight zero eight seven this one let me just turn this down now the status will be down right okay now if you're gonna come over here
40:00 - 40:30 do a enter okay this is gone obviously because we turn that off but can I go to slash Eureka slash apps and uh can I see 8087 can you see the eight zero eight seven is there or not 8081 or none unknown unknown uh one second one second Employee Service I want to show you the status is down now can you see all the status up
40:30 - 41:00 can I uh see the other instance this is also up another instance this is also up another instance it is removed this is under service it is also up uh okay but I did made it down huh that time it did not show me up instantly so right now it is showing only four Services okay maybe whenever the status is down or maybe you can see we can also
41:00 - 41:30 set the out of service you can see for an example you can see you can hit this kind of URL to set the status to out of service for an example I'll show you also this example will be good let's say I'm hitting slash apps just gonna get me the entire registry now let's say for this um instance I want to set the status to out of order then how can I do it I can use this endpoint
41:30 - 42:00 I can use this endpoint this is going to be the end point Ctrl C can I make it can I paste it over here first let me just have my localhost colon 5000 okay slash Eureka V2 I don't need it it's like you know I want to use the first person apps slash app ID let's say what app ID I want to use I want to use the app ID this is my app ID address service Ctrl C app name is the app ID
42:00 - 42:30 paste it over here then the instance ID let's say I will set one of the instance this instance which is running in the port number 8082 this instance I want to set like instance ID paste it now the status I want to set it as out of service value equal to out of service this is going to be the status you can hit the same URL in the rest API now I didn't get anything just fine can I check it over there once
42:30 - 43:00 what is the status right now it is still up okay can I just take this URL and hit it right there in my Postman just want to see that whether I'm able to change the um you know if I'm able to change the instance ID status of this to uh like you know can I go to the params this is like status equal to status equal to out of service let's see
43:00 - 43:30 that if I'm able to change sorry slash status is going to be here huh now this is going to be value equal to this is the value equal to out of service can I copy this Ctrl C paste it look at my URL is it correct um okay okay that's why I did not get the you know response here right because when I hit anything in the browser it will be a get request so now am I
43:30 - 44:00 hitting the right one it is a put call I'm hitting slash Eureka slash three two slash apps apps is basically basically the end point this is the end point Eureka V2 slash apps then this is your service name then this is the instance ID then the Status End status is going to be the endpoint name then after that parameter parameter starts here and value equal to out of service okay now parameters uh after this we have status
44:00 - 44:30 no let me just write status status then parameter starts here then value equal to out of service okay do Ascend okay I'm getting 200 okay that means the status has been set can I go to here do a enter and can I see see the status is right now out of service right like that whenever the services will be down it will be changed to down whenever it will come back it will come up right you can change the status right here only
44:30 - 45:00 right now I can set the up and maybe I can just use my capital letter here do send and it will be off can I hit the same endpoint again okay now I think it's not taking it I think it is not taking it because of a reason one second now it's come back 882 status is up right status is over here making sense guys so basically how do you trust me right now okay maybe a lot
45:00 - 45:30 of things we have discussed discussed you would trust me that all these endpoints are getting hit now for an example guys whenever you're gonna be deleting whenever you're gonna be stopping an application let's say this address service 8082 you are stopping right now once you are stopping what will happen it is going to deregister itself from the discovery service so internally you can see if I'll go go back to the address service which we have terminated it is basically doing a on registering on registering means it
45:30 - 46:00 is basically removing it from the discovery service so if you're gonna go to the Discovery service Discovery service you can see right now it is canceled so that means there is a delete request which happened for this instance this is the instance ID and for this instance there is a delete request happens and this is the equation scam that's why the discovery services on registered an application now if you're gonna hit it you have three instead of four now how can I make it manually
46:00 - 46:30 obviously you can also do the same thing you can go to the GitHub link and can you find the delete one put get get and where is where is the delete one this is the delete one where this is the URLs last V2 apps then apps ID instance ID status is equal to Value equal to up right and this should be the delete request right now I think we already have it just make a delete request can we do that can we come over here make a
46:30 - 47:00 delete request uh for the 8082 8082 is running or not not running can I see there 8082 is not running let me just start it first then once I get it I'll stop this one through the rest call okay now if you're gonna come over here now let's go to Eureka first of all let me just hit slash apps this is my apps only three are up the other one is not
47:00 - 47:30 registered this is 8081 now let me just get the 8082 now it is still three this at this has not been sent is first heart bit so I have I do not have it right here so far now it is for now this is the 8082 this is my instance ID can I copy my instance ID right now Ctrl C can I go to my application and right now this is going to be my instance ID right paste your instance ID here and now the status
47:30 - 48:00 value equal to up and it is going to be a delete request do a send I'm getting 200 okay can I go to my service console and you can see status override removed now you can see in a little later it will be automatically recover itself and again automatically it is going to be registered itself from here but I I'll show you like you know whenever you stop all these things how basically all these things happens behind the scene but so far is it making a little bit sense what I'm trying to do
48:00 - 48:30 I think I've taken a little more time to explain you all these things not required but yeah things are making sense yes sir okay but okay let's not go into all these things let me just give you a maybe we cannot do anything today but um one thing I'll tell you so that you know you'll be you'll never be confused with this one I'll tell you a very good way to track all these things okay the way you can track all these things guys now let me stop everything I'll just give you a trick so that you don't have to see all
48:30 - 49:00 these things you can track everything okay now first of all I told you I told you few things so how can you trust me on that for an example I told you that if I'll start my Discovery service okay if I'll start my Discovery service My Discovery service will be started then if I'm if if I'll be starting my address service my address service will be registered with my Discovery service and will be keep sending heartbeats to my Discovery service in every 30 second
49:00 - 49:30 interval so right now if I will go to my address service in after 30 second it is going to send a you know heart Bill to the Discovery service right so now you can see the heartbeat will come over here register instances up after 30 second it will come here the heartbeat will be appear here there will be a call from the address service to the Discovery service but what about guys what about if I turn
49:30 - 50:00 up the discovery service itself then the address service will keep throwing me error right now I terminated the discovery service if I'll go over here the order service you will see it will keep throwing me error right after 30 seconds let's wait for 30 seconds then you will see other service will have a lot of error because right now the discovery service is off and the other service will whenever it will send any heart bits it should fail can we wait for some time
50:00 - 50:30 yeah now you see execute request to your unknown server unable to send hard bits right so the address service is making some calls to the Discovery service to send habits and as the hard bits is not there it is not able to send because the server is not set so we are having the problem so now guys whatever things we have discussed we cannot do anything else today so I want to prove this that it is sending and heartbeats it's making a Delta call it is making a slash app
50:30 - 51:00 call so how can we prove this thing so in order to prove this what we can do I can you can basically use a guy which is available here and that particular person is a TCP IP you can see if you're gonna go over here to the Show view you can find find the TCP IP monitor okay just to track what are the endpoints which are getting hit by your microservice let's say your address service is connecting to
51:00 - 51:30 Discovery service so you should be hitting the discovery service some endpoints right what are those end points it is internally hitting to this guy so that it is giving the response back to this guy what are those endpoints if you're gonna see we can use this tcpip monitor for debugging what this guy is guys let me tell you one thing so using this person let me I'll just draw something it will be easy imagine this is your client right this
51:30 - 52:00 is one application this is my client application or this is a person this is uh me okay and this is you I want to call you then how can I call I can directly call you right or maybe I can do something this is me this is another person maybe this is another person and this is you now I can tell to this guy that hey call this person now this guy can call you so this
52:00 - 52:30 is a middleman right so every communication which is going gonna go from me to you it is gonna pass through this guy so you can trace this guy as a TCP IP monitor so it knows like you know what are the things you are passing from here to here like let's say I'm telling list let's say or tell him uh tomorrow we will go for a picnic now this guy
52:30 - 53:00 knows this guy also knows that you want to go for a picnic and this guy also knows because it is because this call is going through this guy right so this is basically your TCP IP monitor using this TCP IP monitor we can track calls for an example guys you can think like this is your client application this is your client or this is you this is your main application let's say this is your this is uh seleniumexpress.com selenium Express okay now let's say
53:00 - 53:30 selenium Express is running on the port number 8080 now this client can do what whenever it is making any calls we can have a middleman over here and can route the request using this middleman so here we can track all the calls which is going from here to here right we can have it as a proxy and we can keep tracking the information or the calls which is going from here to here I'll show you an example for an example guys
53:30 - 54:00 here inside the TCP IP monitor that I have for an example I'll go to the properties here and I'm going to add a property let's say I want to see www dot eclipse.org right let's say Eclipse org is running on a port number eight but I will have a monitor I will have a port number 9999 this is a random port number you can have anything over here right so let's have a port number 9999 let's say this is my port number and I I have this port
54:00 - 54:30 number and this port number will track any calls which is going to eclipse.org using this port number right this is the original port number of the eclipse let's say and this is the website domain name or the host name let me do OK let me click on start and it is right now running in localhost port number 999999 okay so right now what I can do if I'll go to my Google Chrome and if I'll hit localhost colon 9999 it will navigate to
54:30 - 55:00 me where you know it will navigate to me at cliff.org org see I am navigated to eclipse.orges see my end point so I am not making a call directly I'm making a call through the proxy that I have created now this is the monitor what I created and what this monitor is doing it is basically Whenever there is any call is coming from 9999 port number it is redirecting me to eclipse.org 80 port number and now during this whatever the
55:00 - 55:30 end points which are getting hit okay you can see these are the end points which are getting hit and I have like this is the CSS style and this is a get request this all the things are going uh this requests are going from my client machine to the server machine which is the eclipse.org so these are the endpoints which are getting hit just like this guys I can use this concept right now to track the things right now you can clear this up and I can click on
55:30 - 56:00 property I can remove this off right now what I can do let me just remove this guy now let me let me just do one thing I know whenever this discovery service is starting it is starting on a port number what um 5000 right and now that let me just close everything now that is basically getting called from the address microservice let's say whenever the address micro service is getting started
56:00 - 56:30 it is basically doing what it is making calls to this end point because this is where my Eureka service exists and address service always using this endpoint to make call to the Discovery service let's say it wants to fetch all the information maybe it can hit slash Eureka slash apps let's say it want to send a heartbeat it can use it can put a put request let's say it want to remove itself from the Eureka it can send a
56:30 - 57:00 delete request to this endpoint let's say it is it wants to get some Delta information it can heal it can hit slash Eureka slash app slash Delta so let's say I will do one thing I will set the localhost as localhost 9999 over here instead of 5000 and then what I'll do I'll set off a TCP IP monitor ok I'll set up a TCP IP monitor in the port number 9999 whatever I have given there now
57:00 - 57:30 what is going to be my host name where my Discovery service exists inside the localhost so I can say localhost and in which port number Discovery service is actually running 5000 so whenever I am making any hit to this uh dummy port number you can make it anything it will redirect the request to 5000 port number of the localhost and this is where my Discovery service will run and also I'll track right now what are the calls is
57:30 - 58:00 going through now let me just do apply and close here so what I will do I just changed my uh you know port number here which is going to be my TCP port number for tracking okay now I'll do some magic here now look at that I'll start my Discovery service first of all and now I'll start one of my address service now my Discovery service has started okay okay now I will go to my TCP IP monitor I'll start my monitoring I'll go to property I'll start this up
58:00 - 58:30 now this is going to track everything it is started you can see the stop option is coming right now now I'll start my microservice whenever I'll start it is going to hit this end point right and it is going to communicate with the discovery service let's check our understanding whether it is happening or not start our springboot application let's start it in port number 8082 let's do a okay now it will start it will register itself it will send heartbeats
58:30 - 59:00 but right now I think I'll be able to track everything see first what is got hit now it hit slash Eureka's class apps anybody remember what what it is going to give you and why did it hit this end point why did the address service hit this endpoint anybody anyone to get the what the entire registration exactly exactly apps it is the same endpoint guys slash
59:00 - 59:30 Eureka's last apps is giving you what I told you guys now slash Theory cast last apps will give you the information how many services has been registered this is the registry information I told you guys that whenever this guy will start it is going to face the entire registry from the discovery service and this is how it is facing it is see it is hitting this end point what request it is it is a get request okay and what is the response it is getting it is getting
59:30 - 60:00 this response see first first request it is getting this response same response okay first time when it hit right first time when he when it hit this is the only service what we are starting right now at that time there was no Services has been registered with your Eureka that's why there is no application was registered because right now only one service was starting right and whenever we start this one before that nothing was running so obviously this last Eureka whenever we did hit it did not
60:00 - 60:30 give us any information right like you know it was empty but then you he started now once once you faced the registry it started fine and it registered itself you can see this is the post request and it is basically registering the address service with Eureka service now this endpoint call is mapping from here to here now the address service is posting the request right now this endpoint details right
60:30 - 61:00 now you can go over there again this endpoint is got hit and now this is the post call it is hitting the Eureka service and providing all the instance information so that it can register itself with the Eureka service so these are the information it is giving about like well what is my endpoint what is my instance ID what are the different details I have everything you can see it is whenever it is making a request it is giving it giving it as a Json data okay it can it is giving or like the instance
61:00 - 61:30 IDs information what it what is his name and everything it is giving it to Eureka service and that's how this guy is registering itself with the discovery service using this endpoint okay using this endpoint okay and it is the post call it is giving the details and registering itself with the discovery service that's why this call has been made right now maybe it is making another call right now it is trying to fetch the registry again the first time it is for trying to face the registry after 30 second once it is started is it
61:30 - 62:00 registering of finding the details now maybe it is it should be finding its own details you can see application details right now one instance is up which is itself and it is getting and caching the registry in the first call and after that its Center had bit you can see this is a hard bit now this heartbeat you can see it is a put request okay now this guy is putting a hardware over here that hey I am alive now if I'll go to the
62:00 - 62:30 heartbeat heartbeat will be a put request this is the heartbeat and the heartbeat will be having a status which is up and the last dirty time when the last time I I have sent the heartbeat to the server last time the other service has sent a headband to the server in this timestamp okay in this time you can see 847 time right from the next time onwards guy is after 30 seconds again this guy will try to sync up with this guy let's say is there any new application has been
62:30 - 63:00 registered with this and this time after the first heartbeat you can see after the first heartbeat this is where it sent the first heartbeat after that it is hitting Delta request it is not trying to face the entire registry whether it is finding the Delta just tell me what are the new guys guys which has been registered don't send me the entire information now at the time only one register has been up then it got the thing and after that for Delta sometime
63:00 - 63:30 it will give you the same response and after listen if I'll go to the last Delta do do we have the same information over here we have the same information but after certain time the Delta will start giving you nothing like you know nothing new has been changed or nothing has been modified so after the last dirty timestamp there is nothing has been modified so I'll start giving you those data what I haven't sent you before right so Delta is basically the difference between the main call that
63:30 - 64:00 you have over here and what have newly added right so you can see once they started hitting the Eureka slash apps when it started to face the data first of all in the first time when it hit the data when it was trying to face the data it was hitting the ubray cashless apps to face the entire registry and after that they started heating the Delta request after every 30 seconds just to find out if anything has been modified if anything has been removed if anything has been changed it can see and after
64:00 - 64:30 years 30 second you can see the this this request has been camera 847 756 after 30 second there is another heartbeat 48 26 and then the next one should be after 30 seconds maybe on 56 okay see on the 56 we have the heartbeat now again on the next uh you know 30 second the heartbeat is coming right now and all these things are the rest calls and if you want to send heartbeats like in every 10 second I told you how to do
64:30 - 65:00 it how can you do it in every 10 seconds if after service want to send heartbeat to the Discovery service anybody if the other service need to send heartbeat in every 10 second then how will be configuring it right now it's sending in every 30 second right please please okay can we try this can I write lease okay and we have the leads renewal interval in second this is our heart bit you can say to send heartbeat can you
65:00 - 65:30 use this and make it 10 second now you'll see in every let me re-register this one it will be I think automatically re-register restart the application can I go to the TCP IP monitor can I clear my console now let's see that when the heartbeat is going to come okay now nothing is there now see the first heartbeat it came at 8 54 next one please after 10 second don't disappoint me yeah now it is 8 54.
65:30 - 66:00 uh 30 50. okay this is the millisecond huh next one will be at yeah it is coming after 10 second only right yes yeah so in every 10 second the address service will hit us uh the other service will hit the discovery service okay and you can see 850 450 68 previous one was 40 this one was 50 and you can
66:00 - 66:30 see now every 10 second this will be hit if you want to change it to one minute you can make it uh 60 second but that's not going to be the ideal scenario you can do it but the Eureka find it as 30 is the standard like the Netflix is fine 30 is the standard okay so anyhow that's it guys let's not talk more about this one you can set off this thing but for now this is all to show you so I will do one last thing I will remove this TCP IP monitor for now I'll go over here go to
66:30 - 67:00 the properties this is just to show you can I stop it can I remove it now can I go back to my address service go back to the properties file right now this is does not exist if you want to start it obviously initial file change it to what is what is my port number 5000 5000 is where my Eureka is running fine I changed my port number tell me guys if everything makes sense in Discovery service you have registry as false or true like the false right
67:00 - 67:30 okay come once again in Discovery service application yeah registry false we haven't set anything are you saying that registry called to True registry false which is coming here yeah yeah I'll tell you that I'll tell you that I haven't gone into that so far I'll tell you about it I'm talking about
67:30 - 68:00 maybe you are talking about whenever the URL you are seeing in the log you might be seeing uh registered with status of registry equal to false you are talking about that only yeah I'll tell you about that I'll tell you about that okay don't worry any other questions guys if things are making sense I know I made it a little boring but just want to know like you know uh actually since we are uh already having one optimal time say 30 seconds
68:00 - 68:30 which actually Place provides for uh during which time actually it will uh go and look for the heartbeat correct but to say uh you have stopped the service but since and uh there is a 30 seconds [Music] when actually a heartbeat has to be sent uh back to the server so that actually you can know that this is not alive but
68:30 - 69:00 in between if the call come then basically how yes in between if the Call Comes To Where to the micro service basically there's another concept we'll be talking about that in the neck maybe in the very next class only we'll be proving it but just for your understanding today Manish see what basically happens is imagine this is your Eureka right it has a registry some registrate is maintaining here right now imagine there is a micro service there
69:00 - 69:30 are few micro Services has been registered with Eureka and whenever they are registering they will face this registry here they will face this registry this will also face the registry this will also face the registry whenever they have started right now this guy has information about about this this guy has information about this because they all have it inside the registry now let's say now let's say this guy wants to make a call to here do you think it is going to look here no it is going to look here
69:30 - 70:00 only right now it is going to using that information using this register information that it faced from the Eureka it will make a call to here right now let's say Eureka goes down then what will happen do you think this call will happen or this call will be failing this call Will it knows where to call it's already up oh sorry sorry it will be able to make
70:00 - 70:30 but now let's say this also fails this also goes down now your Eureka is all down now if the Eureka goes down this will Eureka will not be let's say Eureka goes down for some Network failure now this is not up right if this is not off this information also cannot be removed from the Eureka right so this this does not exist right now now what will happen now whenever it will make a call then it will be a failure and if it will be a failure will it be directly giving you the failure response no then again it
70:30 - 71:00 will try to face the registry from Eureka and again if the Eureka is off by that time it will again face the registry and update the cache and will find the new instance of this and we'll make a call okay if the Eureka is not up then maybe we should have some other Eureka right we can basically yeah we'll talk about this we'll prove it don't know any other questions yes Felix yes today I understand the concept we
71:00 - 71:30 are trying to we are you are trying to tell us if the concept about Auto scaling right I'm yeah Auto scaling yeah okay so no this is not the concept of Auto scaling uh Felix this is a concept of let's say there is a Eureka server and there are many Eureka clients how these Eureka clients communicates with this Eureka server this is the concept of that and all happens between using the restful
71:30 - 72:00 endpoints and how the drafts fold and points are basically getting hit from here to here from the Eureka instances your Eureka clients are called instances how it is happening how we are connecting these things I was trying to explain using some debugging tricks but we have not done anything today isn't it all right any other questions yeah can you show the discovery service properties once Discovery service properties address service did you guys board
72:00 - 72:30 enough today during the first half whenever I was explaining you the git endpoints I think that was boring right tell me so that I can edit it at least all the people will not be bored no no it is good sir do you want me to edit anything Manish or I'll keep it like this if I keep it like this sir okay it will be good sir okay okay all right but if somebody knows no Manish if somebody knows the thing previously then it would be boring for him so in that case don't
72:30 - 73:00 follow these videos yeah you guys can skip or you guys can watch it in 2x speed guys let me tell you micro Services things are if you know it it will be just spring boots thing right maybe a lot of you should be so everywhere the configuration will Sim so anybody will teach you it will teach you this this thing only right so if you already learned micro service just watch it in 2x speed or just watch the main main important important things or maybe later we'll have some quick sessions to refresh your memory I'll try to have two
73:00 - 73:30 sessions once we complete the spring cloud and we'll wrap up everything inside that two sessions so that you guys don't have to watch every videos yeah okay come again this one only right I just wanted to yes this one if you're gonna make it this one is false but where it is right now you see it you we have it inside the discovery service I don't want whenever
73:30 - 74:00 this service starts I don't want the fetch registry from another Discovery service that's why this one is off this one is false but if you'll go to the address microservice I don't have this particular property there right by default that property is true that's why whenever it starts off it is facing the registry from the discovery service but the discovery service will be a client to another Discovery service right so it will try to face the registry from another Discovery service
74:00 - 74:30 we don't want that and we don't have it okay we don't have another Discovery service in that case only the micro Services I want to register yeah any other questions charger yeah anyhow I'll be wrapping off Felix address was giving only one thing the difference right now with that TCP monitor so yeah it will give again and again only address like I mean it's funny Delta for a specific time that is called the Dirty time the last time last
74:30 - 75:00 time last dirty timestamp for a certain amount of time it is gonna give you only the modified things and after that time it will start giving if nothing change again it will start giving you empty MTR nothing has been changed also absolutely absolutely another service whenever it'll hit it will check when the when the last hat bit came when the last time it has requested me it requested me in that time after that the last request I have given him is this
75:00 - 75:30 now again he's asking me something in that request what is the difference that we have between that the last time I solved the request right now in my server registry what I have what is the difference I'll only give him that difference if anything has been changed or modified or removed or added by that time I'll give give him that details okay okay okay make sure one thing the whenever you're starting off an application or turning down an application whenever you are going to UI
75:30 - 76:00 and you are seeing the application is not there and if you are if you just think that and seeing your application that you are having some exception wait wait for that because maybe the registry has not been updated by that time the registry is not this the registry is this end point and if this endpoint or this end point is getting hit internally you see and if it is not giving you the data then the application will throw exception so wait some time unless they were starting an application where some time to get it registered
76:00 - 76:30 with Eureka where sometimes so that this application will be registered with the Eureka and the registry it will maintain right yeah I was trying to understand that suppose because you are trying you are like Discovery services are right then you will turn off address service that time you call Eureka apps endpoint and it will get all the instances of all the services which are listed in the uh Discovery service right now come again until uh whenever sorry I just I was putting my charger in
76:30 - 77:00 yeah come again please whenever address service is up so and Discovery service is also up so address service will try to fetch uh all the registry by entering the Eureka slash apps endpoint yeah industry will give all the services Discovery services or for Discovery services on by the time uh yeah it will try to whenever I mean yeah give you employee service or whatever service yes every information
77:00 - 77:30 exactly whenever go ahead of course that suppose after like 15 minutes a new service came like student service so and then only slash Delta will be hit and it will give that at two exactly so it is that a new service has been added as student service right exactly exactly because last time first time only it will hit slash apps right it will face the entire registry and after that it will keep making the Delta call
77:30 - 78:00 okay okay and start getting the Delta the difference you don't have to take care of Delta how it is getting called internally what we will do Employee Service want to make a call to this service we will look inside this will face the instance we'll make a call here that's it
78:00 - 78:30 okay any other questions no right all good guys all good harsh sheetal um yes okay okay questions Karthik Lakshmi Lakshmi questions okay go through once no these are
78:30 - 79:00 nothing guys this is this is nothing Lakshmi if you understand it that's good if you don't understand it watch it again you'll understand it even though you are not understanding also this is all happening internally we don't have to give a damn how it is happening end of the day this sessions does not we don't need this session so why did I tease it yeah maybe you will find the find the benefit of this once you started working because you don't have to go and start debugging every time you get an issue in Eureka Discovery service all right so better we
79:00 - 79:30 spend one hour on this and from the next day onwards we're gonna be looking for doing the business thing and the business call and understanding microservice not making it complicated is that is these things complicated before you guys go is this thing is this thing is complicated I know I think I I believe it's a poor and basic yes and complicated yes um did I make it complicated harsh I think it is good to have so that we
79:30 - 80:00 can debug the things yeah so you you guys are not confused right harsh everyone oh yeah can you please confirm me everyone whoever is here you guys are not confused right no no it actually made clear okay okay okay all right all right cool so sure guys then so guys whoever hearing this do not worry take your time explore it don't no need to create TCP IP Monitor and all these things this is just for your understanding if you want
80:00 - 80:30 to do it do it if you don't want to do it no problem join tomorrow we'll talk about we'll talk about simple things okay so I'll see you guys in the next session till then bye take care and happy coding bye thank you bye-bye [Music]