//
Edge Computing in IoT: Where Should Your Device Logic Run?

In most products, edge computing and the cloud share the work, so the real question is where to draw the line. Drawing it on a whiteboard costs little. Moving it after launch costs a lot.

Below, we go through the four places logic can run, the seven criteria that decide the split, three common architectures, and the trade-offs. We also show how our team handles the decision on projects.

Key Takeaways

  • Device logic can run on the device, on a phone, on a gateway, or in the cloud, and most products use more than one of these.

  • Decide function by function. Check each one against time sensitivity, connectivity cost, offline resilience, privacy, updates, device limits, and fleet-scale cost.

  • Keep fleet-wide storage, analytics, and device management in the cloud.

  • Define the update path before you move any logic onto a device.

  • If no criterion points to the edge, stay cloud-only, because every piece of edge logic is software you have to maintain.

What Is IoT Edge Computing, and How Is It Different From Cloud Computing?

IoT edge computing processes data on or near the devices that generate it. Cloud computing processes the same data on central servers in remote data centers. The difference lies in where the work happens: edge computing supports local decisions, and the cloud supports analysis across the whole fleet. Edge Computing in IoT Where Should Your Device Logic Run 2.png Edge computing is a distributed computing model. Processing runs on nodes close to the data source, such as a device or a gateway, and cloud-style tools manage those nodes. Running processing close to the data can reduce latency, which is the delay between a request and a response.

You may also see the term fog computing. It usually means edge computing with more than one tier, for example, a device, a gateway, and a local server.

In a typical setup, devices report over a lightweight messaging protocol such as MQTT (Message Queuing Telemetry Transport). Sensors and gateways filter that data and act on it locally, and gateways pass data upstream only when it is needed. The cloud takes the work that needs many devices at once.

IoT edge computing, explained in one line: process data near the source, and analyze across devices in the cloud.

Planning to move logic onto your devices?

Our team reviews the update path, the device identity, and the offline cases before the first release

CTA image

Where Can Device Logic Run in a Connected Product?

Device logic can run in four places: on the device, on the phone, on a gateway or edge node, or in the cloud. Each place has its own owner, its own typical jobs, and its own way of receiving updates.

On the device itself

Logic on IoT devices runs inside the device software, which your hardware and firmware team owns. It covers the jobs that must work with no network at all, such as reading sensors, enforcing safety limits, and managing power.

Memory, battery, and processing power limit how much fits, and every change ships as a firmware update, so teams keep this layer small. Around this device code sit the software, connectivity, and cloud layers. Our IoT architecture and stack consulting covers all three.

On the phone, through the companion app

In Bluetooth Low Energy (BLE) products, the phone often relays data between the device and the cloud, so it acts like an edge node. BLE is a short-range wireless protocol for low-power data exchange. The companion app can cache data, show it to the user, and pass commands to the device. Your mobile team owns that logic.

On a gateway or edge node

A gateway sits near the sensors and acts as an edge device. It filters and aggregates data, makes local decisions with rules, and sometimes runs Machine Learning (ML) inference, then forwards summaries to the cloud.

Larger sites may use local servers or edge servers instead of a small gateway. Your product's software team usually owns this layer. Teams that use AWS IoT can run it on AWS IoT Greengrass, an edge runtime from the same platform. Edge Computing in IoT Where Should Your Device Logic Run.png

Read also:

In the cloud

The cloud holds what needs data from many devices: fleet storage, data analysis, device management, and model training. Your cloud and backend team owns it. It follows a normal release pipeline, so it is the easiest place to change.

Where device logic can run

How Do You Decide What Runs at the Edge and What Runs in the Cloud?

We recommend deciding function by function. Check each function against seven criteria, then run it where most of the answers point.

Four of the criteria come from RFC 9556, "Internet of Things (IoT) Edge Challenges and Functions", an informational document from the Thing-to-Thing Research Group of the Internet Research Task Force (IRTF), published in April 2024. The other three are updates, device limits, and cost at fleet scale.

Time sensitivity

Does the action depend on real-time data and need an answer faster than a cloud round trip allows? Then put the logic near the device (RFC 9556, section 3.1). Processing there avoids the round trip.

Connectivity cost and data volume

Continuous data collection from many sensors raises uplink cost. When the uplink is costly, send summaries instead of raw streams to keep bandwidth cost down. RFC 9556 (section 3.2) treats reducing reliance on continuous high-bandwidth connectivity as a requirement, for example by processing data at the edge and sending summarized insights to the cloud.

Here, the gain depends on the data. A sensor that sends one small reading a minute gains little from local processing, while a device that streams raw waveforms gains a lot.

Resilience to intermittent connectivity

