Skip to content

Instantly share code, notes, and snippets.

@fulmicoton
Last active November 15, 2022 05:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fulmicoton/a4e43cb5e7b57b71742c1d1721139ef5 to your computer and use it in GitHub Desktop.
Save fulmicoton/a4e43cb5e7b57b71742c1d1721139ef5 to your computer and use it in GitHub Desktop.
```
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