Java Microservices Concept Walkthrough - Service Discovery and Registration | Spring Cloud Eureka #5
Вставка
- Опубліковано 8 лип 2024
- In this lesson We will get started with a Java Microservices Concept called Service Discovery and Service Registration. When we work on distributed systems / Microservices architecture, we deal with so many servers. It’s very difficult to know the server information as they are getting maintained by containers and servers are created and destroyed dynamically. It’s a bad Microservices practice to hardcode server urls in our code. The best thing we can do to introduce a discovery server and making our Microservices client to that. The Microservices automatically registered themselves with a discovery server during start up and discovery server maintains their information inside a server registry.
When a client Microservices wants to communicate to another service , it ask the discovery service to discover and get the service url of the desired Microservices and dispatch a call. It’s also very important to understand that here the client itself is doing the service discovery and hence it’s called a client side service discovery.
In a client side service discovery, the client once discovered the available instances of a destined Microservices ,it’s takes help of a client side load balancer to call the destined Microservices in a load balanced way .
In this lesson we will learn about the concepts of Service Discovery and Registration and in the next session we will implement the same using Spring Cloud Eureka server and spring boot.
Time Stamp
------
00:00:00 - Challenges of Microservices
00:03:27 - Network calls/Time Latency
00:07:28 - Don’t Hardcode URL
00:09:09 - Traditional Load Balancer
00:13:08 - Disadvantages of a traditional load balancer
00:16:28 - Hero Entry - Discovery Server
00:20:06 - Server side Service Discovery
00:21:28 - Client Side Service Discovery
00:31:36 - How Service Discovery and Registration Works Internally?
00:34:09 - Caching and Failure
00:35:55 - Netflix / Spring Cloud Eureka - Next
00:39:07 - QNA on Discovery Server and Service Registration
#JavaMicroservices #SpringBoot #SpringCloud
In this series of Sessions we will learn to create Microservices using spring boot and We will Implement spring cloud to resolve the known challenges during MS development.
This course will get you started with Microservices, for in-depth Microservices hands-on you can check out the below paid course : Course Name : Spring Boot Advanced + Microservices Bootcamp (Running Batch)Mode : Live / Self-Paced
www.seleniumexpress.com/cours...
#Microservices #SpringBoot #SpringCloud #java
For more free / paid courses visit
www.seleniumexpress.com
LINKS AND FREE LEARNING RESOURCES
========
Watch my new mock interview series for java developers
• Java interview questio...
Watch Spring boot Hot topics
• @Reposicotry Vs @Servi...
Java Interview / Question and Answer series
• Java collections inter...
Explain spring Bean Lifecycle
• REAL-TIME: Spring Bean...
spring core
• Spring framework tutor...
spring mvc
• Spring MVC course intr...
spring mvc intermediate
• [INTERMEDIATE] Spring ...
Spring JDBC
• Spring JDBC Course Pre...
spring live project
• #1 Build and Deploy A ...
SPRING SECURITY COURSE[NEW]
• Spring Security Course...
For more courses visit
www.seleniumexpress.com
Any time you are getting stuck with issues, Feel free to ask for support.
You can send mail to seleniumexpress@gmail.com
you can ping me on my Facebook page
/ seleniumexpress
Make sure to join my private Facebook page (Ask me here)
“SeleniumExpress - Support"
/ 187000222361579
you can ask for support in my website forum
www.seleniumexpress.com
Subscribe to my youtube channel
/ @seleniumexpress
Follow me on Insta
/ selenium_express
Many of us can't afford heavy price course....but , When you upload such FREE videos.. which are so important and So useful to get a job, you not only have a lifetime THANK YOU from the person watching it..but from his whole family..
Thanks a ton 🙏
❤️
is am i the only one who don't skip the into because i love the bgm.😂❤
I've not seen a better teacher. You've the supreme gift of explaining things
Here we go with a bang on Saturday to learning revolution. Thank you for all the effort sir. Will be awaiting for the next Saturday also for the same Josh ful session.
Thanks for the kind words! ❤️
Having so much of interest about your sessions. understanding very clearly. thank you so much
If you want to learn Microservices , then you are in right place. It will very helpful for you. Sir I like your teaching style.
Feeling very good, excellent explanation! Dhanyavaad mahoday!
Appreciate the content. the way you described is really awesome. it is crisp and clear and I am awaiting for this whole series. nice work done by you. Kudos to you , hope you launching the series faster.
Amazing, you are explain different Client Side Discovery with Server Side Discovery very clear !
Great course. Awesome content and Incredible effort.
Thank you so much Abhilash for sharing such an informative session for free. Really appreciate your efforts..!! Best explanation available on youtube for spring boot microservices :)
Thank you so much for explaining these concepts very easily. And love u so much sir❤ because you care for new learners. thank you so much for that. You are the best teacher❤
Amazing video and great playlist. Thank you, sir, for all this content.
I really have to say this. The intro and outro bgm is damn good. Apart from the good technical content you have worked on video quality as well and it is clearly visible. Thank you so much for the efforts.
Thanks for these tutorials, Feeling good!
Amazing and best explanation as always.
03:10 is too much funny :). Thanks for this series
Very interesting... I am learning a lot. Thanks.
Thank you so much. Feeling really happy :)
superb way of explaining things. Such a creative and interesting video to learn.
thank you for everything you are a great man
Thank you sir ☺️ Great video
Appreciate this series.👌
Thanks so much 😊
Really great tutorial
thank You Abhi. really helpfull.
Thanks Sir a good explain !
Thanks for the informative video. Well presented.
Glad you liked it .
Just say.. wow..I 'm very new to microservices.... but you made it very easy to understand.. thanks a lot.❤ Mahadev apko aur aage badhaye..🕉
Great explanation keep going on ♥
Excelent as always!
Interesting and feeling good
Thank you so much Abhilash
Waiting for next video
My pleasure, Suneel!
Next Saturday, we will get started with the service discovery and registration - coding.
We will use spring cloud Netflix eureka library for all the things explained in this video.
Thanks abhilash....big fan from Pune🤩...please complete all microservices concepts
Thank you Gokul ❤️
I learnt from your videos especially this series ,thank you soo much..i trying to learn microservices with my java knowledge but no udemy course help me to understand ...Thank you soo much
when you providing any course online next ,please let us know ,i am interested to enroll
💯Interesting....
Thank you so much
Welcome,Gopal !
Thank you.
Welcome, Nguyen !
Feeling Good😄
Thank you
My pleasure, Vithal !
Thanks abhi❤️
Welcome,Gopal !
Thank you for detail explanation.! Could you please also explain what are the use case of server and client discovery and where to use which one and what are benefits of both on each other?
Thnks for this video
My pleasure, Mansingh !
Thank you abhilash
Mention not, Santhosh!
awesome
going good..
Tq
Interesting
Thank you so much valuable content
Waiting for next video which topic??
Hi Deepak.
Discovery Service and registration - Coding in depth
Hi Abhilash , my spring boot application is deployed to gcp , gcp has provided us one base url so event if the number of instances increase that base url doesn't change gcp automatically load balance it , do we still need service registry here ?
feeling good
Good
you are a genius, when will you post the next video? waiting ......
Hello Akhil ! Just posted.
hello abhilash , pls upload rest of the video
So you have recorded videos for adv + microservices course?
for example we are using angular for front end, from angular i need to call service A , so one festival time their are lot of hits to service A
how do we need to handle the Service A which is connected with Front End server
Sir can you please help to get some clarity ?
Hi Abhilash. Thanks for creating such awesome content. I have got a doubt.
You said front load balancer/traditional load balancer is not good as there are call hops. We are calling load balancer then load balancer is calling service B. Isn't the same thing happening with service discovery as well in fact here load balance is doing an extra work by querying service discovery and getting server details . Then how come this is better than traditional one ? Please do answer.
Traditional load balancer is not good because it's not supporting run time server scalup or scale down ..in real time ms application always this scalup and scaldown is needed
We are waiting next video
New video of this series will be up on next Saturday!
In one of the slide you mentioned all the services [either caller service(A) OR Target Service (B)] having information that how many total services[A+B] are running including Discovery Server but I think only Discovery Server know this thing and it handed over this information to caller Service i.e. A when it make a call to Service B - Please comment !
Hi Ajay. Thanks for posting a comment.
If we talk about Eureka , as a discovery Server, all our microservices are client to eureka server. When all our microservices started, they try to connect to the discovery server and get the entire eureka registry and caches it .
So when our service A, B starts, a background thread get the entire eureka registry and store it in the client side.
so when A is making a call to b, A knows how many instance of B has, and call one of the instance in a load balanced way.
B has nothing to do with it , it just accept the requests and serves it. but yes, B knows How many instances of A are running which it can use to communicate with A whenever needed. (It has nothing do with how many A servers are there and it just serves the current request)
In our follow up lessons , we will have 2-3 hours practicals only on this things. You will find that internally all the eureka clients makes rest calls like eureka/apps to fetch all the registered apps and they make follow up delta calls to stay updated with Discovery service.
Thank you for the great video Abhilash! When we have multiple microservices do we store them in one repository or do we create separate repositories for each microservice? Can you show us what is the best practice? Thank you in advance!!!
each microservices should have separate git repository !
@@SeleniumExpress Thank you!
Hi Abhilash, I have doubt.
I know whenever a request hits server it will use one thread from thread pool and process that request. Load balancer which we use in microservices is used to reduce load on one server and distribute our request equally in respective available server. My question is what if many request hits load balancer and it is out of threads. how this is handled?
💥💥💥💥💥🔥🔥👍
How often the cache is updated in discovery client, if another microservice portno got changed, it is updated in discovery service, but how the discovery client will get to know other portno got changed. As registry information was already pulled and updated in discovery client cache.
Hi
In server side load balance, u mentioned that we need to add services manually to service discovery that we need extra man to do this work.
What about the client side,?
Hi Salmaan, once you introduce discovery service, no manual configuration is needed.
@@SeleniumExpress thank you, can I get a chance to be in your sessions?
Hi Abhilash. First Thanks for tutorials.
My question is from 33.00 min how service discovery and registration works.
Que 1) When Server details (IP address and port number ) cache from discover service into both client and servers ? ( When we starts server ? )
2) what will happen if we de-register servers from discovery service after caching data on client and server side
Thanks...
Hi Akshay! Thanks for posting this question. I have added a lesson today with practical examples in today's upload. Please check Lesson 8 of this series.
Keep me posted if it doesn't answer your questions
@@SeleniumExpressThanks Abhilash
Is it correct, In Server-Side-Load-Balancing having 4 entities [Caller Service, Target Service, Load Balancer and Discovery Server] where as in Client-Side-Load-Balancing having 3 entities [Caller Service, Target Service and Discovery Server] as a primary difference ?
Correct ! in the client side, client only do the load balancing.
In the server side, the client doesn't do anything, it just dispatch the request to LB and then load balancer does the rest of the work.
Abhilash bro i have one question actually two
1.So when developing a distributed sysyem what should i choose client side or server side load balencing . Or both necessary but for me it lokks either of one is needed
2. This is about Discovery service in both client side and server side load balencing is the discovery service same i mean is it the same library or microservice. Is it the developer resposiblity to configurd that in both cases of load balencing
Please if anyone know the answer pls reply ?
Wo hoo
Thank you so much Abhilash...always waiting for your new videos
What's the Exact Difference Between Service Discovery and Load Balancer
How the serverA with know that its ServerB IP?
Apke video dekh dekh kar job le lee
☺️❤️
intersting but confused too.
Interesting
feeling good
feeling good
Thanks Alok for completing halfway 😀
@@SeleniumExpress excited to see next session, whatever i saw till now it was awesome and help me to grow my knowledge thanks for sharing
See you next Saturday!