Fail-fast pattern
The fail-fast pattern states that if a service has to fail, it should fail fast and respond to calling entities as soon as possible. Think of this scenario: you have clicked a link and it shows you a loader. It makes you wait for three to four minutes and then shows an error message, Service not available, please try again after 10 minutes. Well, service not available is one thing, but why make someone wait just to tell them that the service is not available right now. In short, if a service has to fail, it should at least do it quickly to maintain a decent user experience.
One example of a fail-fast implementation is if your service is dependent on another service, you should have a quick mechanism to check if the third-party ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access