Separate retry backoff calculation from retry scheduling #171
Labels
blocked
Work is blocked on this issue for this codebase. Other labels or comments may indicate why.
feature-request
A feature should be added or improved.
Describe the feature
Smithy Reference Architecture defines the
RetryBackoffStrategy
type, which (translated to Swift) is:Calling the
computeNextBackoffDelay(attempt:)
method on this protocol allows a client to determine the delay to wait before performing a retry. The client can then use this delay to schedule retry using the scheduling mechanism and HTTP client of their choice.Looking at the CRT implementation of retry,
aws-c-io
does not expose such a method, even though it does calculate the needed delay internally. Instead, it appears that the C function aws_retry_strategy_schedule_retry is provided, which calculates the delay and schedules the retry, after the appropriate delay, on CRT's own event loop. (aws-crt-swift
uses this C method in itsscheduleRetry(token:errorType:)
method for its own public retry interface.)Please provide methods for determining retry backoff delay separate from the methods for scheduling retry; this will assist with compliance with the Smithy Reference Architecture and with future modularization work on the AWS SDK for Swift.
Use Case
Allows for use of CRT's retry backoff logic with non-CRT HTTP clients.
Proposed Solution
No response
Other Information
No response
Acknowledgements
The text was updated successfully, but these errors were encountered: