Edge BFF vs Self-Hosted Proxy Server
A self-hosted proxy server gives you full control but makes you own containers, scaling, TLS, caching, and patching for code that mostly merges JSON. An edge Backend for Frontend runs the same compose, slim, and secret-injection logic on a global edge network, so requests are handled near the user with no servers to operate. Choose self-hosting when you need long-running jobs or custom binaries; choose an edge BFF when the job is fetching, merging, and trimming API responses.
Edge BFF
Declarative pipelines that fetch upstream APIs in parallel, inject vaulted secrets, slim the payload, and cache the result in edge locations close to each user.
Self-hosted proxy server
A custom service you write and deploy on a VM or container platform that forwards client requests to upstream APIs with server-side credentials.
Side-by-Side Comparison
| Dimension | Edge BFF | Self-hosted proxy server |
|---|---|---|
| Where requests run | Hundreds of edge locations, nearest to the user | One or a few regions you provision |
| Time to first endpoint | Minutes: configure steps and output mapping | Days: scaffold, containerize, deploy, add TLS |
| Secret handling | Encrypted vault, injected per request at the edge | Environment variables you must rotate and protect |
| Caching | Built-in edge cache with per-pipeline TTL | Add and operate your own cache layer |
| Scaling and cold starts | Isolates scale automatically with near-zero cold start | Autoscaling rules, warm pools, and capacity planning |
| Custom logic ceiling | Mapping, merging, and transforms; no arbitrary binaries | Anything your runtime can execute |
| Ongoing maintenance | Platform patches the runtime | You patch OS, runtime, dependencies, and certificates |
Choose Edge BFF when
- Your endpoint mostly calls two to six APIs and returns merged, trimmed JSON.
- Mobile or global users feel every extra round trip.
- You do not want to run servers for glue code.
Choose Self-hosted proxy server when
- You need long-running jobs, queues, or heavy CPU work per request.
- You must run custom binaries or libraries that edge runtimes do not support.
- Compliance requires the proxy to live inside a specific private network.
Frequently Asked Questions
Is an edge BFF just a reverse proxy?
No. A reverse proxy forwards requests mostly unchanged. An edge BFF composes several upstream calls into one response, injects credentials, reshapes JSON for a specific client, and caches the result.
Can I migrate an existing proxy server to the edge gradually?
Yes. Move one endpoint at a time and point that client route at the edge pipeline while the old server keeps handling the rest. This is the strangler fig pattern applied to glue code.
When is a self-hosted proxy the better choice?
When requests need minutes of compute, persistent connections to private databases on a closed network, or native libraries. Those workloads fit containers better than edge isolates.
Recipes That Apply This Pattern
Sources & Definitions Used in This Answer
Try the edge approach on your own APIs
Clone a recipe, add your upstream keys to the vault, and call one endpoint from your client.