If the product must keep working when the network drops, a safety-critical or user-facing function cannot depend on the cloud (RFC 9556, section 3.3). The RFC names vehicles, drones, and oil rigs as places where connectivity is intermittent, and IoT devices in remote locations face the same problem. Decide what the user must still be able to do offline, and keep that logic local.

Privacy and security

Keep raw personal or sensitive data close to its source, or aggregate it before upload (RFC 9556, section 3.4). The RFC notes that smart meter data can reveal details about a household. Keeping less raw data in long-term cloud storage also helps data security.

Updates and fleet management

How will you change this logic after devices are in the field? Logic that changes often is easier to keep in the cloud, where one release reaches every user. Logic on devices needs an update path, a rollout plan, and a rollback plan. In the EU, security updates are a manufacturer duty under the Cyber Resilience Act, so plan the update path early.

Read also:

Device constraints

Battery, memory, and processing power decide how much logic a device can hold. Heavy local processing also raises energy use, so devices with small batteries carry less. When a device cannot carry a function, move it to a gateway or the cloud.

Cost at fleet scale

Moving logic to the edge shifts cost from cloud processing to device hardware and maintenance. The shift rarely removes the cost, so compare both sides across the whole fleet and its lifetime. Treat any savings claim without a source with caution.

Where to run a function

What Does an IoT Edge Computing Architecture Look Like?

Most IoT edge computing architecture designs fall into one of three patterns: thin edge plus cloud, thick edge plus cloud, or mostly local with periodic sync. In all three, the cloud handles fleet-level work.

Thin edge plus cloud

In this pattern, the device sends data with light local filtering, and a central server in the cloud does most of the work. It suits products with steady connectivity and logic that changes often.

Thick edge plus cloud

A gateway or local runtime runs rules, filtering, and sometimes ML inference, for example for predictive maintenance. The cloud layer handles storage, analytics, and management. We build this cloud layer on AWS as part of our AWS consulting services.

Mostly local, with periodic sync

The system runs locally, keeps its data in local storage, and syncs when cloud connectivity returns. Local logic then has to handle everything the cloud would have handled, including conflicts when data syncs.

What stays in the cloud in every pattern

Fleet management, long-term storage, analytics, and model training stay in the cloud, because they need data from many devices. Teams usually pair this layer with IoT analytics solutions that analyze data across the fleet and turn it into decisions.

Example stack: AWS IoT Greengrass and AWS IoT Core

AWS IoT Greengrass is an open-source edge runtime from Amazon Web Services (AWS). According to the AWS documentation, it lets devices "act locally on the data that they generate". It can run software as Lambda functions, Docker containers, native operating system processes, or custom runtimes. Devices can also export data to the cloud through AWS IoT Core.

The Greengrass FAQ says devices can "operate with intermittent connections". It also warns that API calls to cloud services fail in offline mode. Greengrass is one option among several for the edge layer.

What Are the Trade-Offs of Moving Logic to the Edge?

Edge computing buys you speed and offline resilience. In return, you take on software that you have to maintain in the field. Survey data from 2026 shows where that work concentrates: updates, security, and visibility.

More software to update in the field

Every piece of logic on devices, or on edge devices such as gateways, needs an over-the-air (OTA) update path and a rollback plan. A bad cloud release can be rolled back in one place. A bad release on edge devices has to reach every device again, and that only works if the update path exists first. In a July 2026 Synadia survey of 500 edge practitioners, 33% said failed or partial software and firmware updates were a common cause of significant incidents or outages.

A larger security surface

Devices can be physically reached, so there are more ways in. A gateway-based setup also adds one more node that needs credentials, patching, and monitoring. Security was the most cited challenge in edge IoT deployments in an Omdia survey of 570 IoT decision-makers, published in October 2026, at 31%.

Harder debugging and monitoring

When logic is spread across devices, phones, gateways, and the cloud, a fault is harder to trace. You need logs and health signals from every place logic runs. The same Synadia survey found that 52% of respondents lack a unified, up-to-date view of the software running across their edge devices.

Logic that exists twice

Edge and cloud versions of the same rule drift apart over time. Keep one source of truth for shared rules, and test both versions together.

When cloud-only is enough

Cloud-only is enough when no criterion in this article points to the edge: the product tolerates a cloud round trip, stays connected, and holds no sensitive raw data. Edge computing for IoT earns its place when at least one criterion requires it.

How we built

a Scooter management app for mobility startup Etergo

CTA image

How Does the Split Look in Real Connected Products?

Criteria are easier to trust when you see them applied. Here is how we usually talk through the split on connected-product projects, using three common product types.

A phone-as-key lock

In BLE unlock products, the first rule is: the door has to open with no signal. Resilience and time sensitivity put the unlock decision and the BLE exchange on the device and the phone. The cloud takes the jobs that need a view across all locks and users, such as issuing and revoking keys and storing access history.

