FastEdge workers aren't limited to just responding to incoming requests — they can also make outbound network requests to external services. This opens up a world of possibilities: aggregating data from multiple APIs, proxying requests to upstream services, fetching remote content for caching, and more.
This post covers WebSocket Proxying at the Edge — a fundamental pattern for any edge application that needs to communicate with external services.
How It Works
Proxy and manage WebSocket connections at the edge — terminate WebSocket upgrades, authenticate before upgrading, and route to the right backend.
The FastEdge Rust SDK provides two approaches for making outbound requests:
- Synchronous (fastedge::http_client) — simple, blocking API that works within the standard Request/Response handler model. Best for straightforward fetch-and-return scenarios.
- Asynchronous (proxy-wasm dispatch) — uses the proxy-wasm ABI to pause request processing, make an HTTP call, and resume. Best for intercepting and augmenting client requests with external data.
Approach 1: Synchronous HTTP Client
The simplest approach — build a Request, send it, and get a Response back:
Approach 2: Async Proxy-Wasm Dispatch
For more advanced scenarios where you need to intercept a client request and augment it with external data:
Common Use Cases
- API aggregation — fetch data from multiple upstream APIs and combine into a single response.
- Authentication — validate tokens against an external auth service before allowing access.
- Content caching — fetch remote content on first request, cache at the edge for subsequent requests.
- Proxying — act as a reverse proxy with additional processing such as header injection and body transformation.
- Webhook forwarding — receive webhooks at the edge and fan them out to multiple downstream services.
Error Handling and Timeouts
Outbound HTTP calls are subject to network conditions. Always handle failures gracefully:
Related articles
Subscribe to our newsletter
Get the latest industry trends, exclusive insights, and Gcore updates delivered straight to your inbox.










