←Back to Subject
Notes
Notes
Study material and explanations
Diagrams
Diagrams
Visualize concepts easily
Mnemonics
Mnemonics
Tricks to remember faster
One Night Prep
One Night Prep
Short and focused revision
Revision
Revision
Quick summary and key points
Important Questions
Important Questions
Practice most relevant questions
Notes

Design Principles for Web Connectivity in IoT Systems

Study material and explanations for Unit 3

Design Principles for Web Connectivity in IoT Systems

Introduction: Why Regular Web Protocols Struggle in IoT

The World Wide Web was built using protocols like HTTP (Hypertext Transfer Protocol), which were made for desktop computers and smartphones connected to stable Wi-Fi or 4G networks.

An IoT device is completely different:

  • A temperature or soil sensor has only a few kilobytes of RAM and runs on a tiny ₹20 coin-cell battery that is expected to last for several years!
  • It transmits data over low-power wireless links where bandwidth is low and signal drops are common.

If you force a tiny battery-powered sensor to use standard desktop HTTP requests all day, its battery will drain in a few days and the network will get clogged.

Because of this, engineers follow strict Design Principles for Web Connectivity when building IoT systems.


1. Core Design Principles for IoT Web Connectivity

The Four Pillars of IoT Web Connectivity Design
1. Minimal Packet Overhead
Headers must be short binary numbers (2 to 4 bytes) instead of long text lines.
2. Asynchronous Communication
Devices should send data and immediately continue their work without waiting synchronously for replies.
3. Deep Sleep Support
Sensors must be able to sleep for hours, wake up for 10 milliseconds to transmit, and return to sleep.
4. Tolerance to Lossy Networks
Must handle dropped packets smoothly without slow, energy-draining TCP connection handshakes.

2. Why Standard HTTP is Inefficient for Low-Power IoT

Standard web communication uses the Client-Server Request-Response model running over HTTP/1.1 or HTTP/2:

Three Big Problems with Standard HTTP in IoT:

  1. Huge Header Overhead:
    • A standard HTTP request contains long lines of text headers: User-Agent, Host, Accept, Cookie, Content-Type.
    • These headers easily take up 500 to 1,000 bytes!
    • If an agricultural sensor only wants to send a 2-byte temperature reading ("32"), sending 800 bytes of headers means over 99% of battery energy is wasted just on headers!
  2. Heavy TCP Connection Setup:
    • HTTP requires an underlying TCP connection.
    • Starting a connection requires a 3-way handshake (SYN, SYN-ACK, ACK), and closing it requires another 4 packets.
    • This keeps the wireless radio transmitter active for too long, draining battery quickly.
  3. No Direct Server Push (The Polling Problem):
    • In HTTP, only the client can ask for data. The server cannot push commands on its own.
    • If a cloud server wants to shut off a water pump immediately, it cannot reach out directly; it has to wait until the pump sends an HTTP request!
    • To get around this, devices must repeatedly ask (“Any new commands? Any new commands?”). This is called polling, and it burns battery non-stop.

3. Web Communication Protocols for Connected Devices

To solve these problems, two classes of web connectivity protocols are used in IoT:

Classes of IoT Web Connectivity Protocols
1. Standard Web Protocols (HTTP / REST)
Used for powered devices (Smart TVs, gateways, Raspberry Pi) that have continuous wall power and fast Wi-Fi.
2. Constrained Protocols (CoAP)
A binary web protocol designed for tiny battery microcontrollers; uses REST commands (GET/POST) over lightweight UDP.
  • CoAP (Constrained Application Protocol): Brings the simplicity of web REST APIs (GET, POST, PUT, DELETE) down to small 8-bit microcontrollers using compact binary headers (only 4 bytes!) over connectionless UDP.
  • JSON (JavaScript Object Notation): Has replaced heavy XML as the standard lightweight data format for IoT because it is simple to read and uses much less text.

💡 DAVV Exam Preparation Tips

5-Mark Question: “Why is traditional HTTP inefficient for battery-powered IoT devices? List three reasons.”

  • Header Overhead: 500+ bytes of HTTP text headers to send just 2 bytes of sensor data.
  • TCP Handshake: 3-way handshake keeps the wireless radio awake too long, draining battery.
  • Lack of Server Push: Requires continuous client polling, which drains power and wastes bandwidth.

10-Mark Question: “Discuss the Design Principles for Web Connectivity in Internet of Things (IoT) systems. Explain how constrained node limitations (CPU, battery, memory, bandwidth) impact web protocol selection. Contrast HTTP and CoAP.”

  • Detail the 4 core design principles: Small headers, asynchronous messaging, deep sleep support, and resilience to packet loss.
  • Explain why standard HTTP fails on battery-powered sensors (header bloat, TCP overhead, polling).
  • Introduce CoAP as the solution: Binary REST protocol, 4-byte header, runs over UDP.
  • Compare HTTP vs. CoAP on transport layer, header size, and battery life.