Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
TypeScript Microservices

You're reading from  TypeScript Microservices

Product type Book
Published in May 2018
Publisher Packt
ISBN-13 9781788830751
Pages 404 pages
Edition 1st Edition
Languages
Toc

Table of Contents (17) Chapters close

Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
1. Debunking Microservices 2. Gearing up for the Journey 3. Exploring Reactive Programming 4. Beginning Your Microservice Journey 5. Understanding API Gateway 6. Service Registry and Discovery 7. Service State and Interservice Communication 8. Testing, Debugging, and Documenting 9. Deployment, Logging, and Monitoring 10. Hardening Your Application 1. Other Books You May Enjoy Index

Circuit breakers and its role


In the practical world, errors do occur. Services can timeout, become unreachable, or take longer to complete. Being a distributed system, the entire system should not go down. The circuit breaker is the solution to this problem and it is a very important component in API Gateway.

The pattern essentially works in two states. If the circuit is closed, everything is normal, the request is dispatched to the destination, the response is received. But if there are errors or timeouts the circuit is open which means that route is not available as of now, we need to go a different route or way to achieve the service request. To achieve this functionality, Netflix has open sourced their project—Hystrix. This is, however, the Node.js version of the same: https://www.npmjs.com/package/hystrixjs (it's not official from Netflix, but rather an open source project). It even has the Hystrix dashboard for monitoring purposes. According to Hystrix's library, it has the following...

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 $15.99/month. Cancel anytime}