Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Node Cookbook

You're reading from   Node Cookbook Actionable solutions for the full spectrum of Node.js 8 development

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher Packt
ISBN-13 9781785880087
Length 656 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
David Mark Clements David Mark Clements
Author Profile Icon David Mark Clements
David Mark Clements
Peter Elger Peter Elger
Author Profile Icon Peter Elger
Peter Elger
Mathias Buus Madsen Mathias Buus Madsen
Author Profile Icon Mathias Buus Madsen
Mathias Buus Madsen
Matteo Collina Matteo Collina
Author Profile Icon Matteo Collina
Matteo Collina
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Debugging process* 2. Writing Modules FREE CHAPTER 3. Coordinating I/O 4. Using Streams 5. Wielding Web Protocols 6. Persisting to Databases 7. Working with Web Frameworks 8. Dealing with Security 9. Optimizing Performance 10. Building Microservice Systems 11. Deploying Node.js

Service discovery with DNS

Once a microservice system begins to grow past a few services we typically run into the challenge of service discovery.

By this we mean:

  • How a consumer of a service determines the connection parameters to allow it to consume a downstream service. Typically this means the IP address and port number to connect to.
  • How a service registers itself with the system and advertises that it is available to be consumed.
  • When multiple instances of a service start up how the system will handle load balancing and state between them.
  • How we discover services in development and in production without having to run production infrastructure locally.

So far in this chapter we have been using environment variables to connect our services together, these variables have been generated for us by the Fuge tool. The astute reader may have wondered as to the format of the variables...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime