What Is the Retry Mechanism of SDK?
SDK uses the maxErrorRetry parameter configured in Configuring an Instance of ObsClient to retry. The default value for retry times is 3. A value ranges from 0 to 5 is recommended. If the network connection is abnormal or the server returns the 5XX error when an ObsClient API is called, the SDK performs an exponential backoff retry.
- For ObsClient.putObject, when the data source is an InputStream other than FileInputStream, the SDK does not retry when an I/O exception occurs because the data stream cannot be read back. The upper-layer application needs to retry.
- When ObsClient.getObject is successfully called and ObsObject is returned, the SDK does not retry when an I/O exception occurs during data reading from ObsObject.getObjectContent because this situation is beyond the scope of the processing logic of the SDK. The upper-layer application needs to retry.
Last Article: How Can I Identify the Endpoint and Region of OBS?
Next Article: How Do I Obtain the Static Website Access Address of a Bucket?
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.