How each option works

Today a report request reads the database every time. Both options add a cache. The mark on a part shows what is new or changed.

flowchart LR
  req[request]:::k1 --> app[report handler]:::k1
  app -->|look up| mem[(in-process cache)]:::added
  mem -->|miss| db[(database)]:::k2
  db -->|fill| mem
request --> report handler --> in-process cache (new) --miss--> database --fill--> cache
flowchart LR
  req[request]:::k1 --> app[report handler]:::changed
  app -->|network call| svc[(shared cache service)]:::added
  svc -->|miss| db[(database)]:::k2
  db -->|fill| svc
request --> report handler (changed) --network--> shared cache service (new) --miss--> database --fill--> service

What the measures say

Measures for each option, with where each one comes from
MeasureA in-process cacheB shared cache serviceSource
New service to runNoneOneChecked: the deploy plan
Warm-up after a restartEach server aloneOnce for allAssumed: from how caches work
Extra delay on a hitNoneOne network callAssumed: not measured here

What if

Change a value to see the database load for each option. The hit rate is not known yet, so it starts empty: the results wait for a low and a high guess.

Database load for each option
OptionDatabase load
A in-process cache
B shared cache service

Leading option for these values:

Option A stops fitting under the database limit at:

The answer changes when the low guess moves to:

The option that then leads:

When each option can be undone

Before you choose

Imagine you chose the leading option and it failed a year later. What went wrong?