Today we share with you the timeout and retry configuration of
The following points need to be noted.
- The connection timeout (connectTimeout) and the read timeout (readTimeout) will take effect when configured at the same time.
- The timeout unit is milliseconds.
- The timeout can be defined individually according to the service name.
For example, if the
provider-get service provides a query interface, the timeout can be set shorter as follows.
provider-post service provides the data processing interface, and the timeout can be set longer.
Understanding of the three parameters.
- period: period, retry interval time
- maxPeriod: maximum period, the retry interval time gradually increases according to certain rules, but cannot exceed the maximum period
- maxAttempts: the maximum number of attempts, the number of retries
After that, we can configure.