skip to content

The Managed Charge Model

How a hosted broker becomes a bill: units of purchased throughput, stream and partition counts, stored bytes, request counts and traffic leaving the boundary. Cheap to run is not cheap to rent.

part ofBroker & streaming operationsoverview, primer and where to startread it →
on this pageshow

questions

4

Your hosted broker carried almost no records all weekend yet still billed heavily — which broker quantities are charged for existing rather than flowing?

level: juniorimportance: must knowfreq 58%

answer

  1. standing lines, not just usage
  2. capacity reserved ahead of traffic
  3. counts of streams and partitions bill
  4. retained bytes times replica copies

basics

~20 s

Much of a hosted broker's bill is standing rather than usage-driven: purchased throughput capacity reserved ahead of the traffic, the streams, partitions or queues that merely exist, and retained bytes still held, multiplied by their replica copies.

solid answer

~50 s

A rented broker bill has two kinds of line. **Usage lines** move with traffic: billed write and read requests, bytes written and delivered, traffic crossing a charged boundary. **Standing lines** do not. A provisioned-capacity tier charges the pre-bought units of capacity you reserved for every hour you held them, whether or not a record flowed. Many tiers also price the structure itself — a charge per stream, partition or queue that exists. And retained bytes are billed for as long as your retention policy keeps them, multiplied by the number of replica copies the tier stores on nodes. A quiet weekend removes the usage lines and leaves the standing ones exposed; on a cluster sized for a weekday peak that remainder is most of the bill. Moving to a consumption-priced tier shrinks the reserved-capacity line, but storage and standing-count lines usually survive the move.

go deeper

for a junior

Recall that renting a broker buys capacity and storage, not only traffic. A cluster with nothing flowing through it still bills for what it reserves and what it holds.

for a middle

Explain which lines stand and which move with traffic, and why the storage line is retained bytes multiplied by replica copies rather than counted once.

for a senior

Read a real bill by splitting standing from usage first: a quiet period measures the standing floor, and that floor is what a design change actually moves.

for a principal

Decide whether a standing floor spread across an estate of rarely-used streams is worth consolidating, and name who owns that spend when no single team's traffic explains it.

