Edge computing will solve all your personalization problems. At least, that's what vendors want you to believe.
The reality? Cold starts that turn "instant" into 500ms. Runtime limitations that make complex logic impossible. Debugging distributed systems across 200+ locations. And cost surprises that make your CFO regret ever hearing the word "edge."
Hero photo by Jordan Harrison on Unsplash
The Personalization Reality Check Series
- Introduction to Personalization
- Understanding Personalization Factors - Part 1: Data Taxonomy
- Understanding Personalization Factors - Part 2: CDPs & Strategy
- Server-Side Personalization - Part 1: Architecture & Caching
- Server-Side Personalization - Part 2: Performance & Decisions
- Client-Side Personalization
- Edge-Side Personalization (You are here)
- Choosing the Right Approach
Try the interactive version: the free Personalization Approach Picker turns this series into an 8-question assessment.
In the server-side articles, we covered how origin-based personalization breaks caching and causes performance degradation. Edge computing promises to fix this by moving personalization logic closer to users. Let's examine when that promise holds up.
What Is Edge Computing (Really)?
"Edge" is one of the most abused terms in tech marketing. Let's define what it actually means.
The Promise
Code runs at CDN Points of Presence (PoPs) distributed globally, often 200+ locations. Instead of requests traveling to your origin server in Virginia, personalization logic executes at the PoP closest to the user.
Theoretical benefits:
- Sub-10ms personalization decisions
- No origin round-trip latency
- Infinite horizontal scale
- Better cache efficiency
The Reality
Not all "edge" is equal. Vendors use the term loosely:
True edge (200+ locations): Cloudflare Workers (300+ PoPs), Fastly Compute (renamed from Compute@Edge in 2023), CloudFront Functions
Regional edge: Lambda@Edge (15 regional edge caches), Vercel Functions (regional compute, not a run-everywhere edge)
"Edge" that isn't: Some vendors call anything outside your data center "edge", including regional compute that's no closer to users than traditional cloud
When evaluating platforms, ask: "Where does my code actually run?" The answer is often less impressive than the marketing suggests.
The Major Edge Platforms
Cloudflare Workers
Architecture: V8 isolates (same engine as Chrome). No container cold starts: isolates spin up in single-digit milliseconds.
The good:
- 300+ global locations
- Near-zero cold starts for JavaScript/TypeScript
- 99.99% warm request rate on enterprise traffic with their "Shard and Conquer" routing1
- 2.4x faster cold starts than AWS Lambda for Python workloads, per Cloudflare's own benchmarks
- Workers KV for distributed key-value storage
The limitations:
- No inbound TCP and no UDP; outbound TCP works via the
connect()API - No native Node.js APIs (process, path, fs) without compatibility flags
- 10ms CPU time limit (free); paid defaults to 30 seconds, configurable up to 5 minutes
- 128MB memory limit
- Limited npm package compatibility
Cost reality:
- Free tier: 100,000 requests/day
- Paid: $5/month with 10 million requests included, then $0.30 per million plus CPU time charges
- KV operations add up quickly at scale
Best for: Lightweight personalization, A/B testing, header manipulation, geolocation-based content.
Vercel (Formerly Edge Functions)
Architecture: Vercel deprecated its separate Edge Functions and Edge Middleware in June 2025. Middleware and functions now run on the unified Vercel Functions infrastructure with Fluid compute, which favors fewer, warmer instances over a run-everywhere edge model2.
The good:
- Deep Next.js integration: middleware personalization stays a first-class pattern
- Fluid compute reuses warm instances, so cold starts are rare in practice
- One programming model for middleware and functions instead of two runtimes
The limitations:
- Not a 300-location edge network: compute runs in Vercel's regions
- Code written for the old Edge runtime may need migration to the Node.js runtime
- Usage-based Active CPU pricing takes modeling at scale
Cost reality:
- Hobby tier includes middleware and functions
- Pro: $20 per user/month plus usage beyond included credits
- Beware bandwidth costs at scale
Best for: Next.js applications wanting middleware-driven personalization without managing a separate edge platform.
AWS Lambda@Edge vs. CloudFront Functions
AWS offers two distinct edge products. Most people conflate them.
CloudFront Functions:
- Runs at all CloudFront edge locations (750+ PoPs, true edge)
- JavaScript only
- <1ms execution time limit
- 2MB memory
- No network access
- $0.10 per million invocations
Lambda@Edge:
- Runs at 15 regional edge caches (not true edge)
- Node.js and Python
- Up to 30 seconds execution
- 128MB memory for viewer events, up to 10GB for origin events
- Network access allowed
- Cold starts from around 100ms to over a second
- $0.60 per million invocations + duration charges
The trap: Developers assume Lambda@Edge runs at edge locations like CloudFront Functions. It doesn't. It runs at regional caches, still faster than origin, but not the sub-10ms edge experience vendors imply.
Best for: CloudFront Functions for header manipulation, Lambda@Edge for complex origin request processing.
Sitecore Personalize at the Edge
Sitecore's CDP and Personalize products integrate with edge platforms, but understanding the architecture matters.
How it works:
- Sitecore Personalize stores audiences and decision logic
- Edge middleware connects to Sitecore CDP Stream APIs
- XM Cloud publishes multiple content variants to Experience Edge
- Edge function selects which variant to serve based on audience rules
The reality:
- Still requires API calls to Sitecore backend for complex decisions
- Simple audience matching can happen at edge
- Complex decision models add latency
- Licensing adds significant cost on top of edge compute costs
Best for: Organizations already invested in Sitecore ecosystem needing edge personalization integration.
The Cold Start Problem
Cold starts are the silent killer of edge performance claims.
What Causes Cold Starts
When no warm instance of your function exists at a PoP, the platform must:
- Load your code
- Initialize the runtime
- Execute initialization code (imports, connections)
- Then handle your request
This can take anywhere from <5ms (Cloudflare Workers) to over a second (Lambda@Edge with heavier functions).
Platform-Specific Reality
Cloudflare Workers: Near-zero for JavaScript. V8 isolates avoid container overhead. "Shard and Conquer" routing achieves 99.99% warm request rate by intentionally routing traffic for the same Worker to the same server within each data center1.
Vercel: Fluid compute keeps instances warm and reuses them across requests, so cold starts are rare; when they happen they cost hundreds of milliseconds, not seconds.
Lambda@Edge: The worst offender of the four. AWS's own numbers put cold starts anywhere from under 100ms to over a second, and Lambda@Edge does not support provisioned concurrency, so you cannot pre-warm your way out.
CloudFront Functions: Sub-millisecond. Limited capabilities but excellent cold start performance.
When Cold Starts Kill Edge Benefits
Your edge function takes 5ms to execute. Great! But if 10% of requests hit cold starts averaging 800ms, your P95 latency is terrible.
Warning signs:
- Low traffic (< 100 requests/minute per PoP)
- Complex initialization (heavy imports, connection setup)
- Using Lambda@Edge for anything latency-sensitive
- Traffic spread across many edge locations
Mitigation strategies:
- Keep functions lightweight (minimal dependencies)
- Avoid Lambda@Edge for latency-sensitive paths; it has no provisioned concurrency to pre-warm
- Accept cold start latency for non-critical paths
- Consider client-side for low-traffic personalization
Runtime Limitations
Edge functions aren't servers. They're sandboxed environments with strict constraints.
What You Can't Do
Database connections are constrained: Cloudflare Workers gained outbound TCP (and pooled Postgres/MySQL via Hyperdrive), but naive per-request connections to a distant database add back the latency you came to the edge to avoid, and several platforms still offer no raw TCP at all.
Limited npm packages: Many Node.js packages depend on APIs that don't exist at edge. File system access, native modules, process management: all unavailable.
CPU time limits: Cloudflare Workers: 10-30ms. CloudFront Functions: <1ms. You can't run ML inference or heavy computation.
Memory constraints: 128MB is common. No room for large datasets or caching significant data in memory.
No persistent state: Each request is isolated. You can't maintain in-memory caches between requests (though distributed stores like Workers KV help).
Working Within Limits
Pattern 1: Pre-computed decisions
Instead of computing personalization at edge, pre-compute decisions and store them in distributed KV:
User segment: "enterprise-us-returning" → Content variant ID: "v3"
Edge function does a simple lookup, not computation.
Pattern 2: Lightweight decision logic
Keep personalization rules simple:
- If geo = EU, show GDPR banner
- If cookie = "returning", show welcome back message
- If A/B test bucket = 1, show variant B
Anything more complex belongs at origin or client.
Pattern 3: Hybrid architecture
Edge handles what it's good at (geography, simple rules, A/B bucket assignment). Origin handles complex business logic. Client handles behavioral personalization.
The Debugging Nightmare
Debugging distributed systems is hard. Debugging edge functions across 200+ locations is harder.
The Challenges
Distributed logs: Your function runs in Tokyo, Frankfurt, São Paulo, and 200 other places simultaneously. Logs are scattered. Aggregating and correlating them requires specialized tooling.
Limited observability: Edge platforms provide basic logging. Detailed debugging, profiling, and tracing are limited compared to traditional server environments.
Reproducibility: "It works in development, fails in production" is common. Edge behaviors vary by location, traffic patterns, and platform state.
Third-party tooling gaps: Traditional APM tools (New Relic, Datadog) weren't built for edge. Support is improving but still immature compared to server-side monitoring3.
Best Practices
Use OpenTelemetry: Standardized instrumentation helps correlation across distributed edge locations.
Invest in observability early: Don't add monitoring after launch. Build it into your edge functions from day one.
Structured logging: JSON logs with request IDs, timestamps, and location identifiers. Make correlation possible.
Test at edge, not just locally: Local development environments don't replicate edge behavior. Test in staging edge environments before production.
Accept blind spots: You won't have the same visibility as server-side. Design for graceful degradation when debugging is impossible.
The Cost Surprise
Edge pricing looks cheap. Until scale hits.
Pricing Models
Request-based: $0.10-$0.60 per million requests (CloudFront Functions, Cloudflare Workers)
Duration-based: Lambda@Edge charges for execution time on top of invocations
Bandwidth: Data transfer between edge and origin adds up quickly
Storage: KV stores, durable objects, and edge caches have their own pricing
Real Cost at Scale
Scenario: 10M monthly pageviews, simple personalization
Static content (no edge):
- CDN bandwidth: $50-200
- Origin: minimal
- Total: ~$100-250/month
Edge personalization:
- Edge invocations: $50-100 (10M × $0.50-1.00/million)
- KV lookups: $50-100 (assuming 2 lookups per request)
- Bandwidth: $50-200
- Origin requests (cache misses): $50-100
- Total: ~$200-500/month
Not bad, right? 2-3x static cost for personalization. Acceptable.
Scenario: 100M monthly pageviews, complex personalization
Edge personalization:
- Edge invocations: $500-1,000
- KV operations: $500-2,000 (heavy usage)
- Bandwidth: $500-2,000
- Origin requests: $500-1,000
- Total: ~$2,000-6,000/month
Origin-based alternative:
- App servers: $1,500-3,000
- Database: $500-1,000
- CDN: $500-1,500
- Total: ~$2,500-5,500/month
At scale, edge isn't always cheaper. It can be comparable to or more expensive than well-architected origin solutions.
Hidden Costs
KV operation costs: Each read/write to distributed storage costs money. High-frequency lookups compound quickly.
Origin requests: Edge functions that call your origin for data still incur origin costs. Edge doesn't eliminate origin: it adds a layer.
Debugging overhead: Poor observability means more developer time troubleshooting. That's real cost.
Vendor lock-in: Proprietary APIs mean migration difficulty. Switching from Cloudflare to Vercel isn't trivial.
When Edge Personalization Actually Works
Legitimate Use Cases
Geolocation-based content: Edge knows user location. Serving region-specific content, currency, or language is a natural fit. No origin round-trip needed.
A/B testing and feature flags: Bucket assignment at edge is fast and consistent. Edge functions can set cookies and route traffic without origin involvement.
Authentication and authorization: Validating JWTs at edge blocks unauthorized requests before they reach origin. Security and performance win.
Header manipulation: Adding, removing, or modifying headers based on user signals. Simple, fast, well-suited for edge.
URL routing and redirects: Legacy URL redirects, vanity URLs, localized paths. Perfect edge use cases.
Cache key normalization: Normalizing query parameters, cookies, or headers to improve cache hit rates.
Success Patterns
Pattern: Segment assignment at edge, personalization elsewhere
Edge function assigns user to segment (sets cookie). Origin or client handles actual content personalization. Edge does what it's good at (fast, simple decisions) without trying to do everything.
Pattern: Edge + origin hybrid
Edge handles geographic personalization and A/B testing. Origin handles authenticated personalization requiring database access. Client handles real-time behavioral personalization.
Result: Each layer does what it's best at. Cache efficiency preserved. Performance optimized.
Pattern: Pre-computed edge decisions
Backend batch process computes personalization decisions hourly/daily. Stores results in edge KV. Edge function looks up pre-computed decision. Fast, simple, scalable.
When NOT to Use Edge Personalization
Red Flags
Complex business logic: >10 decision points, database lookups, ML inference. Edge can't handle it. Use origin.
Heavy data requirements: Need customer 360 data for decisions. Edge can't connect to your CDP in real-time without adding latency.
Low traffic: <1,000 requests/minute means cold starts will hurt more than edge helps. Client-side is simpler.
No distributed systems expertise: Edge debugging is hard. If your team struggles with server debugging, edge will be worse.
Simple use cases: "Hello, [name]" doesn't need edge. Client-side JavaScript is simpler and cheaper.
Tight CDP integration: Sitecore Personalize or similar requiring real-time CDP queries. The API latency negates edge benefits.
Vendor Marketing vs. Reality
What they promise:
- "Zero cold starts"
- "Unlimited scale"
- "Run anywhere globally"
- "Simple deployment"
What reality looks like:
- Cold starts vary by platform (Lambda@Edge is terrible)
- Scale costs money, a lot of money
- "Global" means 13-300 locations depending on product
- Debugging distributed systems is never simple
The Honest Assessment
Edge-side personalization works, for specific use cases, with realistic expectations.
It works when:
- Use cases match edge strengths (geo, A/B, headers)
- Traffic volume justifies cold start amortization
- Team has distributed systems experience
- Logic is simple enough for edge constraints
- Cost model makes sense at your scale
It fails when:
- Trying to replicate server-side complexity at edge
- Low traffic leads to constant cold starts
- Runtime limitations force workarounds
- Debugging becomes impossible
- Costs exceed origin alternatives
The honest truth:
- Edge isn't magic. It's a specific tool for specific problems
- Cloudflare Workers is best for pure edge workloads
- Lambda@Edge cold starts make it unsuitable for latency-sensitive personalization
- Vercel's middleware model is great for Next.js, but it's regional compute now, not a 300-location edge
- Most personalization is better handled hybrid or client-side
The Path Forward
Phase 1: Identify Edge-Appropriate Use Cases
Before writing edge code, ask:
- Does this require geographic awareness?
- Is the logic simple (< 5 decision points)?
- Can we avoid database/API calls?
- Is traffic high enough to stay warm?
- Can our team debug distributed systems?
If not all "yes," reconsider edge for this use case.
Phase 2: Start Simple
Begin with:
- Geolocation-based content selection
- A/B test bucket assignment
- Feature flag evaluation
- Header-based routing
Prove value with simple cases before attempting complex personalization.
Phase 3: Hybrid Architecture
Most successful implementations use edge for what it does well:
- Edge: Geography, A/B testing, simple rules
- Origin: Complex personalization, authenticated content
- Client: Behavioral personalization, recommendations
Each layer handles its strengths. Avoid forcing edge to do everything.
The Bottom Line
Edge computing is a powerful tool in the personalization toolkit, not a replacement for server-side or client-side approaches.
The companies succeeding with edge personalization understand its limits. They use it for geographic content, A/B testing, and simple decision-making. They combine it with origin and client-side approaches for a complete solution.
Before investing in edge personalization, ask:
- What specific use cases match edge strengths?
- Can we accept the runtime limitations?
- Do we have distributed systems expertise?
- Have we modeled costs at our traffic scale?
- Can we debug across 200+ locations?
If you can't answer these questions confidently, start simpler. Client-side personalization is easier to implement, debug, and scale. Server-side works well for SEO-critical content. Edge is powerful but not essential for most personalization needs.
The future is hybrid: edge for what it does best, combined with origin and client approaches. Not edge for everything.
References
Footnotes
-
Cloudflare (2025). "Eliminating Cold Starts 2: Shard and Conquer" ↩ ↩2
-
Vercel (2025). "Edge Middleware and Edge Functions Are Now Powered by Vercel Functions" ↩
-
Deno (2023). "The State of Edge Functions 2023" ↩