⚠ Critical: "Edge" in the Name Does NOT Mean Edge Computing
The Naming Trap
"Unleash Edge" is named "Edge" because it sits at the edge of your infrastructure — the boundary between your application services and the Unleash feature flag server. It is not an edge computing product. It does not run in Cloudflare Workers, Lambda@Edge, AliCloud CDN Edge Script, or any WebAssembly edge runtime.
Think of it like a database connection pool (PgBouncer) — it lives inside your cluster, close to your apps, and caches data so apps don't hit the main server directly. Nobody would deploy PgBouncer to a CDN edge node.
• CDN edge nodes (Cloudflare, Fastly, AliCloud CDN)
• Serverless functions (Lambda, Function Compute FC)
• WebAssembly runtimes (Cloudflare Workers, Deno Deploy)
• AliCloud Edge Script or EdgeRoutine
• Low-power IoT edge devices
• A long-running Rust process (stateful)
• Keeps flags in memory (persistent cache)
• Maintains a persistent TCP/SSE connection upstream
• Deployed inside your cluster, close to your app services
• Needs a container runtime, NOT a function runtime
1. What Unleash Edge Actually Requires to Run
Understanding these requirements tells you immediately which platforms work and which don't.
2. Serverless — Why It Doesn't Work
3. Alibaba Cloud Services — Overview
ACK
Container Service for Kubernetes. Full K8s — same as deploying anywhere. Best option. Full StatefulSet / Deployment / DaemonSet support.
SAE
Serverless for containers (not functions). Runs long-lived container processes. You deploy a Docker image — SAE manages the infrastructure. Works with Edge.
ECI
Serverless containers on AliCloud. Like AWS Fargate. Runs a Docker container persistently. Supports health checks and long-running processes. Works with Edge.
ENS
AliCloud's actual edge computing nodes (distributed PoPs). Supports containers. Edge can run here — but understand latency tradeoffs and networking constraints.
Function Compute (FC)
AliCloud's Lambda equivalent. Functions only — no persistent process, no persistent memory. Cannot run Unleash Edge.
CDN Edge Script
Runs JavaScript at AliCloud CDN edge nodes. Limited JS environment, no TCP, no Docker. Cannot run Unleash Edge.
4. ACK — Container Service for Kubernetes ✅ (Recommended)
What you get
Deployment + Service + HPA
Deploy Edge as a 2-replica Deployment behind a ClusterIP Service. Apps use unleash-edge.unleash.svc.cluster.local:3063.
Multi-zone spread
ACK supports topology.kubernetes.io/zone labels. Use topologySpreadConstraints to spread Edge pods across AliCloud availability zones.
ARMS / Prometheus integration
AliCloud ARMS (Application Real-Time Monitoring) can scrape Edge's /internal-backstage/prometheus endpoint natively.
5. SAE — Serverless App Engine ✅ (Good for simplicity)
SAE advantages for Edge
No K8s cluster to manage
SAE handles the underlying infrastructure. You just deploy a Docker image and SAE runs it persistently.
Per-second billing
Pay for actual CPU/RAM used. Edge is extremely lightweight (Rust, ~30MB RAM) — very low cost on SAE.
Health checks built-in
SAE supports HTTP liveness and readiness probes — configure them to hit /health and /ready.
No DaemonSet or sidecar
SAE doesn't support K8s primitives. You run Edge as a standalone SAE app — apps call it via Service Discovery or internal domain.
6. ECI — Elastic Container Instance ✅ (Fargate-like)
Direct Container Run
Create an ECI instance with unleashorg/unleash-edge:latest. ECI runs it as a persistent container. Accessible via VPC internal IP.
ACK Virtual Node
If you have ACK, add a virtual node backed by ECI. Deploy Edge pods on the virtual node — no dedicated ECS nodes needed for Edge.
Best For
You want to run Edge but don't have (or don't want) a K8s cluster. ECI gives you a managed container runtime for just the Edge process.
7. ENS — Edge Node Service ⚠️ (True Edge Nodes, But Tradeoffs)
What ENS provides
Distributed PoPs across China
ENS nodes in 300+ cities. If your users are in Shenzhen, your Edge can run in Shenzhen — flag reads are local.
Supports Docker containers
ENS supports container workloads — you can deploy unleashorg/unleash-edge:latest on an ENS node.
Persistent processes allowed
Unlike CDN edge functions, ENS runs full VMs/containers. Persistent process + in-memory cache + SSE connections all work.
ENS tradeoffs for Edge
Higher operational complexity
ENS nodes need manual management. No native K8s — you deploy as standalone containers or VMs with your own orchestration.
Upstream connectivity varies
ENS nodes at distant PoPs may have higher latency to your Unleash server (in a central region). ENS → Unleash sync lag increases.
Use case is niche
Only makes sense if your apps are deployed on ENS too (e.g., CDN-adjacent processing). For standard K8s apps, ACK Edge is better.
8. Function Compute ❌ — Cannot Run Unleash Edge
No Persistent State
FC instances are frozen or killed between requests. Edge's in-memory flag cache is destroyed every invocation. Every call would need to re-fetch flags from Unleash — 200ms+ latency instead of <1ms.
No SSE / Long Connections
Function Compute has a maximum execution timeout (even async has limits). A persistent SSE connection to Unleash upstream is impossible — FC would kill it.
Concurrent Scale-Out
Under load, FC spins up many instances. Each instance has its own empty cache and its own upstream connection to Unleash — thundering herd problem, defeating Edge's purpose entirely.
Workaround: FC calls Edge
If your app IS a Function Compute function, point your Unleash SDK at an Edge instance running in ACK/SAE/ECI. FC functions call Edge (fast internal call), Edge handles caching and upstream sync.
9. Recommended Setup for AliCloud
Option A — ACK (best, full K8s)
You already have ACK → deploy Edge as a Deployment with 2 replicas in the unleash namespace. All other pods in the cluster call Edge via unleash-edge.unleash.svc:3063. Use ARMS for metrics.
Option B — SAE (no K8s ops, still great)
You use SAE for your apps → deploy Edge as a SAE application (2 instances). Apps discover Edge via SAE's built-in MSE service discovery or a fixed internal domain.
Option C — ECI (minimal, standalone)
Simplest: create an ECI group with 2 Edge containers in your VPC. Apps call the ECI internal IP. Use an internal SLB in front of the 2 ECI instances for HA.
Option D — ACK + ENS Edge Chaining (multi-region)
Central Edge in ACK (Beijing/Hangzhou) → Regional Edge on ENS nodes (Shenzhen, Shanghai, Chengdu). Apps at each location call local ENS Edge. Flags propagate from central to edge within 15–30s.
10. Full AliCloud Architecture Diagram
11. AliCloud Options — Side-by-Side
| AliCloud Service | Can Run Edge? | K8s Support | Persistent Process | Ops Complexity | Cost | Best For |
|---|---|---|---|---|---|---|
| ACK | ✓ Yes | Full K8s | Yes | Medium | Node cost | Teams already on K8s |
| SAE | ✓ Yes | No (managed) | Yes | Low | Pay per use | Teams wanting no K8s ops |
| ECI | ✓ Yes | Via virtual node | Yes | Low | Per-second billing | Minimal footprint, standalone |
| ENS | ⚠ Technically yes | Limited | Yes | High | Per-node | Apps deployed on ENS edge nodes |
| Function Compute | ✗ No | No | No | — | — | FC functions should CALL Edge, not run it |
| CDN Edge Script | ✗ No | No | No | — | — | Cannot run Rust containers |
12. If You Need True Edge Computing — Alternative Approach
Call Edge from CDN Worker
CDN worker makes a subrequest to your Edge instance (ACK/SAE in VPC behind an internal endpoint). Flag result is fetched per-request from Edge. Adds ~10–50ms depending on proximity.
Bake flags into CDN deployment
Use Unleash's export API to dump flag values at build/deploy time. Bake them into your CDN worker bundle as a JSON constant. Update = redeploy worker. Works for stable flags.
KV Store caching
A background process (cron) periodically fetches flags from Edge/Unleash and writes them to the CDN's KV store (Cloudflare KV, AliCloud DCDN EdgeKV). Workers read from KV — fast, no origin call.
Unleash Server CDN caching
Cache the /api/frontend response at the CDN layer with a short TTL (e.g. 30s). All CDN PoPs share the same cached flag response. Simple but context-aware evaluation is lost.
Run Unleash Edge in ACK or SAE (inside your VPC). All services — whether they're ACK pods, SAE apps, ECI containers, or Function Compute functions — call Edge over the VPC network. Only if you're building CDN-layer logic (EdgeScript/Deno) do you need the KV or subrequest pattern above. The name "Edge" is just a name — treat it as a fast, in-cluster feature flag cache.