Automation Glossary • Traffic shaping

What Is Traffic Shaping for Telemetry Links?

Merobix Engineering • • 7 min read

On a fat link nobody worries about which packet goes first, because there is room for all of them, but a remote telemetry link is rarely fat. When an alarm needs to get out at the same moment a historian is uploading a day of backfilled data, one of them has to wait, and traffic shaping is how you make sure it is the backfill and not the alarm. This guide explains what traffic shaping is, how prioritization and queuing decide the order packets leave a congested link, and why it matters for keeping control and alarm traffic responsive on a shared, constrained connection.

Back to Blog

Traffic shaping in one line: Traffic shaping is the practice of controlling the order and rate at which different classes of traffic leave a link, so that time-critical packets are sent ahead of bulk, latency-tolerant ones when the link is congested. Using priority queues and rate controls such as a token bucket, it keeps alarm and control messages moving even while a large historian sync competes for the same bandwidth, rather than letting critical packets sit behind a backup.

Shaping Versus Simply Capping a Flow

It helps to separate traffic shaping from bandwidth throttling, because they are often confused. Throttling caps a single flow to a maximum rate - it says a given stream may use no more than so much of the link, full stop. That is useful for stopping one greedy application from consuming everything, but on its own it does not decide what happens when several flows all want the link at once. Shaping is the broader discipline concerned with exactly that contention: how the available capacity is divided among competing flows, and whose packets go first when they cannot all go together.

The mechanism is classification followed by queuing. Traffic is sorted into classes - for instance, alarms and control commands in a high-priority class, routine polled readings in a middle class, and bulk transfers like historian synchronisation or firmware downloads in a low-priority class. Each class has its own queue, and a scheduler decides which queue to drain next when the link has room to send. By giving the high-priority queue precedence, the scheduler ensures an alarm is dispatched ahead of whatever bulk data happens to be waiting, even if the bulk transfer arrived first.

Rate control complements the ordering. A common tool is the token bucket, where a class earns tokens at a steady rate and spends one to send a unit of traffic, so it can burst briefly using saved tokens but cannot sustain more than its allotted rate over time. This lets shaping both reserve a floor of bandwidth for important traffic and cap how much a bulk transfer may grab, smoothing bursts into a steadier flow that the constrained link can actually carry without collapsing into congestion.

Why Order Matters on a Constrained Link

The reason ordering matters so much is that a slow link has a real serialization delay: it takes measurable time to clock a packet out onto the wire, and a queue of large packets ahead of yours means your packet waits for all of them to drain first. On a fast link that wait is negligible, but on a narrow cellular or radio link a queue full of bulk-transfer packets can add seconds of delay to anything stuck behind them. Without shaping, a historian catching up on a backlog can fill the queue and push an alarm to the back of the line, so the alarm arrives late precisely when it is needed most.

Shaping fixes the ordering so that this cannot happen. When alarm and control traffic sits in a priority queue that the scheduler serves first, those packets slip past the bulk transfer rather than queuing behind it, and their delay stays bounded even while the link is otherwise saturated. The bulk transfer still completes, just a little more slowly, drained in the gaps left by the higher-priority traffic. The link is fully used, but its scarce, low-latency capacity is spent on the traffic that actually needs it.

Doing this well requires deciding which traffic is genuinely time-critical, because if everything is marked high priority then nothing is, and the scheme collapses back to first-come-first-served. In practice the small, urgent messages - alarms, control commands, connection keepalives - belong at the top, routine periodic data in the middle, and anything large and deferrable at the bottom. Getting that classification right is most of the work; once traffic is correctly sorted, the queuing and scheduling do the rest.

Traffic Shaping in SCADA and Cloud Monitoring

A remote SCADA site is a textbook case for shaping, because it mixes traffic with wildly different urgency over one thin link. A tank battery on cellular may send small routine readings every few seconds, occasional urgent alarms, control acknowledgements, and periodically a large burst when a gateway that was offline reconnects and dumps a backlog of buffered historian data. Left unmanaged, that reconnection burst can swamp the link at exactly the wrong moment - just after an outage, when operators most want current information - and delay the very alarms that signal something is wrong.

Shaping keeps the site responsive by making sure the small urgent messages never queue behind the big catch-up transfer. The alarm and the control command take priority and get out promptly; the historian backfill is throttled to a rate that fills the remaining capacity without monopolising it, so it drains steadily over minutes rather than blocking everything else for one intense burst. The operator sees the live situation immediately, while the historical gap fills in quietly behind the scenes. Both jobs get done, but in the right order.

For a cloud SCADA platform such as Merobix, this discipline is what lets a single constrained link carry both real-time supervision and after-the-fact completeness without them fighting. Because gateways buffer during outages and then sync when the link returns, some form of shaping - whether in the gateway, the router, or the platform's own transport - keeps that sync from ever taking precedence over live alarms and commands. The design goal is that no bulk background transfer can ever delay a packet that an operator or a control action depends on, so the platform stays responsive even on the narrowest, busiest field links.

Frequently Asked Questions

What is the difference between traffic shaping and bandwidth throttling?

Throttling caps a single flow to a maximum rate, limiting how much one stream can use, while shaping manages how the whole link is divided among several competing flows and decides whose packets go first when they contend. Throttling answers how fast; shaping answers in what order and with what priority. Shaping usually includes rate controls as one of its tools, but its defining job is prioritization across flows.

How does a token bucket work in traffic shaping?

A token bucket gives a traffic class tokens at a steady rate and requires a token to send a unit of data, so the class can burst briefly by spending saved tokens but cannot sustain more than its token rate over time. This lets shaping smooth bursty traffic into a steadier flow and enforce a rate ceiling on bulk transfers. It is a common building block for both reserving bandwidth and capping how much a low-priority flow may grab.

Why should alarms be prioritized over historian data?

Alarms are small and time-critical - their whole value is arriving promptly - whereas historian synchronisation is large and latency-tolerant, since it fills in the past and can complete a little later without harm. On a constrained link, if an alarm queues behind a historian upload it can be delayed by seconds at exactly the moment it matters. Prioritizing alarms ensures they slip past bulk transfers, while the historian data still completes in the remaining capacity.

From Definitions to a Live Dashboard

Merobix reads your field devices into a cloud SCADA - the real thing behind these terms, live in days from any browser.

Request a Free Demo +1 (903) 307-7300
More in Automation Glossary
Data overage  •  Zero-touch provisioning  •  MQTT session expiry  •  MQTT flow control  •  Reconnect backoff  •  Failover hold-down  •  All Automation Glossary →
Free SCADA operator training
Merobix University - 70 video lessons & 261 quiz questions, from first login to compliance reporting. No demo call required.
Start free →