digitalbazaar / digitalbazaar/webkms-client
Where does retry logic belong in the webkms stack?
@dmitrizagidulin is already working on this.
Since Jul 6, 2021.
- Dominant language
- JavaScript
- Stars
- 6
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
If an HTTP timeout (specifically) occurs when interacting with the a KMS server, should a retry occur, and if so, at what layer of the stack should retry logic be implemented?
ky returned an error Request timed out by way of @digitalbazaar/http-client.
https://github.com/sindresorhus/ky#retry
ky does have some default retry capability, but note that POST is not a supported method by default. It appears to me that explicitly allowing a retry for the POST method on a kmsClient.verify call would be possible. The safety of doing this would need to be evaluated.
Triaging an HTTP timeout error in the bedrock-tokenizer stack led me here.
https://github.com/digitalbazaar/webkms-client/blob/main/KmsClient.js#L434-L436
The timeout occurred when hmac.verify was called on the hmac returned here:
https://github.com/digitalbazaar/bedrock-tokenizer/blob/master/lib/tokenizers.js#L200
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.