Google CloudCloud Load BalancingNetworking

google_compute_forwarding_rule cost estimation

A regional forwarding rule is where the Cloud Load Balancing charge lands. It bills an hourly rate per rule plus per-GB data processed, on top of the backends behind it.

A google_compute_forwarding_rule is the entry point of a regional load balancer. It binds an IP address, protocol, and port range to a target: a regional backend service, a target pool, or a target proxy. Unlike the backend service, URL map, and health checks, which are free routing config, the forwarding rule is where Cloud Load Balancing actually bills.

The charge has two parts. First, an hourly rate for each forwarding rule that exists, prorated to the second, whether or not traffic flows. Second, a per-GB charge on inbound data processed by the load balancer. On the network passthrough load balancer the model differs slightly, but the principle holds: the forwarding rule, not the backend service, is the billed object for the load balancer layer. Internal forwarding rules for internal load balancers are billed similarly.

Beyond the load balancer charge, the backends carry their own cost, the VMs or services behind the rule, plus the egress they generate. A static external IP reserved for the rule is free while in use by a forwarding rule but billable if reserved and unused. c3x prices the forwarding rule's hourly and data-processing charges and the backends behind it, and treats the proxy, URL map, and health checks as the free routing config they are.

Terraform example

A minimal but realistic configuration that C3X can estimate.

resource "google_compute_forwarding_rule" "app" {
  name                  = "app-fr"
  region                = "us-central1"
  load_balancing_scheme = "EXTERNAL_MANAGED"
  port_range            = "80"
  target                = google_compute_target_http_proxy.app.id
  ip_address            = google_compute_address.app.address
}

Pricing dimensions

What you actually pay for when you provision google_compute_forwarding_rule.

DimensionUnitWhat's being charged
Forwarding rule (hourly)per hourAn hourly charge for each forwarding rule that exists, prorated to the second, regardless of traffic.
~$0.025/hour per rule
Data processedper GBPer-GB charge on inbound data the load balancer processes through the rule.
~$0.008-$0.012/GB
Backendsper hourThe VMs or services behind the rule, which carry their own compute cost and generate egress.

Optimization tips

Common ways to reduce google_compute_forwarding_rule cost without changing the workload.

Minimize the number of forwarding rules

One hourly charge instead of many

Each rule adds an hourly charge. Serving multiple ports or paths through one rule and a URL map avoids paying for several rules where one suffices.

Do not leave orphaned rules running

A forwarding rule bills hourly whether or not it serves traffic. Deleting rules for retired services stops a charge that would otherwise run indefinitely.

Watch data-processing on high-volume traffic

The per-GB data-processing charge scales with throughput. For very high volume, Cloud CDN on the backend service can offload cacheable bytes and reduce processed data.

FAQ

Does a forwarding rule cost money?

Yes. The forwarding rule is where the Cloud Load Balancing charge lands: an hourly rate per rule plus a per-GB data-processing charge. The backend service, URL map, and health checks are free config.

Am I charged for a forwarding rule with no traffic?

Yes, for the hourly component. Each forwarding rule bills per second it exists regardless of traffic. The per-GB data-processing charge only applies when traffic flows.

How do I estimate the cost of a regional load balancer?

Price the forwarding rule's hourly charge plus expected data processed per GB, then add the backends behind it. c3x does this and treats the proxy, URL map, and health checks as free.

Related 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_compute_forwarding_rule.