edge-computing
Use when designing edge computing architectures, serverless at edge, or distributed compute strategies. Covers edge functions, compute placement decisions, Cloudflare Workers, Lambda@Edge, and edge-native patterns.
What this skill does
# Edge Computing
Comprehensive guide to edge computing architecture - running compute closer to users for lower latency and better performance.
## When to Use This Skill
- Designing edge function architectures
- Deciding where to place compute (edge vs origin)
- Implementing serverless at edge
- Understanding edge platform capabilities
- Optimizing latency-sensitive applications
- Building globally distributed applications
## Edge Computing Fundamentals
### What is Edge Computing?
```text
Compute Placement Spectrum:
┌─────────────────────────────────────────────────────────────┐
│ │
│ User Device Edge Regional Central Origin │
│ (Client) (CDN) (Cloud) (Cloud) (Cloud) │
│ │
│ ◄──────────────────────────────────────────────────► │
│ │
│ Lowest ┌─────────────────────────────┐ Highest │
│ Latency │ EDGE COMPUTING │ Latency │
│ │ (This skill's focus) │ │
│ └─────────────────────────────┘ │
│ │
│ Limited ◄─────────────────────────────► Full │
│ Resources Resources │
│ │
└─────────────────────────────────────────────────────────────┘
Edge = Running code on CDN/network edge servers (100s of locations)
vs Regional = Running in a few cloud regions (10-20 locations)
vs Origin = Running in one primary location (1-3 locations)
```
### Edge vs Serverless vs Traditional
```text
Comparison:
Edge Functions Cloud Functions Containers/VMs
────────────────────────────────────────────────────────────────────────
Locations 100-300+ 10-20 1-10
Cold Start <50ms 100ms-seconds N/A (always warm)
Execution Limit 10-30 seconds 15 minutes Unlimited
Memory 128MB-1GB 256MB-10GB Unlimited
CPU Limited Standard Full control
State Stateless Stateless Stateful OK
Cost Model Per request Per request Per instance
Best For Low-latency, General compute Complex apps,
simple logic long-running
Use Cases by Type:
Edge: Auth, routing, personalization, A/B tests, redirects
Cloud Functions: APIs, webhooks, background processing
Containers: Full applications, databases, ML inference
```
### Edge Platform Architecture
```text
Edge Platform Components:
┌─────────────────────────────────────────────────────────────┐
│ Control Plane │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Deploy │ │ Config │ │ Secrets │ │ Metrics │ │
│ │ API │ │ Store │ │ Mgmt │ │ & Logs │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
└───────┼─────────────┼─────────────┼─────────────┼──────────┘
│ │ │ │
└─────────────┼─────────────┼─────────────┘
│ │
╔═════════════╧═════════════╧═════════════╗
║ Global Distribution ║
╚═════════════════════════════════════════╝
│
┌─────────────────┼─────────────────┐
│ │ │
┌───▼───┐ ┌───▼───┐ ┌───▼───┐
│ Edge │ │ Edge │ │ Edge │
│ POP 1 │ │ POP 2 │ │ POP N │
│┌─────┐│ │┌─────┐│ │┌─────┐│
││ V8 ││ ││ V8 ││ ││ V8 ││
││Isol.││ ││Isol.││ ││Isol.││
│└─────┘│ │└─────┘│ │└─────┘│
└───────┘ └───────┘ └───────┘
Execution Model:
- V8 Isolates: Lightweight isolation (not containers)
- Instant cold start (sub-50ms)
- Per-request execution
- Auto-scaled per POP
```
## Edge Function Patterns
### Request Interception
```text
Request/Response Lifecycle:
User Request ──► Edge Function ──► Origin (optional)
│
┌───────┴───────┐
│ │
Modify Request Short-circuit
(continue to (return response
origin) from edge)
Use Cases:
1. URL Rewriting
/old-page → /new-page
/api/v1/* → /api/v2/*
2. Header Manipulation
Add security headers
Add request ID
Normalize Accept-Language
3. Authentication
Validate JWT at edge
Check API key
Redirect to login
4. A/B Testing
Assign cohort
Rewrite to variant URL
5. Bot Protection
Challenge bots
Block known bad actors
6. Geolocation Routing
Route to regional origin
Apply regional rules
```
### Response Transformation
```text
Response Transformation Patterns:
1. HTML Injection
┌─────────────────────────────────────────┐
│ Inject analytics, A/B test scripts │
│ Add personalized content │
│ Insert GDPR banners by region │
└─────────────────────────────────────────┘
2. Content Optimization
┌─────────────────────────────────────────┐
│ Compress responses │
│ Image optimization/resizing │
│ Minification │
└─────────────────────────────────────────┘
3. Response Caching
┌─────────────────────────────────────────┐
│ Cache API responses at edge │
│ Assemble from cache fragments │
│ Serve stale while revalidating │
└─────────────────────────────────────────┘
4. Error Handling
┌─────────────────────────────────────────┐
│ Fallback pages on origin error │
│ Custom error pages per region │
│ Retry logic with backoff │
└─────────────────────────────────────────┘
```
### Edge Storage Patterns
```text
Edge Storage Options:
1. Key-Value Store (KV)
├── Read-heavy workloads
├── Eventually consistent
├── Low latency reads
└── Limited write throughput
Use: Feature flags, configuration, user sessions
2. Durable Objects (Cloudflare)
├── Strong consistency
├── Stateful edge compute
├── Single-instance per ID
└── WebSocket support
Use: Real-time collaboration, chat, gaming state
3. Edge Databases
├── Distributed SQL (PlanetScale, Turso)
├── Read replicas at edge
├── Low latency reads
└── Write to primary region
Use: User data, product catalogs, CMS
4. R2/S3-Compatible Storage
├── Object storage at edge
├── No egress fees (some providers)
└── Large file storage
Use: Static assets, user uploads, backups
```
## Compute Placement Decisions
### Decision Framework
```text
Where Should This Run?
Question 1: Latency Requirements
├── <50ms required? → Edge
├── <200ms acceptable? → Regional cloud
└── Latency not critical? → Central origin
Question 2: Compute Complexity
├── Simple transformations? → Edge
├── Moderate logic? → Edge or Regional
└── Complex processing? → Regional or Central
Question 3: Data Dependencies
├── No data needed? → Edge
├── Read-heavy, cacheable? → Edge with cache
├── Strong consistency needed? → Regional
└── Write-heavy? → Central
Question 4: State Requirements
├── Stateless? → Edge
├── Session state? → Edge with KV/Durable Objects
└── Complex state? → Regional or Central
Question 5: Cost Sensitivity
├── High request volume, simple? → Edge (efficient)
├── CPU-intensive? → Regional (cheaper)
└── Long-running? → Central
```
### Hybrid Architecture
```text
Hybrid Edge + Origin Architecture:
┌─────────────────────────────────────────────────────────────┐
│ Edge Layer │
│ ┌─────────────────────────────────────────────────────┐ │
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.