What IoT system architecture means
An IoT system architecture is the blueprint for how a connected system is put together: which physical devices collect data, how that data moves across networks, where it gets processed and stored, and how people or other software act on it. It also covers the reverse path, where commands travel from an app back to a device that switches a relay or opens a valve.
The Internet of Things itself is simply the practice of connecting physical objects (sensors, machines, appliances, vehicles) to networks so they can share data and be monitored or controlled remotely. Architecture is how you organise that so it stays reliable, secure and maintainable as the number of devices grows.
Most explanations describe IoT architecture as a stack of layers. These models are teaching tools rather than formal standards. Different vendors and textbooks slice the stack differently, but they all describe the same flow of data.
The common layer models
Three-layer model
The simplest and most widely taught model has three layers:
- Perception layer: sensors and actuators that interact with the physical world.
- Network layer: the links that carry data from devices toward servers.
- Application layer: the software that delivers a service to users, such as a smart-home app or a factory dashboard.
It’s a good mental model, but it hides important details like gateways, data storage and analytics.
Four-layer / four-stage model
Many industry descriptions split processing out into its own layer:
- Perception (device) layer
- Network (connectivity) layer
- Processing layer: edge computing and/or cloud services that filter, store and analyse data
- Application layer
A closely related “four-stage” version describes the path as devices → gateways and data acquisition → edge processing → cloud or data centre.
Five-layer model
The five-layer model, common in academic courses, adds layers above the network:
- Perception layer
- Transport layer: moving data from devices to processing, roughly the network layer above
- Processing (middleware) layer: storage, databases, analytics
- Application layer
- Business layer: managing the whole system, including business models, user privacy and decision-making based on the data
A note on “seven-layer” IoT models
You’ll sometimes see “seven-layer IoT architectures.” Some simply map the classic OSI networking model (physical, data link, network, transport, session, presentation, application) onto IoT. Others are vendor-specific reference models with layers such as edge devices, connectivity, edge computing, data accumulation, data abstraction, application and collaboration. Neither is wrong, but they describe different things. The OSI mapping is about networking protocols, while the reference models are about data handling.
The layers in detail
The breakdown below uses the layers most real systems actually have, with security and management shown as concerns that span every layer.
Perception (device) layer
This is where an embedded system meets the physical world. A typical device includes:
- Sensors: temperature, humidity, motion, current, pressure, GPS, cameras and so on
- Actuators: relays, motors, valves, LEDs, speakers
- A microcontroller or processor running firmware that samples sensors, applies simple logic and talks to the network
- A power source: mains, battery, or energy harvesting
Design decisions here are dominated by cost, power and physical environment. A battery-powered soil sensor and a mains-powered security camera live in the same layer, but they are very different machines. For the device side in detail, see Embedded Systems and the Internet of Things.
Network (connectivity) layer
This layer moves data off the device. Options include:
- Short-range: Bluetooth LE, Zigbee, Thread, Wi-Fi
- Long-range, low-power (LPWAN): LoRaWAN, NB-IoT, LTE-M
- Wired: Ethernet, RS-485/Modbus, CAN in industrial and automotive settings
- Cellular broadband and satellite for high-bandwidth or remote assets
On top of the radio sit transport and application protocols such as MQTT, CoAP, HTTP and LwM2M. Choosing the radio is usually the biggest single trade-off in an IoT design. It’s covered in depth in Wi-Fi vs Bluetooth LE vs LoRa vs Zigbee.
Edge and gateway layer
Many devices can’t reach the internet directly. A Zigbee sensor or a LoRa node needs a gateway that bridges its local radio to an IP network. Gateways often do more than forward packets:
- Protocol translation (for example Zigbee or Modbus to MQTT)
- Filtering and aggregation, such as sending a one-minute average instead of every reading
- Local decisions that must happen even if the internet is down
- Buffering data during connectivity outages
- Running ML models close to the data. This is often called edge computing. See Embedded AI and Computer Vision at the Edge.
Gateways are usually more capable machines, often embedded Linux boards, than the sensor nodes they serve.
Cloud and data processing layer
Once data reaches a server, a cloud IoT platform typically provides:
- Ingestion: a message broker or IoT hub that accepts device connections at scale
- Device registry and identity: which devices exist, what credentials they hold
- Storage: time-series databases, data lakes, warehouses
- Processing: rules engines, stream processing, analytics and ML
- Device management: configuration, monitoring and over-the-air updates
Managed services such as AWS IoT Core and Azure IoT Hub cover much of this, though plenty of teams self-host open-source brokers and databases. The pieces of a platform are broken down further in What are the 7 components of an IoT platform?
Application layer
This is what users and other systems actually touch: mobile and web apps, dashboards, alerts, and APIs that feed business systems such as ERP or maintenance software. It’s also where commands start, like a user tapping “turn on” or a rule that opens an irrigation valve, before they travel back down the stack to a device.
Cross-cutting: security and device management
Security can’t sit in one layer. It has to run through all of them:
- Device: secure boot, protected key storage, no default passwords, locked debug ports
- Network: encrypted links (TLS, DTLS, or the encryption built into LoRaWAN, Zigbee or BLE), authenticated devices
- Cloud: per-device identities, least-privilege access, monitoring
- Lifecycle: a way to patch devices in the field, covered in OTA firmware updates for IoT devices
Device management (provisioning, configuration, health monitoring, updates and decommissioning) also spans all layers, and it tends to be underestimated in early prototypes.
Communication patterns
IoT systems generally combine three patterns:
- Device-to-device: devices talk directly, for example a Zigbee switch controlling a Zigbee bulb, or two BLE devices pairing.
- Device-to-gateway: devices talk to a local hub that forwards data upstream. It’s common with Zigbee, Thread, BLE and LoRaWAN.
- Device-to-cloud: the device connects straight to a cloud service over Wi-Fi, Ethernet or cellular, often using MQTT or HTTPS.
Many real systems also share data back-end to back-end, such as a utility’s platform passing usage data to a third-party energy app.
Worked example: following one reading through a greenhouse system
Here’s a single temperature reading travelling through a small commercial greenhouse:
- Device: A battery-powered sensor node wakes from deep sleep every five minutes, reads a temperature and humidity sensor over I2C, and transmits a few bytes over LoRa before going back to sleep.
- Network: A LoRaWAN gateway on the roof receives the packet and forwards it over the site’s internet connection to a LoRaWAN network server.
- Edge/gateway logic: Separately, an on-site controller subscribes to the decoded readings. If the temperature passes a threshold it opens vent motors directly, without waiting for the cloud, so ventilation still works during an internet outage.
- Cloud: The network server passes the decoded reading to the IoT platform via MQTT. A rules engine stores it in a time-series database and checks whether an alert is needed.
- Application: The grower’s dashboard shows the trend. A push notification fires if the greenhouse gets too hot. The grower can override the vents from the app, which sends a command back down the chain.
The example shows why the layer models are useful: each step has different constraints, failure modes and owners.
Deciding where processing should happen
One of the most consequential architecture decisions is where logic runs:
| Put it on the device when… | Put it on the gateway/edge when… | Put it in the cloud when… |
|---|---|---|
| Response must be immediate (safety cut-offs, motor control) | Several devices need coordinating locally | You need fleet-wide views, history or heavy analytics |
| Sending raw data would cost too much power or bandwidth | The site must keep working offline | Models or rules change often |
| Data is private and shouldn’t leave the device | Protocol translation is needed | Data from many sites must be combined |
A useful rule of thumb: anything safety-critical or time-critical should not depend on a network round trip.
Common architecture pitfalls
- Cloud-only control. If a light switch stops working when the internet goes down, the architecture failed its users.
- No update path. Shipping devices without a reliable OTA mechanism leaves you unable to fix bugs or vulnerabilities.
- Shared credentials. One password or key across a whole fleet means one leak compromises every device.
- Ignoring power early. Picking a power-hungry radio and protocol, then trying to bolt on battery life later, rarely works.
- Unbounded data. Sending every raw sample to the cloud can quietly become the largest operating cost.
FAQ
What are the different layers of an IoT architecture? The most common answer is three layers (perception, network, application). Expanded versions add a processing or edge layer (four layers) and a business layer (five layers). Security and device management run across all of them.
What is the difference between an IoT gateway and a router? A home router forwards IP traffic. An IoT gateway often bridges non-IP radios such as Zigbee or LoRa to IP networks, and may also filter data, translate protocols and run local logic.
What are five examples of IoT devices? Smart thermostats, smart plugs, fitness trackers, connected security cameras and industrial vibration sensors are five common examples. Each pairs an embedded system with a network connection.
Is MQTT part of the IoT architecture? MQTT is an application-layer messaging protocol that’s widely used in the network and cloud layers to move data between devices, gateways and brokers. Our ESP32 MQTT tutorial shows it from the device side.