## Two kinds of line on a broker bill When you run a broker on machines you own, the cost is the machines. They are bought or rented by the hour, and what you do *inside* them — how many streams you create, how long you keep records, how many replica copies you place on nodes — is free at the margin. A **hosted broker** (a cluster operated by someone else and bought as a service) turns the inside of the cluster into line items. Those items fall into two groups, and telling them apart is most of the skill of reading the bill. | kind of line | what drives it | what an idle weekend does to it | |---|---|---| | usage | billed write and read requests, bytes written, bytes delivered, traffic crossing a charged boundary | falls to near zero | | standing | reserved capacity held, streams and partitions or queues that exist, retained bytes multiplied by replica copies | unchanged | An idle period is therefore a free measurement: it isolates your standing floor. Whatever the bill still shows is what your **structure** costs, independent of anything anyone published. ## What is charged for merely existing - **Purchased throughput capacity.** On a provisioned-capacity tier you buy a quantity of throughput ahead of the traffic — a pre-bought unit of capacity is a pre-bought quantum of capacity — and you are billed for holding it, not for filling it. Reserving for the weekday peak means paying the peak rate on Sunday afternoon. - **The standing count of streams, partitions or queues.** Many tiers price the structure itself, per stream or per partition or per queue that exists. A stream created for a pilot two years ago and never deleted is a line every month. - **Retained bytes.** Data written last Tuesday and still inside whatever retention policy you chose is still stored on Sunday, and still billed. Nothing has to be published for the storage line to stand. - **The replica-copy multiplier.** A tier stores each stream's data on more than one node so it survives a lost one, and the storage line generally reflects the number of copies rather than the logical bytes. - **A minimum footprint.** Dedicated purchase tiers commonly bill a minimum cluster size, so the smallest thing you can rent is still several nodes. - Some tiers additionally charge for standing subscriptions or for connections held open, whether or not anything travels over them. Not every tier carries every one of these, and that variation is the point: the first question about an unfamiliar tier is which of these dimensions it meters at all. ## Why retained bytes keep billing when nothing is published How long data stands differs by broker shape, and a candidate who knows only one shape gets this wrong. - On platforms that keep an **append-only log** and let readers hold a position in it, retention is a property of the stream: records survive to the retention bound whether or not anyone has read them. Storage is therefore predictable and reader-independent — and it does not shrink when consumers catch up. - On **queue-shaped** brokers where a record is removed once it is acknowledged, the stored volume tracks what readers have failed to drain, so the storage line is small when readers are healthy and grows when they stall. - Some platforms hold a separate retained copy per subscription, so the same logical record stands once for each subscriber. ## Doing the arithmetic The standing storage line is a product, not a sum, which is why it surprises people: ``` written per day : W bytes retention policy window : D days replica copies on nodes : C standing storage bill ~ W x D x C ``` Adding one replica copy or doubling the window does not add to that line — it multiplies it. The same shape governs the standing-count line: streams multiplied by the partitions each carries. ## Reading a bill you did not expect 1. **Split standing from usage before optimising anything.** A quiet period, a weekend or a holiday, gives you the split for free. 2. **Find the multipliers.** Copies and subscriptions turn a modest logical volume into a large stored one, and they are the cheapest thing to get wrong. 3. **Inventory what merely exists.** Orphaned streams and a partition layout chosen for an old traffic level keep billing long after the workload that justified them is gone; deleting them is what clears the line. The headline for a junior answering this: renting a broker buys capacity and storage, not only traffic. An idle cluster is not a free cluster.

  • A stream was abandoned a month ago but never deleted — what does it still cost?
    If the tier prices the structure, its stream and partition count keeps billing indefinitely, and its retained bytes bill until the retention policy ages the last record out — multiplied by the replica copies on nodes. Nothing about it decays on its own; deleting it is what clears both lines, which is why an ungoverned estate accumulates a standing floor nobody can attribute.
  • Does moving to a consumption-priced tier remove the standing lines?
    It shrinks or removes the reserved-capacity line, because you stop buying throughput ahead of the traffic. Storage of retained bytes and any per-stream or per-partition charge usually survive the move. It can also raise the bill for a chatty workload, because consumption pricing meters billed requests and a flood of tiny records is many requests for few bytes.

Renting warehouse space: you pay for the floor you reserved and for the pallets sitting there — and for the fact that your stock is kept in two bays rather than one — on a day when no truck arrives at all. Only the loading-dock fees stop when the trucks stop.

saying these in an interview costs you the question

  • Assumes an idle rented cluster costs nothing because nothing flowed
  • Thinks the bill counts only records published and read
  • Forgets retained bytes are billed per replica copy stored
  • Believes deleting unused streams changes nothing on the bill
  • Reads a consumption-priced tier as having no standing lines at all
open as a page

A cluster that was cheap on machines you own becomes expensive on a rented tier at the same traffic — which design choices explain that?

level: seniorimportance: must knowfreq 56%

basics

~20 s

Habits that are free on owned hardware are billed dimensions once rented: many small streams and a fine-grained partition layout, a generous retention policy multiplied by replica copies, huge populations of tiny records inflating billed request counts, and readers placed across a charged boundary.

open as a page

Why can one published record be charged for more than once on a hosted broker's bill?

level: middleimportance: should knowfreq 52%

basics

~20 s

A record touches several billed dimensions at once: it is counted as a billed write and its bytes, held as retained bytes multiplied by replica copies for its whole retention, then delivered to every subscriber, each delivery adding billed reads and possibly a charged boundary crossing.

open as a page

A stream idles most of the day then takes one heavy nightly burst — how does a provisioned-capacity tier bill that differently from a consumption-priced one?

level: seniorimportance: should knowfreq 47%

basics

~20 s

A provisioned-capacity tier bills the pre-bought units of capacity for every hour they are held, so a peak-sized reservation is paid for all twenty-four; a consumption-priced tier bills close to nothing while idle and charges the burst in full, with no ceiling on the total.

open as a page