Skip to content

Commit

Permalink
minor L15
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklam committed Sep 11, 2024
1 parent 34232db commit 96adce3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
15 changes: 8 additions & 7 deletions lectures/L15-slides.tex
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

Max C requests to change your user data per day, and a max of D requests of any type per day in total?

Slow down vs just reject? We'll just reject for now.
Slow down vs just reject? We'll just talk about rejection for now.

\end{frame}

Expand Down Expand Up @@ -145,7 +145,7 @@

If the rate limit is super high compared to usage, no problem.

Hitting the rate limit regularly? Frustrating or could get us banned!
Hitting the rate limit regularly? Frustrating, or could get us banned!

\end{frame}

Expand Down Expand Up @@ -193,7 +193,7 @@
Remember what we discussed about write-through and write-back caches.

It can be difficult to know if the data is changed remotely.\\
\quad Use domain knowledge here! e.g., exchange rate quotes valid 20 mins.
\quad Use domain knowledge here! e.g., exchange rate quotes valid 20 minutes.

\end{frame}

Expand All @@ -208,16 +208,16 @@

There do need to be things to group with...

And perhaps the remote API has to support it.
And the remote API has to support it.

\end{frame}

\begin{frame}
\frametitle{Bigger Requests, Bigger Parsing}

Grouping requests may also make it hard to handle what happens if there's a problem with one of the elements in it.
Grouping requests may also make it hard to handle if there's a problem with one of the elements in it.

If we asked to update five employees and one of the requests is invalid, is the whole group rejected or just the one employee update?
If we asked to update five employees and one of the requests is invalid, is the whole group rejected or just the one employee update? (Is it a transaction?)

Consider the risks of more complex logic.

Expand Down Expand Up @@ -332,6 +332,7 @@
\frametitle{Schedule Later}

For requests that are not urgent, then another option is to schedule the requests for a not-busy time.
(Conversely, CPUs have burst mode, which makes them go faster when busy).

\begin{center}
\includegraphics[width=0.7\textwidth]{images/popular-times.png}
Expand Down Expand Up @@ -382,7 +383,7 @@

That's not a disaster, as long as we handle it the right way.

The right way is not try harder or try more; if we are being rate limited then we need to try again later, but how much later?
The right way is not try harder or try more; if we are being rate limited, then we need to try again later. But how much later?

\end{frame}

Expand Down
Loading

0 comments on commit 96adce3

Please sign in to comment.