google_ compute_ backend_ service cost estimation
A backend service is free configuration. It binds a load balancer to its backends and their health checks. The Cloud Load Balancing charge lands on the forwarding rule plus data processed.
A google_
The actual Cloud Load Balancing charge sits on the forwarding rule and on data processed, not on the backend service. A load balancer bills a small hourly rate per forwarding rule plus a per-GB inbound data-processing charge, and that is where the money is. The backend service is the routing target the forwarding rule points at through a proxy or URL map, so it is upstream of the meter, not the meter itself.
Two things a backend service enables do add cost. Turning on enable_
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "google_compute_backend_service" "app" {
name = "app-backend"
protocol = "HTTP"
port_name = "http"
timeout_sec = 30
health_checks = [google_compute_health_check.app.id]
backend {
group = google_compute_instance_group_manager.app.instance_group
balancing_mode = "UTILIZATION"
max_utilization = 0.8
}
}Pricing dimensions
What you actually pay for when you provision google_.
| Dimension | Unit | What's being charged |
|---|---|---|
| Backend service | free | The backend service configuration and its health-check attachment have no charge. $0 |
| Forwarding rule + data processed | per hour + per GB | The load balancer charge lands here: an hourly rate per forwarding rule plus per-GB inbound data processing. ~$0.025/hour per rule + $0.008-$0.012/GB |
| Cloud CDN (if enable_cdn) | per GB + per request | Enabling CDN on the backend service adds cache egress and cache lookup charges. Cache egress from ~$0.02/GB |
| Backends | per hour | The VMs or serverless services behind the backend service, which carry their own compute cost. |
Optimization tips
Common ways to reduce google_ cost without changing the workload.
Enable Cloud CDN for cacheable content
Offloads repeat traffic from originsFor static or cacheable responses, enable_
Consolidate services behind one backend service set
Routing several backends through one load balancer's URL map avoids spinning up separate load balancers, each of which adds a forwarding-rule hourly charge.
Right-size the backends, not the service
The backend service is free; its backends are not. Autoscaling the instance groups it points at scales the real compute cost to demand.
FAQ
Does a backend service cost money?
No. The backend service is free load-balancer configuration. The Cloud Load Balancing charge lands on the forwarding rule (hourly) plus per-GB data processed, and on the backends themselves.
How does a backend service add to my bill?
Through what it enables. Turning on Cloud CDN adds cache egress and lookup charges, and the VMs or services it routes to carry their own compute and egress cost. The service object is free.
Where does the load balancer charge actually appear?
On the forwarding rule. Cloud Load Balancing bills a small hourly rate per forwarding rule plus per-GB inbound data processing. The backend service, URL map, and health checks are free routing config.
Related resources
google_ compute_ forwarding_ ruleWhere the regional load balancer charge lands.
google_ compute_ health_ checkThe free health checks a backend service attaches to decide backend eligibility.
google_ compute_ instanceThe VM backends behind the service that carry the real compute cost.
More Google Cloud resources
Estimate this resource in your own Terraform
Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including google_.