Files
2nd/10_Wiki/Topics/Edge Computing.md
T
koriweb d8a80f6272 chore(wiki): dangling 링크 canonical 정규화 (768파일/1200건)
이름만 다른(표기 변형) [[위키링크]]를 대상 문서의 canonical 제목으로 치환해
끊겼던 1,200개 링크를 연결. 제목/파일명 정규화 일치만 적용하고 별칭 매칭은
과병합 위험으로 제외(애매성 가드). 원본은 _link_reconcile_backup/ 에 백업.
도구: Datacollect/scripts/link_reconcile_apply.mjs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 12:24:15 +09:00

6.2 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-edge-computing Edge Computing 10_Wiki/Topics verified self
Edge AI
Fog Computing
Edge Inference
MEC
none A 0.92 applied
edge
iot
distributed-systems
latency
on-device
2026-05-10 pending
language framework
Rust/C++/Python K3s / Cloudflare Workers / ONNX Runtime / WasmEdge

Edge Computing

매 한 줄

"매 edge computing 의 핵심: compute moves to data — latency + bandwidth + privacy". 매 2010s CDN edge → 매 2020s function-edge (Cloudflare Workers, Deno Deploy, AWS Lambda@Edge), 매 2022 edge AI inference, 매 2024 5G MEC. 매 2026 현재 phone (Apple Intelligence, Pixel Gemini Nano) → CDN edge (Workers AI) → micro-DC 의 3-tier edge stack 의 일반화.

매 핵심

매 edge spectrum

  • Device edge: 매 phone, sensor, MCU, robot.
  • Near edge / On-prem: 매 factory floor, retail store K8s.
  • Far edge / CDN: 매 Cloudflare, Fastly, Akamai PoPs.
  • MEC (Mobile Edge Computing): 매 5G base station co-located.

매 drivers

  • Latency: 매 <10ms — 매 cloud round-trip 의 불가능.
  • Bandwidth: 매 video / sensor stream의 cloud 전송 cost.
  • Privacy / sovereignty: 매 data 의 region / device 외 미반출.
  • Resilience: 매 offline operation.
  • Cost: 매 egress fee 회피.

매 응용

  1. Real-time vision (autonomous driving, AR).
  2. Voice assistants (Siri on-device wake-word).
  3. Industrial control (PLC + edge AI).
  4. Game streaming, low-latency RTC.
  5. Edge AI inference (Llama 3.2 on phone, Whisper on Pi).

💻 패턴

Cloudflare Workers (function edge)

export default {
  async fetch(req: Request, env: Env): Promise<Response> {
    const cache = caches.default;
    const cached = await cache.match(req);
    if (cached) return cached;
    const data = await env.DB.prepare("SELECT * FROM posts LIMIT 10").all();
    const res = new Response(JSON.stringify(data),
      { headers: { "cache-control": "max-age=60" } });
    await cache.put(req, res.clone());
    return res;
  }
};

Workers AI (edge LLM inference)

export default {
  async fetch(req, env) {
    const { prompt } = await req.json();
    const out = await env.AI.run("@cf/meta/llama-3.2-3b-instruct",
      { prompt, max_tokens: 200 });
    return Response.json(out);
  }
};

K3s (lightweight K8s for edge)

# Install on edge node
curl -sfL https://get.k3s.io | sh -s - --disable traefik --node-name edge-01
# Deploy edge inference service
kubectl apply -f - <<EOF
apiVersion: apps/v1
kind: Deployment
metadata: { name: edge-yolo }
spec:
  replicas: 1
  template:
    spec:
      nodeSelector: { tier: edge }
      containers:
      - name: yolo
        image: ghcr.io/me/yolo11n:latest
        resources: { limits: { cpu: "2", memory: 2Gi } }
EOF

ONNX Runtime on edge (Raspberry Pi 5)

import onnxruntime as ort
import numpy as np
sess = ort.InferenceSession("yolov11n.onnx",
    providers=["CPUExecutionProvider"])
out = sess.run(None, {"images": img.astype(np.float32)})

WasmEdge (portable edge runtime)

// Compile Rust → wasm32-wasi
fn main() {
    let img = std::fs::read("input.jpg").unwrap();
    let result = run_inference(&img);
    println!("{:?}", result);
}
// Run: wasmedge app.wasm

MQTT-bridged hierarchical edge

# Edge gateway aggregates sensors, forwards summaries to cloud
import paho.mqtt.client as mqtt

def on_local(client, _, msg):
    summary = aggregate(msg.payload)
    cloud.publish("plant/summary", summary)

local = mqtt.Client(); local.connect("localhost"); local.on_message = on_local
local.subscribe("sensors/#"); local.loop_start()

cloud = mqtt.Client(); cloud.connect("cloud.broker.com")

CRDT-based offline-first sync

import * as Y from "yjs";
import { WebsocketProvider } from "y-websocket";
const doc = new Y.Doc();
// Works offline, merges automatically when reconnected
new WebsocketProvider("wss://sync.edge.local", "doc1", doc);

Edge LLM with quantization (mobile)

# Convert Llama 3.2 3B to 4-bit GGUF for mobile
# llama.cpp or MLX
from mlx_lm import convert
convert("meta-llama/Llama-3.2-3B-Instruct",
        mlx_path="llama-3b-q4", quantize=True, q_bits=4)

매 결정 기준

상황 Approach
Static asset / API cache CDN (Cloudflare, Fastly)
Low-latency API Workers / Deno Deploy
Stateful edge service K3s on near-edge
Sensor / IoT MQTT + edge gateway
Edge AI inference ONNX Runtime / TFLite / Core ML
Cross-platform portable Wasm (WasmEdge, Spin)
Personal AI On-device LLM (MLX, llama.cpp)

기본값: 매 latency-sensitive read 은 CDN edge, 매 sensor data 의 edge gateway 에서 aggregate.

🔗 Graph

🤖 LLM 활용

언제: 매 edge deployment scaffolding (K3s manifests, Workers code), 매 quantization workflow, 매 latency-budget reasoning. 언제 X: 매 hard-real-time (<1ms) — 매 LLM 의지 X. 매 deterministic timing 의 RTOS 사용.

안티패턴

  • Edge as cloud-with-extra-steps: 매 unnecessary 사용 — 매 latency / privacy 명확한 driver 없으면 cloud.
  • No degradation strategy: 매 edge offline → 전체 fail.
  • State at every edge: 매 consistency nightmare — 매 CRDT / eventual 의 사용.
  • Same model size as cloud: 매 device OOM — 매 quantize + distill.
  • Ignoring network partitions: 매 split-brain → corrupted state.
  • Pushing all logic to client: 매 trust boundary violation.

🧪 검증 / 중복

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — edge spectrum + 2026 tooling (Workers AI, MLX, K3s)