Direct VPC egress vs Serverless VPC Access for Cloud Run: our default
We default to Direct VPC egress for Cloud Run because it is the cleaner networking shape: fewer moving parts, no connector resource, and costs that scale with the service instead of beside it.
Use Direct VPC egress for new Cloud Run services and jobs unless a documented limitation requires a Serverless VPC Access connector.
Google now recommends the direct path, and the operational reason is stronger than the product endorsement: the workload attaches to a network and subnet without another fleet-shaped resource to size, patch into diagrams, and pay for while idle.
The connector remains a compatibility option. It isn’t the neutral default anymore.
What Direct VPC egress removes
A Serverless VPC Access connector has its own subnet or address range, machine configuration, scaling behavior, throughput, IAM, monitoring, and cost. Those concerns may be manageable, but they exist beside the Cloud Run workload rather than as part of it.
Direct VPC egress follows the service or job lifecycle. Network cost can scale to zero with the workload. Revision- or execution-level network tags can identify egress traffic in firewall rules. The deployed resource names the VPC, subnet, and egress mode directly.
That gives an operator a shorter path from “this revision can’t reach Postgres” to the settings and firewall policy that own the traffic.
The subnet becomes runtime capacity
Direct VPC egress allocates addresses from the selected subnet. Address planning therefore affects whether new service instances, job tasks, or overlapping revisions can start.
Size for more than steady-state instances. Include deployment overlap, jobs sharing the subnet, delayed address release, and other Cloud Run resources using the range. Monitor free addresses and treat exhaustion as a scaling failure, not an obscure network event discovered during a rollout.
Use a dedicated subnet when it creates a useful ownership or firewall boundary. Don’t create one per service by reflex. Address fragmentation is still complexity.
Choose the egress mode explicitly
private-ranges-only sends private destinations through the VPC while public traffic uses Cloud Run’s normal path. all-traffic routes all outbound traffic through the VPC and makes NAT, firewall, inspection, and external reachability part of the service contract.
Use all-traffic only when policy or routing requires it. It expands the failure surface and can add Cloud NAT or other infrastructure that the simpler mode avoids.
Document which destinations depend on the VPC. Changing a service from private-only to all-traffic changes more than one deployment flag.
Design for the direct path’s limits
Direct VPC egress has per-instance throughput limits, quotas on configured instances, and possible connection resets during networking maintenance. Clients should reconnect with bounded backoff and database pools should validate stale connections.
Services and jobs use Direct VPC for egress, not direct ingress. Private callers still reach a Cloud Run service through Cloud Run’s ingress model, Private Google Access, Private Service Connect, or an internal Application Load Balancer. Worker pools have a different direct-ingress capability.
These distinctions belong in the design. “Attached to the VPC” doesn’t mean every packet enters and leaves through one symmetric interface.
When a connector still fits
Use Serverless VPC Access when Direct VPC egress is unavailable for the required product, region, organization constraint, or network shape, or when an existing connector provides a deliberate shared boundary that is expensive to migrate without operational benefit.
Compare actual limitations rather than inherited habit. A connector’s known throughput and address model may already fit an estate that operates it well. “This Terraform module already creates one” is merely archaeology.
When migrating, test startup, DNS, firewall policy, database reconnects, subnet capacity, and rollout overlap under production-like scale. Removing a connector simplifies the steady state, but the network path still deserves a controlled change.
Apply the default
Direct VPC egress keeps Cloud Run networking attached to the resource that creates the traffic. Use it by default, size the subnet as runtime capacity, and make the egress mode part of the service contract.
Break the default for a concrete limitation or a better-owned existing boundary. A connector should solve a problem that still exists, not survive because nobody reopened the decision.
More in this domain: Infrastructure
Browse allHow we decide between Cloud SQL connectors, Auth Proxy, and private IP
Cloud SQL connectors, the Auth Proxy, and private IP are not interchangeable secure connection options. They change identity, routing, deployment shape, and how much network plumbing the team actually owns.
Safe scaling defaults for Cloud Run + Postgres
Cloud Run autoscaling is not a database strategy. Safe defaults keep the application from scaling itself into a Postgres incident before the team understands the workload.
IAM DB auth for Cloud SQL: when it simplifies security and when it complicates delivery
IAM DB auth can reduce password sprawl and make revocation cleaner, but it also turns database access into an identity operating model that depends on disciplined service-account boundaries.
Cloud Run request timeouts don't kill your code (so your architecture has to)
A Cloud Run request timeout ends the request, not necessarily the work. If the operation can outlive its caller, the system needs explicit job semantics instead of hope.
Cloud Run scaling from zero is a feature until it isn't
Scale to zero is a good default for request-driven services, until startup delay, warm-capacity needs, or instance caps turn it into user-visible reliability behavior instead of a pricing feature.
Related patterns
"Internal-only" Cloud Run isn't just a checkbox
Making a Cloud Run service private is not one toggle. It is a decision about ingress, routing, caller path, and IAM working together as one access model.
GKE Autopilot as the escape hatch from Cloud Run
When Cloud Run stops fitting, the next move is usually GKE Autopilot: more Kubernetes-shaped control without immediately taking on the full burden of Standard clusters.
Why we default to Cloud Run for SME internal platforms
For SME internal platforms, Cloud Run is our default because it covers a large share of useful workload shapes without forcing teams to own cluster operations before they have earned that surface area.
When repeated Pulumi code earns abstraction and when it doesn't
We don't abstract repeated Pulumi code just because it shows up more than once. We do it when the shared shape is real, the behavior is stable enough to deserve a boundary, and the result is easier to read than the duplication it replaces.