Grokking the Modern Frontend System Design Interview
0% completed
Exercise: Retry Delays with Backoff
Retries Timeouts and Failed Requests gave Basket a retry rule for failed reads. The wait before each retry is random, between 0 and a ceiling that starts at 500 ms and doubles after every retry, up to 8 seconds. This exercise computes those waits, with the random part given as input so that the result can be checked.
The Task
Write retryDelays(baseMs, maxMs, jitterPercent), which returns the wait in milliseconds before each retry.
baseMsis the ceiling for the first retry
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%