Maximum record size is set separately at the writer, the accepting node, the copy hop and the reader — which one decides?
answer
- a chain of gates, not one setting
- writer, node, copy hop, reader
- the minimum of the four binds
- raise readers before writers
basics
~20 sThe smallest ceiling on the path decides. A record must clear the writer's own limit, the accepting node's, the copy hop's where one exists, and the reader's; raising one and leaving the others alone moves the failure rather than removing it.
solid answer
~50 sTreat it as a chain of gates, not one setting. The writer's library may refuse a record before the network; the accepting node checks it again; where the platform copies an accepted record to nodes holding other copies, that transfer has its own ceiling; and the reader will only take a record up to a ceiling of its own. The binding gate is the **smallest** one, and which gate is smallest decides where and when the failure shows up: at the call site, at the node, in a copy set that quietly stops keeping up, or in one reader that stops making progress on records that are already stored. The gates drift apart because they are configured in different places by different people, so raising the node's ceiling on its own is the classic half-fix.
go deeper
Recall that more than one hop enforces a maximum record size, and that the smallest of them is the one that actually decides whether a record gets through.
Name the four gates and do the arithmetic: take the minimum of the configured values, and say where the failure will appear depending on which gate is the minimum.
Show that an accepted record is not a safe record: explain the copy-hop and reader cases, where the symptom is a durability or a reader problem long after the write succeeded, and give the safe raising order.
Own the chain as a contract across teams: one agreed ceiling, published, with the reader side raised before the writer side is allowed to use the headroom.
## The four gates A record does not clear one ceiling; it clears a chain of them. Each hop on its path can enforce a maximum on a single record, and each is configured somewhere else: 1. **The writer's own ceiling.** Client libraries commonly hold a maximum request or record size and refuse the call locally, before anything reaches the network. It lives in application configuration, not on the cluster. 2. **The accepting node's ceiling.** The node the writer is connected to checks the record when it arrives and refuses it if it is too large. This is the one people mean when they say "the broker limit". 3. **The copy hop's ceiling.** On platforms that make a record durable by transferring it from the node that accepted it to nodes holding other copies, that transfer is itself a request with its own maximum. Where storage is shared between nodes, or where a write is made durable by several nodes accepting it directly rather than by a follow-up transfer, there may be no separate gate here at all. 4. **The reader's ceiling.** A reader will accept a response, and a record within it, only up to a size of its own — again in client configuration, owned by whichever team runs the consuming application. ## The smallest gate binds The useful mental model is the lowest bridge on a route: raising three of them changes nothing while the fourth is still low. A record passes only if it is under **every** ceiling it meets, so the effective ceiling for the path is the minimum of the four. Everything else about the failure follows from *which* of the four is the minimum. | Smallest gate | Who sees the failure | What it looks like | When you find out | |---|---|---|---| | The writer's | the writing application | the send call fails locally, no round trip | immediately | | The accepting node's | the writing application | the write is refused with a size reason | immediately | | The copy hop's | the operator | the record is accepted, then the set of copies stops keeping up | minutes later, as a durability symptom | | The reader's | one consuming application | the record is stored and readable by others, but that reader will not take it | possibly days later | The first two are benign in the sense that they fail loudly at the moment of the write, in front of the person who produced the record. The last two are the reason this subject is asked at all: the record was **accepted**, so the writing side thinks it succeeded, and the consequence appears somewhere else, later, to somebody else. ## Why the gates drift apart - They have **different defaults**, chosen independently by the platform for the writer, the node and the reader. - They are **changed in different places**: the node's is an operator change on the cluster, the other three are application configuration that requires a release. - They are **owned by different teams**. The cluster team can raise the node's ceiling in an afternoon and has no authority over twenty consuming applications. - A **new consuming application** arrives with stock configuration long after the ceiling was agreed, and reintroduces a low gate nobody remembers. ## Raising the chain safely 1. Enumerate the hops a record actually takes on your platform, including whether a copy hop exists as a distinct gate. 2. Read the **effective** value at each — the value in force, not the one in a template — and take the minimum. 3. Compare that minimum with the tail of your real record-size distribution, not its average. 4. Raise in reading order: **readers first**, then the storage path, and the writer's ceiling last. A reader that can take more than exists is harmless; a writer allowed to produce more than a reader can take is the failure in the table above. 5. Record the agreed ceiling somewhere the next consuming application will see it, because the gate you cannot see is the one that will bind. ## Where platforms differ - **Whether a copy hop exists.** Some designs replicate by transferring accepted records between nodes; others share storage, and others make a write durable by several nodes accepting it directly. - **What the reader's ceiling is expressed against.** On some it is a maximum per record; on others a maximum per response, which interacts with how many records come back at a time. - **Which bytes count.** Payload alone on some platforms, payload plus key and attached metadata on others — so two clusters with the same configured number do not accept the same records. - **Whether the node re-checks after any transformation.** If a node has to decode and re-encode what it received, the size it checks is not necessarily the size that arrived.
- Why is raising the reader's ceiling before the writer's the safer order?Because a reader able to take a record larger than anything that exists costs nothing, while a writer allowed to produce a record no reader can take creates a stored record that one consuming application cannot get past. The first order fails closed, the second fails after the record is already durable, which is the expensive direction.
- Two clusters are configured with the same maximum record size, but one rejects records the other accepts. What could explain it?Most likely they count different bytes. Some platforms measure the payload alone, others include the key and attached metadata, so an application record of identical size presents a different number to the check. A second possibility is a smaller gate elsewhere on one of the paths — a writer library or a copy hop — that is doing the rejecting rather than the node.
- Which of the four gates does an operator usually have no direct control over?The three that live in client configuration: the writer's, the reader's, and anything the consuming applications set for themselves. The cluster team can change the node's ceiling in place, but the other gates move only with an application release, which is why a raise is a coordination exercise rather than a configuration change.
A shipment that has to pass four loading docks, each with its own door height. Measuring the tallest door tells you nothing: the crate gets through only if it clears the lowest one, and raising three doors while the fourth stays low simply moves the point where the truck stops.
saying these in an interview costs you the question
- Thinks the node's ceiling is the only one that is enforced.
- Assumes the highest configured ceiling on the path wins.
- Believes raising the node's setting fixes the whole path.
- Does not realise an accepted record can still fail further along.
- Raises the writer's ceiling first and leaves readers behind.