O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Maintaining service registry

In this section, we will see how a consumer ultimately finds a service provider. We will see all available approaches and look at the pros and cons of each option:

  • Updation through sockets: Regular polling soon becomes a problem as consumers are least concerned with registering themselves with the discovery service, and it also becomes painful for the discovery service to maintain a list of the consumers. A better solution would be for the client to open up a socket connection with the discovery service and continuously get an up-to-date list of all the service changes.
  • Service discovery as a proxy: This is more of a server-side implementation where logic for routing is present in the discovery service, making ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required