Error retry the AWS and exponential backoff

  • A large number of components on the network (such as DNS servers, switches, load balancers, etc.) may request the life cycle of any link problems in a given. In a networked environment, conventional processing techniques to respond to these errors is to implement retry the client application. This technology can improve application reliability and lower operating costs developers.
  • Each AWS development toolkits implement automatic retry logic . AWS SDK for Java will automatically retry the request, you can use the  ClientConfiguration class to configure the retry settings. For example, for requests made using lowest latency and do not want to retry the page, you might want to turn off retry logic. You can use the  ClientConfiguration class, and to  maxErrorRetry provide  0 this value, which is set to not try again.
  • If you do not use the AWS SDK, you shall receive server error (5xx) or limit error retry the original request. However, the client error (4xx) you need to modify the request itself, correct the problem, and then try again.
  • In addition to simply try again, each AWS development kit further embodiment exponential backoff algorithm to achieve better process control. Exponential backoff principle is the wrong response to continuous retry interval to wait longer and longer. You should implement the longest delay interval and the maximum number of retries. Maximum delay interval and the maximum number of retries is not necessarily a fixed value, and should be set according to the operation being performed and other local factors (e.g., network delay).
  • Most exponential backoff algorithm will use jitter (random delay) to prevent continuous conflict. Because in these cases you do not try to avoid such a conflict, there is no need to use this random number. However, if concurrent clients, shake to help you succeed faster execution of the request. For more information, see exponential backoff and shake Bowen.

Guess you like

Origin www.cnblogs.com/cloudrivers/p/11617303.html