While a circuit breaker will interrupt calls to faulty services, the missing data will cause user impact. In this video, learn how to use a cache to overcome this.
- [Narrator] With the circuit breaker in place, … service outages won't take down … our whole infrastructure anymore. … Still, our goal should be to keep … the user impact as low as possible. … And right now, we still get the somehow empty page … because we got no response from the service. … In this video, we will now add a simple local cache … that will return a cached result in case the service fails. … For that, let's open Speakers.js … on the Conference app, and there, at the top, … I have to bring in a few dependencies … that we will need later. … So add: const url equals require, … and we also will need crypto, … const crypto equals require crypto. … Now I head down to line 73 … where the callService method is, … and we will extend the null a little bit. … I want to create a key, a cache key, … that, again, uniquely identifies an endpoint. … But in this case, I want it to be independent … of the port and IP because an endpoint … should return some result regardless … of the individual service instance it is running on. …
- 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.