Prompt
what should I use for simple request logic before origin
Latest observation
Oct 26, 2026
OpenAI APIWeb search: off
If you mean simple request routing / decision logic before reaching your origin server, the best choice depends on how much logic you need:
Good options
- CDN / edge rules: best for very simple things like redirects, header checks, bot blocking, geo-based routing.
- Examples: Cloudflare Workers, AWS Lambda@Edge, Fastly Compute, Vercel Edge Middleware
- Reverse proxy config: best if the logic is mostly path/host-based routing.
- Examples: Nginx, HAProxy, Traefik
- API gateway / load balancer rules: good for auth checks, rate limiting, request transformation, simple routing.
- Examples: Kong, AWS API Gateway, Apigee, Envoy
Rule of thumb
- Very simple, low-latency logic → use edge middleware / edge functions
- Mostly routing → use a reverse proxy
- API management / auth / rate limits → use an API gateway
- Anything complex → keep it in the app/origin unless it must happen early
If you want the simplest recommendation
For “simple request logic before origin,” I’d usually suggest: Cloudflare Workers if you want code-based logic at the edge, or Nginx if you just need routing rules.
If you tell me your exact use case (redirects, auth, rate limit, header rewrite, etc.), I can recommend the best specific tool.