# Edge Computing A computing paradigm where data processing happens at or near the source of data generation — on the user's device, on a nearby IoT gateway, or at a regional Point of Presence (PoP) — rather than at a centralized data center. The "edge" of the network does the work. ## Why It Exists Centralized cloud computing creates four pain points: - **Latency**: round-trips to distant data centers add 50-200ms - **Bandwidth cost**: streaming raw data to the cloud is expensive - **Privacy**: sensitive data leaves the local network - **Availability**: cloud outages break dependent systems Edge computing addresses these by moving compute closer to data. ## Layers of "Edge" | Layer | Examples | Latency | |---|---|---| | Device | Phones, laptops, sensors, watches | Sub-millisecond | | On-prem gateway | Factory IoT controllers, home hubs | Single-digit ms | | CDN PoP / edge node | Cloudflare Workers, Fastly, AWS Lambda@Edge | 5-30ms | | Regional cloud | Single AWS region | 30-100ms | | Centralized cloud | Cross-continent | 100-500ms | ## Key Technologies - **Edge runtimes**: Cloudflare Workers, Vercel Edge, Deno Deploy, Fastly Compute@Edge - **Containers at the edge**: K3s, lightweight Kubernetes - **WebAssembly**: portable, sandboxed compute primitive (see [[Web Assembly (WASM)]]) - **CDNs evolving into compute**: serving dynamic responses, not just static assets ## Common Use Cases - Real-time video analytics (process locally, summarize to cloud) - IoT sensor preprocessing (filter noise before uploading) - Latency-sensitive APIs (auth, geo-routing, rate limiting) - Privacy-preserving analytics (aggregate before sending) - [[Edge AI]] / [[On-Device Machine Learning]] ## Trade-offs **Strengths:** - Lower latency - Reduced bandwidth and cloud costs - Better privacy posture - Resilience to cloud outages **Weaknesses:** - Distributed systems complexity (state, consistency) - Hardware fragmentation - Harder to update software at scale - Compute power per node << cloud ## References - https://en.wikipedia.org/wiki/Edge_computing ## Related - [[Edge AI]] - [[On-Device Machine Learning]] - [[Web Assembly (WASM)]] - [[AI Privacy]] - [[AI Inference]] - [[WebMachineLearning]] - [[Browser-Provided Language Models]] - [[WebAssembly System Interface (WASI)]] - [[Cloudflare]] - [[Cloudflare Workers]] - [[Cloudflare Pages]]