Last active
November 15, 2022 05:48
-
-
Save fulmicoton/a4e43cb5e7b57b71742c1d1721139ef5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
If an app invokes 1000 RPC calls to proceed, | |
and the 99th percentile delay for all of those | |
calls is 100ms, what is the likelihood that your | |
app will need to wait <=100ms to proceed? | |
``` | |
Let's assume that the app needs all RPC to | |
return before displaying something. (which is | |
not necessarily the case) | |
Let $X_i$ be the response time of $RPC_i$, | |
and $T$ the overall response time. | |
We also assume the X_i independent. | |
We then have: | |
T < t <=> (X_1 < t) ^ ... ^ (X_i < t) ^ ... ^ (X_1000 < t) | |
P(T < t) = | |
Product_i=1..1000 P(X_i < t) | |
= (99/100) ^ 1000 | |
= (1 - 1/100) ^ 1000 | |
~ exp(-1000/100) = exp(-10) = 0.000045 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment