In this video, learn how to create the basic structure of the registry logic and implement a method that registers services.
- [Instructor] We will implement all the registry logic … in a dedicated class. … So in my speaker service project, I go into server. … And there I create the new folder, lib. … And in there I create the new file, ServiceRegistry.js. … And I start off with declaring the class. … Class, ServiceRegistry. … And let's not forget to also module exports this class. … I usually forget that, and then nothing works. … Now we have to add a constructor … and this constructor gets an instance of log … because we want to do some basic logging. … Let's write this logging stance into a member property … of this class. … And we want to initialize a few more things. … So first I will add this.services. … So this is the structure that will then … hold all those services. … And this should be initialized as an empty object … because in the beginning it's, of course, empty. … Then I want to set the timeout, this timeout equals 30. … We will later add some logic that will expire services … that haven't been seen for more than 30 seconds. …
- Setting up a service registry
- Registering and deregistering services
- Versioning and load balancing
- Adding the service logic
- Working with the circuit breaker
- Using queues
- Consuming and storing feedback
Skill Level Intermediate
Node.js: Debugging and Performance Tuningwith Jon Peck2h 44m Intermediate
1. Get started with Microservices
2. Creating a Service Registry
3. Splitting Up a Monolith into Microservices
4. Adding Fault Tolerance and Resilience
5. Using Queues with Node.js
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.