Admission control is often an afterthought. You build the application, get it working, and eventually discover what happens when too much work arrives. Then you add rate limits, queues and timeouts across several layers, each with its own idea of when the system is full.

It is tempting to think a small application doesn’t need admission control, or that autoscaling will take care of it. But being small doesn’t bound incoming work. A burst of traffic, an expensive request or a retry loop can overwhelm a small application.

Serverless cloud platforms can be very effective at preserving availability by scaling with demand. But that capacity is metered: the application stays available while the bill grows, sometimes dramatically. Autoscaling also takes time, and downstream services may have limits of their own. The application still needs an answer for what happens when demand exceeds the capacity it can use.

Cost is another limit the system needs to respect. I’ll cover cost control in a separate design note.

Overload also spreads. A slow database leaves requests waiting in the application server. Those requests hold connections and memory, and retries add more work. Soon, operations that were healthy begin to fail too. Admission control limits that blast radius by refusing work before it consumes resources that other operations need.

Recovery can trigger another overload. When a struggling service comes back, waiting requests and retries arrive together—a thundering herd that overwhelms it again. The system needs to control how work resumes, as well as when it stops accepting more.

Adding this protection later can break the applications that use it.

Consider a checkout application. It asks the database to reserve an item. Under load, the database queues the work until it can execute. The application was written around that behavior.

Later, the database adds admission control. When it is too busy, it refuses new work so it can finish what it has already accepted. That protects the database. But the checkout application has no handling for “reservation refused because the database is busy.” The customer gets an error page.

The database has improved its behavior under load, but turning that improvement on breaks an existing application. Making it optional avoids the immediate break, but leaves protection dependent on application developers opting in and changing their code.

I want MelodyDB to force this discussion up front. The application must have defined bounds and handle what happens when those bounds are reached. If it doesn’t, it shouldn’t compile.

Those bounds reach through the system. How large can an upload be? How much work can one operation cause? How long can an external call remain pending? How much incoming work can the system accept?

The author doesn’t need to configure every internal queue and buffer. The application declares its limits, the deployment supplies its capacity, and the compiler derives the internal budgets. Moving to a larger machine changes the available capacity without changing what the application means.

In Score, bounds and priorities belong beside the operation they describe. A checkout declaration could look like this. This is a fragment; the result type and reservation logic are omitted.

fn reserve(quantity: u64 in 1..=10) -> Reservation priority High {
  // Reservation logic.
}

The quantity bound defines what the operation accepts. Its priority tells the system which work to preserve under pressure. Recommendations could have Low priority.

The application also declares how it gives up work:

degrade {
  thrift: { shed: Low }
  survival: { shed: Normal }
  read_only
}

This ladder first sheds low-priority work, then normal-priority work, and finally stops accepting new writes. Observed pressure and operator input determine the active step. The application declares the order of sacrifice.

A refusal can propagate through callers, but it must reach something that handles it. I want the compiler to check that path through to the application’s response. The exact language for this needs to fit naturally with Score’s failure handling.

Knowing these cases in advance gives the developer room to design creatively. The checkout could preserve the cart and offer a retry. It could notify the customer when ordering becomes available. Giving purchases priority over recommendations could keep checkout working while less essential features wait.

These are product choices. They are easier to make while designing the experience than during an incident.

Static limits may also let MelodyDB make better retry decisions. I want to try coordinating retries using the work each operation can require, its priority, its remaining deadline and the capacity available now. Retries would consume a bounded share of capacity, rather than every layer independently adding more attempts.

That still requires care. A retry must be safe, and external services and clients may be outside our coordination. Backoff, jitter and respecting a service’s requested delay remain part of the design problem. How these pieces fit together is an open question.

This is one reason the application server belongs inside MelodyDB. The storage engine, request layer and client need to agree about refusal. One compiler can carry that agreement through the application, making behavior at its limits something the developer designs from the beginning.