google_memcache_instance cost estimation
A managed Memcached cluster. Priced per node by vCPU-hour and memory GB-hour, multiplied across the node count.
A google_memcache_instance is Memorystore's managed Memcached offering, used as a simple in-memory cache in front of databases or APIs. Unlike Redis, Memcached on Memorystore is priced on the raw resources each node provides: vCPUs and memory, billed per hour, times the number of nodes.
Each node's cost has two parts: a per-vCPU-hour charge and a per-GB-of-memory-hour charge. A node configured with 2 vCPUs and 4 GB runs both meters every hour. The cluster total is that per-node cost multiplied by node_count. So a 2-node cluster of 2 vCPU / 4 GB nodes bills four vCPU-hours-worth and eight GB-hours-worth of capacity each hour.
c3x reads node_count and the node_config (cpu_count and memory_size_mb) from your Terraform and prices both meters across all nodes at 730 hours/month. There's no separate request or data-transfer charge for Memcached itself, which makes the estimate clean: it's purely provisioned capacity.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "google_memcache_instance" "cache" {
name = "api-cache"
region = "us-central1"
node_count = 2
node_config {
cpu_count = 2
memory_size_mb = 4096
}
memcache_version = "MEMCACHE_1_6_15"
}Pricing dimensions
What you actually pay for when you provision google_memcache_instance.
| Dimension | Unit | What's being charged |
|---|---|---|
| Node vCPU hours | per vCPU-hour | Per-vCPU rate, billed for cpu_count x node_count vCPUs every hour. c3x assumes 730 hours/month. $0.0466/vCPU-hour in us-central1 |
| Node memory hours | per GB-hour | Per-GB-of-memory rate, billed for (memory_size_mb / 1024) x node_count GB every hour. $0.009/GB-hour in us-central1 |
Sample C3X output
Example output from c3x estimate for the 2-node cluster above:
google_memcache_instance.cache
├─ Node vCPUs (2 x 2) 2,920 vCPU-hours $136.07
└─ Node memory (4 GB x 2) 5,840 GB-hours $52.56
OVERALL TOTAL $188.63Optimization tips
Common ways to reduce google_memcache_instance cost without changing the workload.
Size memory to the working set, not the peak
Proportional to over-provisioningMemcached cost scales linearly with provisioned memory. Cache hit-rate plateaus once the hot working set fits; provisioning beyond that wastes GB-hours. Measure hit rate before adding memory.
Fewer larger nodes vs many small ones
Operational, minor costvCPU and memory bill the same regardless of node shape, but fewer nodes reduce connection overhead and rebalancing. Consolidate unless you need the node count for availability.
Use Memcached over Redis when you only need a cache
Replica cost avoidedIf you don't need persistence, replication, or data structures, Memcached is simpler and you pay only for vCPU and memory, with no replica overhead.
FAQ
How does c3x estimate Memorystore Memcached cost?
It reads node_count and node_config (cpu_count, memory_size_mb), then prices vCPU-hours and memory-GB-hours across all nodes at 730 hours/month. There is no separate request charge.
Is Memcached cheaper than Memorystore for Redis?
Often, for pure caching. Memcached has no replica or persistence overhead, so you pay only for the vCPU and memory you provision. Redis costs more because of replication and its richer feature set.
Are there data transfer charges?
Memcached itself has no per-request or egress charge within the region. Cross-region or internet egress, if any, bills under networking, not the instance.
Does node shape (vCPU vs memory ratio) change the rate?
No. vCPU-hours and memory-GB-hours bill at fixed rates regardless of ratio. The total depends only on total provisioned vCPUs and GB across the cluster.
How do I lower the cost?
Reduce provisioned memory to match the working set and avoid over-provisioning vCPUs. Both meters scale linearly, so trimming capacity directly trims the bill.
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_memcache_instance.