IoT Fundamentals

IoT Architecture: Devices, Gateways, Networks and Cloud

IoT architecture describes how an IoT system is organised into layers (devices, gateways, networks, platform and applications) and how data flows up and commands flow down. There is no single standard diagram, but most architectures use these same building blocks.

The five practical layers

1. Device layer

Sensors and actuators attached to a microcontroller. Its job is to measure, control and sometimes pre-process data. Constraints here are power, cost, memory and physical environment.

2. Gateway or edge layer

A gateway aggregates devices that cannot or should not talk to the internet directly: for example Modbus devices, BLE sensors or a cluster of ESP32 nodes. It translates protocols, buffers data when the uplink is down and can run local rules.

3. Network layer

The link that carries data: Wi-Fi, Ethernet, cellular, LoRaWAN or others. Choice is driven by range, power budget, data rate and available infrastructure. See the comparison in IoT networking and wireless communication.

4. Platform layer

The broker, device registry, rules engine and storage. An MQTT broker receives messages, a time-series database stores them and rules trigger alerts. See MQTT explained.

5. Application layer

Dashboards, mobile apps, APIs and integrations that turn data into decisions.

A worked example: tank-level monitoring

Step Layer What happens
1 Device An ultrasonic sensor measures the distance to the water; an ESP32 converts it to a level percentage
2 Network The ESP32 publishes tank/1/level over Wi-Fi every 30 seconds
3 Platform The broker delivers the message; a flow stores it and checks a low-level threshold
4 Application The dashboard shows the trend; a notification is sent when the level is low
5 Device A command on tank/1/pump/set switches the pump relay

Edge versus cloud processing

Processing at the device or gateway reduces latency and bandwidth and keeps working when the internet is down. Processing in the cloud simplifies updates and allows heavier analytics. Most real systems split the work: safety and quick control at the edge, long-term analysis in the cloud.

Common architecture mistakes

  • Designing only the happy path and ignoring offline behaviour.
  • Using one topic or endpoint for everything, which makes security and scaling difficult.
  • Embedding shared credentials in firmware.
  • Choosing a wireless technology before estimating range and battery life.

Learn it by building

The Complete IoT Development course walks through designing and building every layer, and the IoT Fundamentals course introduces the concepts first.

References

  • ITU-T Recommendation Y.2060, Overview of the Internet of things: itu.int
  • OASIS, MQTT Version 5.0 specification: docs.oasis-open.org

Related reading

Learning from your city?

City guides show how online IoT training works from where you are, with project themes for your area.

Browse all city guides

Call WhatsApp