A battery-powered sensor

On a battery-powered sensor, the radio drives the design. Every transmission drains the battery and adds to the uplink bill, so we sample on the device and send summaries on a schedule. A simple threshold alert can run on the device too, so only the summary travels. Fleet analytics stay in the cloud.

A building-safety hub

With a building-safety hub, we start from the worst day: the internet connection is down, and the alarm still has to sound. That puts the alarm rules on the hub. Remote monitoring, event history, and reports across many buildings run in the cloud, because they need data from every site.

Planning the edge and cloud split for a connected product?

Check our

CTA image

Our Experience Deciding the Edge and Cloud Split on Connected Products

Each project below sits on a different layer of the split described above: the device, the phone, the gateway, or the cloud.

What we have built

In the Etergo connected scooter project, TechMagic built native iOS and Android companion apps for an electric scooter maker, with shared business logic in Kotlin Multiplatform (KMP). The project also included a serverless backend, an AWS IoT Core integration for scooter commands and data, and a scooter simulator to test the backend and connected features. In split terms, the apps are the phone layer, and the AWS IoT Core integration and backend are the cloud layer.

The VitalsBridge embedded software work covered a medical simulation system that shows simulated vital signs on real hospital monitors. TechMagic migrated the embedded stack from Windows IoT Core to Linux, moved the connection from Bluetooth Classic to BLE, and added D-Bus middleware for communication between hardware components. This work sits on the device layer.

Other named projects include Scoozer, a BLE scan-to-unlock scooter rental product, and the Telefire fire-alarm hub, which covers remote monitoring and open connectivity to building management systems (BMS). Scoozer is a device-and-phone case, and Telefire is a gateway case.

How we approach the split

As an IoT development company, we review the split between edge computing and the cloud as part of architecture and feasibility work. The same review covers connectivity and cloud stack selection. You can apply the seven criteria above to your own product before a scoping conversation.

Final Thoughts

Run logic near the device when it is time-critical, must work offline, or handles sensitive raw data. Keep fleet-wide analytics, storage, and management in the cloud. Most IoT solutions split the work between the two.

Each role in a connected-product team takes away something different:

  • CTO or VP Engineering: draw the line for each function, then check the update path.

  • Head of Product: the split affects both cost and release speed.

  • VP Operations or Head of Service: ask what happens to each function when the connection drops.

Where is this heading?

  • Edge AI is starting from a small base. IoT Analytics reports that less than 1% of IoT connections had a true edge Artificial Intelligence (AI) component in December 2025, which it defines as a dedicated accelerator such as a graphics processing unit (GPU) or a neural processing unit (NPU). Products that add Machine Learning to devices will meet the placement question for inference first.

  • Inference is likely to move toward the device before training does. A trained model near the device meets the latency, privacy, and offline criteria, while training needs data from many devices and stays in the cloud.

  • Update tooling will limit how fast logic moves. Teams that can roll out and roll back device software safely can place more logic at the edge. Teams that cannot should keep logic in the cloud until they can.

Edge AI is still early, and for now most logic will stay split between the device and the cloud.

Deciding where your device logic should run?

Walk us through your product and we'll review the edge and cloud split with you

CTA image

FAQ

faq-cover
What is edge computing in IoT?

Edge computing in the Internet of Things (IoT) means processing data on or near the device that produces it, instead of sending all data to a central cloud first. The edge can be the device, a phone, or a gateway. The cloud still handles work that needs data from many devices.

How is IoT edge computing different from cloud computing?

The difference is where the work happens. The edge can answer without a cloud round trip and keep local functions running when the connection drops. The cloud handles storage, fleet-wide analytics, and device management.

Does edge computing replace the cloud in an IoT system?

Edge computing does not replace the cloud in an IoT system. Edge nodes handle local, time-sensitive, or offline work, and the cloud handles fleet-wide storage, analytics, and device management.

When should IoT device logic run at the edge instead of the cloud?

Run IoT device logic at the edge when it is time-critical, must work offline, handles sensitive raw data, or sends raw data over a costly uplink. RFC 9556 names these four challenges as time sensitivity, connectivity cost, resilience to intermittent services, and privacy and security.

How does TechMagic decide where device logic should run in a connected product?

TechMagic reviews the split between edge computing and the cloud as part of architecture and feasibility work for connected products. The same work covers connectivity and cloud stack selection. A scoping conversation with TechMagic is the starting point.

Subscribe to our blog

Get the inside scoop on industry news, product updates, and emerging trends, empowering you to make more informed decisions and stay ahead of the curve.

Let’s turn ideas into action

Ross Kurhanskyi
Ross Kurhanskyi

VP of business development

linkedin-icon

Trusted by:

logo
logo
logo
logo