This blog post provides a brief overview about the use and significance of service discovery in microservices.
If we developed a multiple microservice in a project. then we call the all microservice directly it means we write the URLs hard code for access to the microservices. If we are work on larset project then it is maintain very difficult to manage the all microservice URLs manually, it mines write all URLs in our code is manula (static). And after some time we need to change some microservice URLs, then we can be required for update this URL in our project this is so difficult.
Why are hard coded URLs bad?
There are some reason for hard code URLs use in our services-
If we use the service discovery, then the hardcoded URLs no need to be written in our projects. In service discovery technology it manages the microservice URLs. And clients need to call any microservice to ask the URL of that microservice from service discovery.
There are mainly two type of service discovery technologies-
Client side service discovery: In this technology firstly clients send the request to service discovery and get the URL of microservice which needs to use it and then call which URL and get data.
For example: The user needs to purchase some products. The user searches in google and finds that location of the shop and then goes to that location and purchases his/her products. Here, a user is a client, google is a service discovery and a shop is a microservice.
Server side service discovery: In this technology users call the service discovery for the specified URL and then service discovery calls which URL specific that microservice and get the data and send data to the user.
For example: The user needs to contact the marketing manager of any big company for any query. Then he can not contact directly firstly contact the receptionist of that company then he/she contact the marketing manager. Here, the user is a client, receptionist is a service discovery and marketing manager is a microservice.
We are a seasoned ERP development company that provides full-scale ERP consulting and software development services to clients. Our development team is skilled at using advanced tools and technologies to build user-centric ERP software solutions for clients. We also specialize in microservice-based application development and containerized deployment on the cloud. For project-related queries, reach us out at [email protected].