The fail-fast reactive design pattern stipulates that if something is going to fail, let it happen as fast as possible. The intention is not to perform any unnecessary processing because something is going to fail. We should also be mindful of wasting user time. A scenario would be if a user was given the opportunity to complete a survey and receive a gift card for completing it. If the user answered the first 25 questions and then the survey indicated the user was not eligible for the survey or the gift card, the result would be dreadful. In this scenario, the disqualifying determination should be made much earlier.
Understanding the fail-fast design pattern
Programming the design pattern
Let's take a look at an example...