I have observed a surprising charge for network egress from Google Cloud Functions, and I'm trying to understand why it's happening and how to avoid it.
Stackdriver monitoring suggests that the problematic function is my ingest function, which reads files from a GCS bucket, processes them and inserts rows into a Cloud SQL instance. See the correlation here between network egress from the cloud function and received bytes for the SQL instance.
The function and the cloud SQL instance are both in us-central1 (though different zones within that region). The function connects to the SQL instance via the provided unix socket. The SQL instance does have a public IP address.
Based on the charges so far, I appear to be paying $0.1 per GiB, which looks like general Internet egress prices.
My only theory right now is that because of the public IP I am being charged public internet egress prices for the traffic to the SQL instance. Is this plausible? Is there some other reason for the charge? If this is true I assume the charge will go away if I disable the public IP for the SQL instance?
