Cloudflare Workers for CMS routing

has anyone used Cloudflare Workers as a routing layer in front of a CMS? Thinking about using it to handle A/B testing, geolocation-based content serving, and edge caching without touching the origin server.

The worker-based approach seems cleaner than doing this at the application level but I am worried about debugging complexity.

We use Workers for exactly this. Geolocation-based routing and edge-side A/B testing. The performance gains are real - decisions happen at the edge in under 1ms instead of hitting your origin.

Debugging is the main pain point. Worker logs are minimal and the local development tooling (wrangler) does not perfectly replicate the production environment. Add comprehensive logging to your workers from day one.

Workers are great for this pattern. We use them as a reverse proxy that handles routing between different backends - blog on WordPress, docs on GitBook, app on Next.js, all under one domain.

The KV store is useful for configuration and feature flags without redeploying the worker.