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_compute_backend_service is the part of a Cloud Load Balancer that groups the backends (managed instance groups, network endpoint groups, or buckets), sets the balancing mode, session affinity, timeouts, and Cloud CDN toggle, and attaches health checks. As a piece of load-balancer configuration, the backend service itself is free. You are not billed for having one, or for the number of backends it references.
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_cdn activates Cloud CDN, which bills for cache egress and cache lookups. And the backends themselves, the VMs in the instance groups or the Cloud Run services behind a serverless NEG, carry their own compute cost and generate egress. c3x prices the forwarding rule, data processed, Cloud CDN if enabled, and the backends, and treats the backend service as the free wiring it is.
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_compute_backend_service.
| 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_compute_backend_service cost without changing the workload.
Enable Cloud CDN for cacheable content
Offloads repeat traffic from originsFor static or cacheable responses, enable_cdn serves from cache and cuts backend egress and origin load. It adds cache egress cost but is usually cheaper than serving every byte from the backends.
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.
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_compute_backend_service.