Skip to content

Running the service

Throughput

What Microsoft limits, what a work claim is, and which number to move when the queue drains slower than you want.

Three things decide how quickly the queue drains: what Microsoft allows against one mailbox, how a worker cuts the queue up, and how many requests one worker may have in the air. The first is not ours. The other two are dials on Settings, under Throughput and Queue, and this page is about what each of them actually changes.

LimitThe numberCounted perWhat holds this deployment inside it
Concurrent operations4app registration and mailboxA lock in PostgreSQL that every process shares, so the four hold across the whole deployment and not merely inside one container. One mailbox also takes one batch at a time
Requests10’000 per 10 minutesapp registration and mailboxA per-mailbox tally in ten-second buckets. At the ceiling the product waits for the oldest bucket to fall out rather than failing
Upload150 MB per 5 minutesapp registration and mailboxThe same tally, counting bytes instead of requests. Only photographs get anywhere near it

Per mailbox is the whole of it. Two recipients have nothing to do with each other, so work for different people runs at the same time and work for one person queues. Microsoft publishes no deployment-wide concurrency limit at all — its numbers are per application and per mailbox, and the only thing it says beyond them is about volume rather than about parallelism.

Which makes every other number on this page one that this product chose. That is the reason to know which is which: moving ours cannot push a mailbox past the four, and it can raise the rate the whole deployment sends at, which is what Graph throttles on.

Both have been called a batch, and that is where this gets confusing. They are different things at opposite ends of the product.

A work claim is a bite out of the queue table. One worker takes a few hundred rows in a single transaction, stamps them with its own name and a two-minute lease, and no other worker may touch them while that lease is renewed. Nothing goes to Microsoft. It is a database statement.

A Graph batch is an envelope: at most twenty operations posted to Microsoft in one HTTP request. The twenty is Microsoft’s limit, not a preference.

One claim becomes many envelopes. The claim’s rows are grouped by mailbox first — an envelope carries one person’s work, because the mailbox is the unit Microsoft counts — and each person’s share is then cut into envelopes of twenty. One mailbox’s envelopes go out one after another; different people’s go out at the same time.

What one pass actually does, in five numbers

Section titled “What one pass actually does, in five numbers”

At the shipped defaults — 480 rows claimed, 24 mailboxes per claim, 8 parallel writes, 20 operations in an envelope — one pass looks like this.

QuestionAt the defaultsIn general
How many requests are in the air?8The parallel-writes ceiling in force, or the number of mailboxes with work in the pass, whichever is smaller — and one tenant at a time
How many operations in one request?20The envelope size, or what that one mailbox actually needs, whichever is smaller
Are they all for the same person?AlwaysAn envelope never carries two people’s work
How many operations is Microsoft running?At most 32Requests in the air × up to four inside each. Microsoft’s own dispatch, and nothing here can see it happen
Which mailbox goes next?All of them at onceEvery mailbox in the pass starts together, and the parallel-writes ceiling decides how many get through

Every number in the middle column is a ceiling, not a measurement. Three things have to be true for a pass to reach them: the work in the claim is all of the same urgency — more urgent work is taken first and can fill a whole claim on its own — the people in the claim have roughly equal amounts waiting, and the pass is for a single tenant. A throttle moves the 8 as well: adaptive mode halves the allowance on a refusal, so a throttled deployment has four, two or one request in the air, and the other numbers follow it down.

Two things, and neither of them is how full a batch is packed.

  • Below the parallel-writes ceiling it costs you width. A claim that reaches four mailboxes puts at most four requests in the air, so four of eight write slots stand empty however full those four requests are. Keep it at or above parallel writes — necessary, and not sufficient on its own, because a person receiving two publications counts twice towards the number and is still one mailbox.
  • At or above the ceiling it changes nothing about width. 8 and 24 both put eight requests in the air. What a wider claim buys is the fixed cost of a pass spread over more Graph work, and what it costs is a longer lease on more rows — work a second worker cannot pick up meanwhile. It also divides by tenant: 24 mailboxes across three tenants is three runs of eight that do not overlap.

How full a batch leaves is the division, claim size divided by mailboxes per claim, under those same three conditions.

DialDefaultRangeWhat it counts
Work per claim4801–500Rows one worker takes in one pass
Mailboxes per claim241–100The most mailboxes those rows may reach. A person receiving two publications counts twice and is still one mailbox

A claim takes turns across the people in it — everybody’s oldest item, then everybody’s second, until it is full — so the rows divide about evenly between them. The claim size divided by the mailboxes is the most operations each mailbox gets, and that is how full its envelope leaves.

