← Back to list

From Cloud to Fog: How I Solved My IoT Latency Problem

In terms of scale, my IoT projects taught me a rude truth: over the years, when the load becomes an issue, the cloud is always on time —…

Jishnu S · 2025-08-24 16:27 · 1 claps · 2.8 min read paywalled
#iot #fog-computing #cloud-computing #hvac #optimization
Open on Medium ↗
Wiki topics: 📟 · Gadgets & IoT

From Cloud to Fog: How I Solved My IoT Latency Problem

In terms of scale, my IoT projects taught me a rude truth: over the years, when the load becomes an issue, the cloud is always on time — just not your time. Packets queue, CPUs pant, and milliseconds quietly add up to mistakes you can feel.

The Problem I Faced

I had an IoT setup for monitoring temperature and humidity sensors in a server room. The idea was simple: if the temperature exceeded a threshold, trigger extra cooling.

Challenge

When I pushed all sensor data to the cloud and waited for the cloud to respond:

  • Average delay was ~450ms
  • Network congestion made responses inconsistent
  • In a real data center, even a few seconds delay can cause overheating

My sensors were sending huge amounts of data to the cloud, and by the time decisions came back, it was already too late. That’s when I learned the power of fog computing — and how fog nodes became my solution.

What is a Fog Node?

A fog node is a small-but-capable compute layer that sits between the edge (sensors/actuators) and the cloud. It’s close enough to the devices to act in milliseconds, but smart enough to filter, aggregate, and enforce rules before sending summaries upstream.

  • Edge: generates data / takes actions.
  • Fog: does local analytics, decisions, buffering, safety interlocks.
  • Cloud: long-term storage, dashboards, heavy analytics, global coordination.

Why it matters: lower latency, less bandwidth, graceful degradation during WAN glitches, and better data hygiene for the cloud.

What went wrong (pre‑fog):

  • Sensors ⟶ Cloud ⟶ Decision ⟶ Sensor loop took hundreds of ms (and sometimes >1s under load).
  • Costs rose with chatty telemetry.
  • When load spiked (firmware rollouts, backups), latency/jitter spiked too.

What I changed: I added a fog node (Raspberry Pi 4) on the same LAN as the sensors and the cooling relay.

Result: Sensor → Action in <50 ms locally, with ~70% bandwidth reduction to cloud by batching and filtering.

Fog Node Location: How I Picked the Spot

Use a small scorecard rather than a hunch. These are my criteria (weightings in brackets):

  1. Proximity to devices (0.30) — Same room/VLAN cuts hop time.
  2. Network reliability (0.20) — Dual‑NIC, VLANs, QoS, monitored link.
  3. Compute headroom (0.20) — CPU/RAM for rules + small ML.
  4. Power/thermal (0.10) — UPS, ventilation, temp limits.
  5. Security (0.10) — Locked rack, TLS, least‑privilege.
  6. Maintainability (0.10) — Physical access and remote mgmt.

If it can’t survive a WAN outage and keep core control running, it’s not a good fog location.

In my case, the server room itself was ideal.

Over the years in IoT when the load becomes an issue, dashboards don’t lie — p95 creeps, jitter blooms, costs climb. Dropping in a fog node was the smallest change with the biggest effect: faster control, quieter networks, happier ops. Put one on your VLAN and let the numbers speak.


메타데이터
post_id
1d86f5f032bf
slug
from-cloud-to-fog-how-i-solved-my-iot-latency-problem-1d86f5f032bf
url
https://medium.com/@jishnutkl/from-cloud-to-fog-how-i-solved-my-iot-latency-problem-1d86f5f032bf
canonical_url
https://medium.com/@jishnutkl/from-cloud-to-fog-how-i-solved-my-iot-latency-problem-1d86f5f032bf
author_url
https://medium.com/@jishnutkl
status
ok
fetched_at
2026-08-12 07:29:34