‹ Ship Your Tool Lesson 11 of 16
Contents Lesson 11 of 16

4 min read · professional

Quota in production

Course 4 gave you a refresh budget for a cockpit you were sitting in front of. Deployed, it spends whether or not you are there — and things you did not think of spend it too.

What consumes quota when nobody is looking

Four sources, roughly in order of how surprising they are:

  • A tab left open. The most common by far. Someone opens the cockpit on Friday and leaves it. Course 4's pause-when-hidden rule is what stops this, and it stops being optional here.
  • Your own monitoring, if the health check touches the upstream API. Design it not to; that is why the previous unit's endpoint costs nothing.
  • Crawlers. A public URL gets bots within days. They will not run your JavaScript, but they will hit any endpoint they can find, and your proxy is an endpoint.
  • Anyone you shared the link with, spending your allowance at whatever rate they like.

Every one of these is spending a currency you priced in course 4 at 1 call per live symbol, 5 per screen, 10 per fundamentals request.

Budget in three parts

Split the daily allowance deliberately:

Interactive (you using it)   60%
Background (alerts, health)  30%
Reserve (manual refresh)     10%

The reserve is the part people omit and then regret. When you hit the limit, you want a deliberate "refresh now" to still work, because that is the moment you actually need the number.

Enforce the split at the proxy, not in the page. The page is a suggestion; the server decides. Same rule as clamping limit in course 2, applied to a budget.

Degrade in a fixed order

Decide once, while calm, what stops first:

  1. Background refresh of panels nobody is looking at.
  2. Automatic refresh entirely; manual only.
  3. Alerts, with a notice saying so.
  4. Serve cached data, labelled, and refuse new fetches.

Written down, this is a policy. Undecided, it is whatever the code happens to do at 3pm on a busy day, and it will not be what you would have chosen.

Cache is the cheapest thing you own

A quote cached for a minute costs one call instead of sixty for a page refreshed every second. A daily series cached until tomorrow costs one call a day.

You built the cache in course 4 for consistency. In production it is also the largest single lever on cost, and the two motivations point the same way — which is usually the sign of a good design.

Try it now

Leave your deployed cockpit open in a background tab overnight and read the meter in the morning. Whatever that number is, it was spent on a page nobody looked at — and if it is not zero, your pause-when-hidden rule is not working.