The most, rather than the amount, and the exception is worth knowing before you read the division as a promise. Taking turns happens among work of the same urgency: a claim that holds both ordinary changes and something more urgent takes the urgent work first, and if there is enough of it the whole claim can go to one person. Somebody with less waiting than the division allows simply gets a thinner envelope. So the division is the number to aim at, and the pass you are watching may be below it.

480 over 24 is twenty each, and twenty is exactly one full envelope. That is the whole reason for the pair.

Both halves have shipped wrong on their own, in opposite directions, and each looks harmless alone:

  • 160 over 24 is under seven operations a mailbox — an envelope built for twenty leaving with six passengers, so the round trip is paid three times more often than the work needs.
  • 480 over 8 is sixty each: three envelopes one mailbox has to take one after another. The write gate is still full — eight mailboxes with pending work fill eight slots — so this does not cost you throughput. What it costs is breadth: eight people get all of it before the ninth gets any, and one worker holds a lease on 480 rows its siblings could have been working through.

Neither number means anything alone, which is why Settings carries the claim size with the mailboxes per claim. It does not print the division: under Mailboxes per claim it warns only when the claim holds fewer items than the mailboxes it may reach, so that every request carries a single write.

On an estate that has converged neither dial binds the way you would expect. Twenty-four people with three changes each is 72 rows of an allowed 480: the claim size never comes into it, the envelopes are thin whatever it says, and how wide a pass is depends on the number of mailboxes.

Safety priority sits above all of this and is not configurable — see The three priorities.

Write concurrency is ours, and it belongs to one worker

Section titled “Write concurrency is ours, and it belongs to one worker”

Write concurrency on Settings is how many Graph calls one worker may have in flight at once: eight by default, sixteen at most. A call, not an operation — an envelope of twenty writes is one of them.

It has nothing to do with Microsoft’s four. That four is per mailbox and is held for the whole deployment by the shared lock whatever this dial says, and one mailbox takes one envelope at a time besides. So eight calls in flight is eight different people, each well inside their own limit, and that stays true at sixteen.

It is per worker process. A second worker has its own eight, so scaling the worker widens the deployment — see Deploying. Until recently it was a deployment-wide ceiling divided between the processes, which is exactly why adding a worker used to buy nothing.

What one call carries is the part that is easy to get backwards. Graph runs at most four of an envelope’s twenty operations at a time, so a full envelope is five rounds of four inside Microsoft and one worker has at most this number times four in flight — thirty-two operations at the default. At most: that four is Microsoft’s own dispatch, and nothing on any screen here can see it. A thin envelope cannot fill it either — three operations occupy three of the four lanes however far the dial is open. Full envelopes and a higher number buy different things, which is why both sets of dials exist.

In adaptive mode a throttle halves the allowance and every ceiling in force comes down with it. You are setting a ceiling, not a rate. The pace is the dial for a rate — and the one that still divides between processes, because two processes sending every 30 ms are a deployment sending every 15.

A picture has no batched form. Every other write travels twenty to an envelope; a photograph is its own PUT, and against a live tenant one takes about four hundred milliseconds.

They are also the only thing that can reach the 150 MB window. A contact’s fields are a couple of kilobytes; a picture is hundreds.

A folder of six hundred pictures once spent four minutes uploading while the cards themselves were finished in seconds — by a wide margin the whole cost of a first fill. Pictures now go out at the live width of write concurrency, which is what makes it the dial worth raising before a first fill. At a write concurrency of one they are single file again.

Faces are queued behind cards on purpose, so the estate gets its contacts and the photographs follow: Where pictures sit.

Is it moving? first — a deep queue that is draining is a rollout, not a fault. Then:

What you haveWhat is bindingWhat helps
Work per claim divided by mailboxes per claim is under twenty operations a mailboxEnvelopes leaving part emptyRaise mailboxes per claim, which carries the claim size with it — or switch on Manual claim size and raise the claim size until the quotient reaches twenty
A first fill: a few people with hundreds of contacts eachThe number of mailboxes. Six people are six mailboxes, whatever any dial saysNothing on the claim. Write concurrency, which is how wide the photograph phase is
A converged estate: many people with a few changes eachThin envelopes — a pass is only as wide as the people in itWrite concurrency. Mailboxes per claim past the write gate adds nothing in flight; it only changes who is served first
Throttles on CapacityMicrosoftNothing, for a single one: adaptive mode has already halved the allowance and gives twelve percentage points back every two quiet minutes. If it persists, a write pace
Inside every limit and still too much for the people receiving itNobody’s limit but your ownPacing, on Settings: quiet hours, recipients per hour, write cooldown

Then watch two numbers: the throttles on Capacity, and operations per second on the queue. A dial that moves neither was not the one binding.