Skip to main content

Gcloud Network Basic

Ingress vs Egress

What is Egress in Cloud ?

In cloud-based systems, egress traffic involves data transmission from a controlled, internal network space—such as a data center or cloud infrastructure—to the wider internet. This movement requires careful handling, particularly through.

What is Ingress in Cloud ?

In cloud environments, ingress involves unsolicited external traffic attempting to access the private network. This can include external data packets and requests that are not responses to internal actions. Firewalls are essential in these scenarios, configured to block or scrutinize incoming traffic unless specific security policies and configurations are in place to permit certain types of ingress. See the picture below for reference.

GCP Egress Charges Summary Table

Source → DestinationEgress Charged?Notes
VM → VM (same zone, same VPC)❌ NoUses internal network
VM → VM (different zone, same region, same VPC)✅ YesInter-zone egress (about $0.01/GB)
VM → VM (different region, same VPC)✅ YesCross-region egress (~$0.12/GB)
VM → Internet✅ YesStandard internet egress (~$0.12/GB)
VM → Cloud Storage (GCS, same region)✅ YesEven same region incurs egress (~$0.01/GB)
VM → Cloud Storage (GCS, different region)✅ YesCross-region egress
VM → Firebase Storage✅ YesBacked by GCS, same rules apply
VM → Filestore (same zone)❌ NoInternal to zone, no egress
VM → Filestore (different zone)✅ YesInter-zone egress
VM → Load Balancer (internal)❌ NoIf backend and client are in same region and VPC
VM → Load Balancer (external)✅ YesCharges apply if backend is accessed from external client
VM → Other VPC (same region) via VPC Peering✅ Yes~0.01/GB egress
VM → Other VPC (different region) via VPC Peering✅ YesHigher cross-region egress rate
VM → Google API (e.g., Cloud Functions, AI API)✅ YesGFE counts as egress unless using Private Google Access
VM → Cloud SQL (same region, same VPC, private IP)❌ NoInternal IP connection
VM → Cloud SQL (public IP or cross-region)✅ YesPublic IP or cross-region counts as egress

Practice

Create and deploy 2 services below

alt text

  1. Main Service : Public
  2. Private Service : Private
  3. CloudBuild will connect with github repositories and trigger build for both main(public) and private service

Main Service connects with:

  • Private Service
  • CloudSQL

User can access Main Service through IAM configuration ( allow all users )