Logo home 9

Over 10 years we helping companies reach their financial and branding goals. Onum is a values-driven SEO agency dedicated.

CONTACTS
Embedded IoT Solutions

Cloud vs Edge vs Fog Computing in IoT: How to Choose the Right Architecture

Category
Embedded IoT Solutions
Read Time
9 min read
Published
November 20, 2025
Status
Published

Cloud, edge and fog are not competing options. They are three distances from the sensor, each with one capability the others cannot supply.

Cloud, edge, and fog computing are usually presented as three competing places to process IoT data. In practice they are three positions on one axis — distance from the sensor — and almost every production system uses all three at once.

The useful question is therefore not which to choose, but which piece of work belongs at which distance. That decision is driven by physics and economics rather than preference: how fast a reaction must be, what happens when the network fails, and how much it costs to move the data.

This guide defines each tier precisely, sets out the criteria that assign work to them, and covers the mistakes that come from putting the wrong responsibility in the wrong place.

For AIoT systems, where models run adds a further question, so the final part of this guide covers how to split responsibilities cleanly in a hybrid edge-cloud design.

Definitions

What Each Tier Actually Means

1

Edge computing — on or beside the device

Processing that happens on the sensing device itself or on hardware directly attached to it. Latency is measured in microseconds to milliseconds, and it continues working with no network at all.

The constraint is capability: limited memory, limited compute, and often a strict power budget. Work placed here must be small, deterministic, and genuinely necessary to run locally.

2

Fog computing — at the local network

An intermediate tier between devices and the cloud: gateways, on-site servers, or micro data centres serving a building, a production line, a vehicle, or a substation.

Fog nodes have mains power and real compute, and they see many devices at once. Their defining ability is local correlation — combining data from several devices in the same physical place, which no individual device can do and which the cloud cannot do fast enough or during an outage.

3

Cloud computing — centralised and remote

Effectively unlimited compute and storage, reachable over a wide-area network. Latency ranges from tens to hundreds of milliseconds and depends entirely on connectivity being available.

Its unique capability is scope: it sees every device, every site, and the entire history. Nothing else can compare one machine against ten thousand or train on two years of data.

Edge is defined by speed and independence. Fog is defined by local context. Cloud is defined by scope and memory. Each has one thing the others cannot provide.

Comparison

Cloud vs Edge vs Fog: Direct Comparison

EdgeFogCloud
LocationOn or beside the deviceLocal network or siteRemote data centre
LatencyMicroseconds to millisecondsMilliseconds to tens of msTens to hundreds of ms
Compute availableVery limitedModerate to substantialEffectively unlimited
Works offlineFullyFully, for local scopeNo
Data visibilityOne deviceOne siteEntire fleet and history
Cost driverHardware per unitSite hardware and upkeepUsage: ingestion, storage, compute
Best forImmediate reaction, filteringLocal correlation, protocol translationLearning, comparison, coordination
Assignment

Deciding Where Work Belongs

Four questions place almost any piece of processing correctly.

How fast must it react?
Under 10 ms means the device. Tens of milliseconds allows a fog node. Hundreds of milliseconds or more permits the cloud. This is the strongest constraint and it comes from the physical process, not from ambition.
Must it survive an outage?
Anything with safety, quality, or continuity implications must run at the edge or in fog. If the process cannot pause when the internet does, cloud dependency is not an option regardless of latency.
How many sources does it need?
One device points to edge. Several devices in one place points to fog. Devices across multiple sites points to cloud. This single question resolves most placement debates.
What does moving the data cost?
High-rate signals such as vibration, audio, and video should be reduced where they are produced. Transporting raw high-bandwidth data to the cloud is usually the most expensive possible choice.

Applied to a typical predictive maintenance system, this produces a clear division: the device samples vibration and extracts features, the fog node correlates several machines on a line and reacts to local conditions, and the cloud compares assets across the fleet and retrains the model that the device runs. The same reasoning underpins the wider question of choosing an IoT deployment architecture.

Pitfalls

Common Mistakes in Tier Placement

1Putting everything in the cloud by default
It is the easiest tier to build in and the worst to depend on. Any requirement involving latency or availability eventually forces a redesign, usually after hardware has been deployed.
2Pushing too much onto constrained devices
Edge compute is expensive per unit and limited by power. Work that does not need to be local should not be, or battery life and unit cost both suffer for nothing.
3Duplicating a decision across two tiers
If both the device and the cloud can trigger the same action, they will eventually disagree, and diagnosing that is disproportionately painful. Every decision needs exactly one owner.
4Treating fog nodes as infrastructure
Gateways need identity, monitoring, configuration management and an update path exactly like devices. Hand-configured gateways become the limiting factor as sites multiply.
5Leaving no compute headroom
Choosing the smallest device that fits today means any future local processing requires new hardware. A modest surplus preserves the option to move work down a tier later.
6Forgetting buffering between tiers
Each tier must hold data when the one above is unreachable. Without it, an outage anywhere becomes permanent data loss rather than a delay — the core of offline-first design.
Principle

Hybrid AIoT: Split by Responsibility, Not by Technology

The useful division is not “AI in the cloud, rules at the edge”. It is based on what each side can uniquely do.

