Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Services Discovery Patterns in Microservices [F...

Services Discovery Patterns in Microservices [Free Meetup]

In microservices architecture, service instances are continuously created, restarted, moved, and scaled. Their network locations can change dynamically, making hard-coded endpoints impractical.

This talk explores five essential Service Discovery design patterns that enable microservices to locate and communicate with each other reliably. For each pattern, we examine the problem it addresses, its solution, and the advantages and disadvantages of using it.

The talk provides a practical foundation for understanding service discovery in distributed systems and making informed architectural decisions when developing microservices.

You can find the video at https://youtu.be/GCeJFxKyn-s

You can find more information about this meetup at https://www.meetup.com/lifemichael/events/315134024/

You can find the post that summarizes this meetup at https://lifemichael.com/en/highlights-from-our-meetup-on-service-discovery-design-patterns/

You can find more info about the series of 10 meetups this meetup belongs to at https://lifemichael.com/en/series-of-meetups-on-microservices-design-patterns/

Avatar for life michael

life michael

October 08, 2026

More Decks by life michael

Other Decks in Programming

Transcript

  1. My name is Haim Michael. I live in Tel Aviv,

    and I am the CEO & founder of Zindell Technologies, Ltd. My passion lies in teaching and lifelong learning. I have been into programming since my childhood. I have extensive experience with Java (30+ yrs), JavaScript (30+ yrs), C++ (30+ yrs), C# (20+ yrs), TypeScript (12+ yrs), Python (15+ yrs), PHP (20+ yrs), Scala (16+ yrs), and Kotlin (12+ yrs). Teaching advanced topics in computer science at the university. blog.lifemichael.com Tel-Aviv, Israel
  2. XtremeJ XtremePython XtremeAI xtremej.dev xtremepython.dev meetup.com/lifemichael xtremeai.dev More Than 18000

    Followers https://linkedin.com/in/lifemichael Kiro Ambassador XtremeJS xtremejs.dev More Than 2800 Video Clips youtube.com/lifemichael blog.lifemichael.com Conferences, Meetups & Community
  3. Jacado - More Than 200 Games for Mobile Telephones –

    Years 2001- 2008 Zindell - Building AI Aligned Companies – Years 2026 - … nana.events prompo.ai zindrex.com ngager.pro jacado.games blog.lifemichael.com Passion to Build
  4. What is Service Discovery Service Discovery is the mechanism that

    enables a service in a distributed system to dynamically find the network locations of other available service instances without relying on fixed IP addresses or hardcoded endpoints.
  5. Why a Service Discovery A service's IP address may change

    dynamically. Instances are continuously created, restarted, moved, and scaled.
  6. Service Discovery Design Patterns We will cover the following design

    patterns: • Client-Side Service Discovery • Server-Side Service Discovery • Service Registry • Self Registration • Third-Party Registration
  7. Client-Side Service Discovery The Solution When a client sends a

    request to a service, it obtains the service's location by querying a service registry.
  8. Client-Side Service Discovery The Result + Simpler solution compared with

    the Server-Side Discovery pattern. - The client is coupled with the service registry. - We need to implement separate service discovery for every programming language.
  9. Server-Side Service Discovery The Solution When making a request to

    a service, the client sends the request through a router, which might also be a load balancer, running at a well-known location. The router queries a service registry, which may be built into the router itself, and then forwards the request to an available service instance.
  10. Server-Side Service Discovery The Result + Compared with Client-Side Service

    Discovery, the code we need to write on the client side is simpler. + Some cloud environments already provide an implementation for this design pattern (e.g., AWS Elastic Load Balancer).
  11. Server-Side Service Discovery The Result - Unless we are using

    a Cloud Provider’s implementation, implementing this pattern might be relatively complex. - More network hops compared with Client-Side Service Discovery.
  12. Service Registry The Problem How do clients of a service

    (in the case of Client-Side Discovery) and/or routers (in the case of Server-Side Discovery) know about the available instances of a service?
  13. Service Registry The Solution Implement a service registry that uses

    a database to maintain information about services, their instances, and their locations. Service instances register with the registry when they start and deregister when they shut down. Clients (or routers) query the registry to discover available service instances.
  14. Service Registry The Result + When the registry service is

    already available as part of the cloud solution provider we use, using this pattern will be very simple. - When the registry service is not available, implementing it by ourselves would require significant effort on our end.
  15. Self Registration The Solution The service instance registers itself with

    the service registry. When it starts, it sends its network location (host and IP address) to the registry so other services can discover it. It usually renews this registration periodically to show that it is alive. When shutting down, it removes itself from the registry.
  16. Self Registration The Result + We can implement an Observer

    on the client (service) to update the registry with changes in its state. That can allow us to have more than two simple states (on/off). - The service is coupled to the service registry. - When a service fails but remains registered, it might fail to unregister itself.
  17. Third Party Registration The Problem How do service instances register

    with and unregister from the service registry?
  18. Third Party Registration The Solution A 3rd-party registrar registers and

    unregisters a service instance with the service registry. When the service instance starts up, the registrar registers it with the service registry. When the service instance shuts down, the registrar unregisters it from the service registry.
  19. Third Party Registration The Result + The service code is

    less complex than when using the Self Registration pattern. + The registrar can perform health checks on a service instance and register/unregister the instance based the health check
  20. Third Party Registration The Result - The 3rd-party registrar may

    only have partial knowledge of the service instance's state and may not know whether it can handle requests. - Unless the registrar is part of the infrastructure, we have to do extra work to install and configure it.
  21. Q&A nana.events Thanks for attending my talk :) WhatsApp +972.54.6655837

    nana.events Jacado [email protected] https://blog.lifemichael.com jacado.games prompo.ai prompo.ai ngager.pro life michael lifemichael.com XtremeJ xtremej.dev life michael XtremeJS xtremejs.dev XtremePython xtremepython.dev XtremeAI xtremeai.dev meetup.com/lifemichael Monolith vs Microservices