[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-02。"],[],[],null,["# Compare Direct VPC egress and VPC connectors\n\nThis page is for networking specialists who want to compare the following methods for sending egress (outbound) traffic from a Cloud Run service or job to a VPC network:\n\n\u003cbr /\u003e\n\n- [Direct VPC egress](/run/docs/configuring/vpc-direct-vpc) (recommended)\n- [Serverless VPC Access connectors](/run/docs/configuring/vpc-connectors)\n\nBoth of these methods allow access to Compute Engine VM instances,\nMemorystore instances, and any other resources with an internal IP\naddress.\n\nInbound and outbound requests\n-----------------------------\n\nWhen using Direct VPC egress or Serverless VPC Access connectors,\noutbound connections initiated by Cloud Run services and jobs\nroute directly to and from their destination.\n\nInbound requests sent from your VPC network to Cloud Run\nroute through a custom load balancer, not through Direct VPC egress or\nServerless VPC Access connectors.\n\nTo learn more about sending requests from your VPC\nnetwork to Cloud Run, see\n[Receive requests from VPC networks](/run/docs/securing/private-networking#from-vpc).\n\nDirect VPC egress (recommended)\n-------------------------------\n\nDirect VPC egress brings enhanced infrastructure and simpler VPC\negress configuration to Cloud Run, including the following\nadvantages:\n\n- **Setup**: Cloud Run services and jobs can send traffic to a VPC network without the overhead of managing a Serverless VPC Access connector.\n- **Cost**: You only pay for network traffic charges, which scale to zero just like the service itself.\n- **Security**: You can use network tags directly on service revisions for more granular network security.\n- **Performance**: Lower latency, higher throughput.\n\nServerless VPC Access connectors\n--------------------------------\n\nServerless VPC Access connectors also let you send requests to\nyour VPC network and receive the corresponding responses without\nusing the public internet. Setup requires additional maintenance and cost with\nlower performance than Direct VPC egress offers.\n\nSee the [comparison table](#comparison-table) for details.\n\nComparison table\n----------------\n\nPricing\n-------\n\nFor pricing information, see [Cloud Run pricing](/run/pricing).\n\nWith Serverless VPC Access connectors, you pay for two types of\ncharges: Compute (billed as Compute Engine VMs) and network egress (billed as\ntraffic from VMs). With Direct VPC egress, you pay only for network egress (at\nthe same rate as connectors). You do not pay any compute charges.\n\nIf you use Serverless VPC Access connectors, you can view your\nassociated costs as follows:\n\n1. Go to the [Cloud Billing Reports page](https://console.cloud.google.com/billing/reports) in the Google Cloud console.\n2. If prompted, select the billing account associated with your Google Cloud project.\n3. In the **Filters** panel, under **Labels** , [add a label filter](/billing/docs/how-to/reports#filters) with the key `serverless-vpc-access`.\n4. In the **Value** field, select the names of the connectors that you want to filter for.\n\nNext steps\n----------\n\n- Learn how to [configure your service](/run/docs/configuring/vpc-direct-vpc#direct-vpc-service) with Direct VPC egress.\n- Learn how to [configure your job](/run/docs/configuring/vpc-direct-vpc#direct-vpc-job) with Direct VPC egress.\n- See information about [Direct VPC egress with a Shared VPC network](/run/docs/configuring/connecting-shared-vpc).\n- Learn how to [configure your service](/run/docs/configuring/vpc-connectors#configuring-service) with Serverless VPC Access connectors.\n- Learn how to [configure your job](/run/docs/configuring/vpc-connectors#configuring-job) with Serverless VPC Access connectors."]]