Only the edge canOnly the cloud can
TimingReact in milliseconds—
AvailabilityWork with no network—
DataSee full-rate raw signalsSee every device and every year
CostAvoid transmittingAfford heavy computation
Learning—Compare assets and retrain

Everything in the first column must be at the edge regardless of preference. Everything in the second must be central. What remains is genuinely a choice, and should be decided on cost and operational simplicity rather than habit.

The edge decides what is happening. The cloud decides what it means across the fleet, and improves what the edge knows.

Allocation

What Belongs at the Edge and What in the Cloud

1

At the edge

  • Signal conditioning, filtering and feature extraction at full rate
  • Immediate detection and any safety or control reaction
  • Local buffering during connectivity loss
  • Deciding what is worth transmitting at all
  • Inference where latency or offline operation matters
2

In the cloud

  • Long-term storage and historical analysis
  • Cross-asset and cross-site comparison
  • Model training and retraining
  • Fleet management, configuration and update orchestration
  • Business system integration and reporting
3

What crosses the line

Upward: events, summaries, features, model outputs with confidence, device health, and a sampled stream of raw data for future training.

Downward: configuration and thresholds, updated models, firmware, and commands. Keeping both directions explicit is what prevents the system becoming an undocumented mesh of special cases.

Pitfalls

How Hybrid Architectures Go Wrong

The same decision in two places
Both tiers can raise the same alarm or trigger the same action, so they eventually disagree. One owner per decision; the other side observes only.
Edge logic that cannot be changed
Thresholds compiled into firmware require a release to adjust. Keep policy in configuration so the cloud can tune behaviour without an update.
Features computed differently on each side
If the cloud trains on features calculated one way and the device computes them another, accuracy drops for reasons nobody can find. Share one definition.
Aggressive reduction with no raw sample
Sending only conclusions saves money and destroys the ability to train better models later. Always retain full-fidelity data from a representative subset.
Undefined offline behaviour
What the edge does during a long outage — keep acting, degrade, or stop — must be specified rather than emergent.
FAQ

Frequently Asked Questions

What is the difference between edge, fog and cloud computing?
They are three positions on one axis: distance from the sensor. Edge runs on or beside the device with microsecond to millisecond latency and full offline operation. Fog runs on a gateway or site server and correlates several devices in one place. Cloud is remote, effectively unlimited, and sees the entire fleet and history.
Is fog computing the same as edge computing?
No. Edge processing happens on the device itself, limited to one device’s data and constrained by power and memory. Fog sits on a gateway or local server with mains power, sees many devices at once, and its defining capability is local correlation across them.
When should processing stay out of the cloud?
When the reaction must occur in under roughly 10 milliseconds, when the process cannot pause during a network outage, when moving the raw data would cost more than the insight is worth, or when regulation prevents the data leaving the site.
What does a fog node actually do?
Protocol translation for local equipment, buffering during uplink loss, correlation across several devices in the same location, and any real-time reaction that needs more compute than a device has. It is also where legacy industrial protocols are converted into a normalised format.
What is the most common architecture mistake?
Putting everything in the cloud because it is the easiest tier to build in. Any requirement involving latency or availability eventually forces a redesign, and by then the hardware choices that would have made local processing possible are already fixed in deployed devices.
What is a hybrid edge-cloud AIoT architecture?
One where responsibilities are split deliberately: the edge handles immediate detection, control and filtering and keeps working offline, while the cloud handles long-term storage, cross-asset comparison, model training and fleet management.
How do you decide what runs at the edge versus the cloud?
By what each side can uniquely do. Millisecond reaction, offline operation and full-rate raw signal access are only possible at the edge. Comparing every device across years and retraining models is only possible centrally. What remains is a cost and simplicity decision.
Why keep raw data if the edge already summarises it?
Because reduction is irreversible and future models will need examples that current summaries discard. Retaining full-fidelity data from a small representative subset of devices preserves that option at negligible cost.
Wrapping Up

Conclusion

Cloud, edge, and fog are not alternatives. They are three distances, each with one capability the others cannot supply: speed and independence at the edge, local context in fog, scope and memory in the cloud.

Assign work by asking how fast it must react, whether it must survive an outage, how many sources it needs, and what moving the data costs. Give every decision exactly one owner, buffer between every tier, and leave enough headroom on devices to move work downward later. That is what makes an architecture that grows rather than one that has to be escaped.

About MetaDesk Global

Engineering the Next Generation of Connected Products

MetaDesk Global helps startups and enterprises develop intelligent connected products that combine embedded systems, Industrial IoT, Edge AI, and cloud technologies. Our expertise includes:

Industrial IoT (IIoT) Solutions Embedded Firmware Development Edge AI Development Predictive Maintenance Systems PCB Design IoT Gateway Development Cloud Integration OTA Firmware Updates AIoT Product Development End-to-End Product Engineering

From hardware design to AI-powered industrial platforms, we build scalable solutions for the next generation of connected products.

Start Your Project

Building a Connected Product?

We design IIoT sensor networks, Edge AI pipelines, and secure cloud platforms — from prototype to production.

Request a Free Quote →