← Back to the chapter · Previous detail · Next detail →
Technical detail · MQTT Production Operations
MQTT workload profiling and packet costs
A Message Queuing Telemetry Transport (MQTT) production release record combines workload, recovery and access evidence to set operating limits and recovery plans. Observability means using broker and consumer signals to locate failures, delays and stale data. A healthy connection count can coexist with growing queues and old readings. Quality of Service (QoS) is the protocol delivery level; a broker routes sensor publications to subscribers, clients registered to receive matching messages.
Compare QoS 0 and QoS 2 from the boiler sensor to Bex. With a simulated workload of 10,000 boiler sensors sending one reading each second, QoS 0 sends 10,000 control packets per second. QoS 2 uses four steps for each reading, so the count rises to 40,000. These counts assume each exchange succeeds with no retries. They cover only the publisher-to-broker leg, before the broker sends data to subscribers. If a missed reading is acceptable, consider QoS 0. Then measure packet traffic and CPU use before adding broker capacity.
Use the comparison to form a hypothesis, then profile the same workload before and after a change. Correlate central processing unit (CPU) use with connection churn, Transport Layer Security (TLS) handshakes, publication rate, outgoing copies and queued work. Match the change to the observed cost. Lower delivery effort only where loss is acceptable; distribute work only after measuring the node limit and recovery behavior.