O'Reilly logo

Hands-On Enterprise Java Microservices with Eclipse MicroProfile by Scott Stark, Antoine Sabot-Durand, Pavol Loffay, Jeff Mesnil, Heiko W. Rupp, Cesar Saavedra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Retry

Retry in fault tolerance lets you retry a request to another service in case the first request fails (see Chapter 3MicroProfile Config and Fault Tolerance, for more information). Now, consider that you have the following code:

@Retry (maxRetries = 3)void aMethod() {    callBackend();}

Although this tells Istio to retry 5 times, you may end up with 15 retries (Istio will retry 5 times for each of the 3 retries in your code before it returns an error) before aMethod finally ends with an error. You may consider turning off the retries in code, as changes to the number of retries in Istio can be made on the fly without the need to restart a pod.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required