Fan out and fastest response

This approach is a bit costly in terms of computing power, but is useful in case response time is critical for our application. The idea in this approach is to have multiple replicas of our service. The caller will simultaneously call all these instances and accept the response from the one that responds fastest. As there is additional overhead in the use of this approach, caution is recommended.

Let's take a look at an example scenario:

The example given here shows that Service A needs to call Service B and fetch a response. Calling the service would send simultaneous requests to multiple instances of services being called. The response received fastest will be processed by the calling service. We can see the advantage of this approach is that if some instances are in an error state or taking too much time to respond, it will not impact our service as long as any one of the instances being called is able to send the response in a timely manner. As already mentioned, this approach adds to the cost of the overall system in terms of a greater hardware power requirement, so caution is required when using this approach.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.95.245