0

On GCloud, ingress traffic is free whereas egress is charged.

Is this egress charging based on a per-packet basis (purely OSI layer 3), or per-connection?

For example, if an outside server opens a TCP connection to my VM in gcloud, is:

  1. all traffic created by that connection counted as ingress, or
  2. all traffic created by that connection counted as egress, or
  3. each packet that is destined to my VM counted as ingress, and each packet that is destined to the outside server counted as egress? i.e., it does NOT matter which side initiates the conversation.

Thank you.

  • 1
    Both ingress data and egress data are measured. One connection is both ingress and egress. The initiator does not matter except when Google blocks traffic (Cloud Armor, VPC firewalls), and then you are not charged. Note if you block traffic with an internal OS firewall you are charged for that traffic. – John Hanley Jul 13 '21 at 18:21
  • Thank you, and thanks for the remark about the OS firewall - I didn't realize that one. – João Pinheiro Jul 14 '21 at 13:39

1 Answers1

0

The ingress traffic (received by your VM) is free for that VM but is charged for the origin VM if it belongs to a GCP project. Thus, the egress traffic is charged to the origin instance according to the volume generated in Gb. There are different prices depending on the destination of that egress traffic.

Let me give an example and just to mention some numbers (not a quotation), it the egress goes to:

  1. the same zone than the origin VM, it is free.
  2. a different zone but the same region than the origin VM, 0.01 per Gb.
  3. a region in a different continent than the origin VM, 0.05 per Gb.

The pricing model of Google considers several factors and very often it depends of the Google product that you are using. For a more clear idea, you can use the Google Cloud Pricing Calculator.