Use VPC Services in a real application path
VPC service bindings that reach a private service through a Cloudflare VPC connectivity service.
A compact VPC Services recipe with config and worker usage in one application path.
Use this as the copyable starter before threading the feature into a larger application.
- Config focus
- bindings.vpcServices
- Runtime shape
- a VPC service
- Best use
- reaching a private upstream service over a Cloudflare VPC connectivity service
Start by wiring the binding clearly in config
Smallest VPC service config
Build the application flow around the binding
Treat this as the app-level VPC Services path: the route, event handler, or service module receives a real request and uses the binding to do useful work.
Keep product limits, remote ownership, and fallback behavior visible in the code around the binding instead of hiding everything behind a vague utility too early.
- Keep the first example short enough to paste into a new Worker.
- Cloudflare owns the VPC connectivity service and the private network path; there is no local simulation because Miniflare only proxies to the remote service.
Call a private service over VPC
Keep production boundaries visible
- Config focus: bindings.vpcServices.
- Runtime shape: a VPC service .
- Best use: reaching a private upstream service over a Cloudflare VPC connectivity service.
Thread this into the next recipe
Once this smallest path works, add routing, generated types, and feature-specific abstraction in that order.
Previous
Testing VPC Services
Test VPC Services by choosing the local harness that matches the product boundary instead of reaching for Cloudflare by default.
Next
VPC Networks
Add the VPC Networks config, call a VPC network from worker code, and start with the local test path Devflare supports.