Cloud Cost Engineering and Open Source FinOps
Notes from the team building C3X. Cost estimation for Terraform, the economics of cloud infrastructure, and how to ship FinOps tooling without a SaaS gate.
Cost optimization ROI: knowing which savings are worth pursuing
Not every optimization is worth the effort. Weighing the savings against the engineering time and risk, ROI, focuses effort on the high-value wins and avoids over-optimizing trivial costs. Here is how to prioritize.
CDN cache hit ratio: the number that drives your CDN bill
A CDN's cost hinges on cache hit ratio: cache hits serve from the edge cheaply, while misses hit your origin, incurring origin egress and compute. Raising the hit ratio cuts both CDN and origin cost. Here is how.
Edge computing cost: running logic close to users
Edge compute (Cloudflare Workers, Lambda@Edge, and others) runs code at CDN edge locations, priced by requests and compute time, often cheaply. It cuts origin load and latency but has constraints. Here is the cost model.
DNS cost compared: Route 53 vs Azure DNS vs Cloud DNS
Managed DNS (Route 53, Azure DNS, Cloud DNS) prices by hosted zones plus queries, all inexpensive, with health checks and traffic policies adding cost. The cheapest is usually the one native to your cloud. This compares them.
NAT gateway cost optimization: a sneaky networking bill
NAT gateways bill an hourly fee plus per-GB data processing, so high-traffic private subnets accessing the internet or AWS services rack up processing charges. VPC endpoints, consolidation, and architecture cut it. Here is how.
VPN vs Transit Gateway cost: connecting networks at scale
Site-to-site VPN bills per connection-hour plus data; Transit Gateway bills per attachment-hour plus data processing but scales to many networks cleanly. For a few connections VPN is cheaper; for many, Transit Gateway wins. Here is the tradeoff.
PrivateLink cost: private connectivity to services
PrivateLink (and Private Endpoints) provide private connectivity to services without traversing the internet, billing per endpoint-hour plus data processed. It improves security and can reduce egress, but endpoints add up. Here is the model.
Service mesh cost: the price of sidecars and control plane
A service mesh (Istio, Linkerd, and others) adds a control plane plus per-pod sidecar proxies that consume CPU and memory, so the cost is that overhead across your fleet. Lightweight meshes and sidecar-less modes cut it. Here is the model.
Global Accelerator cost: premium routing for global users
AWS Global Accelerator bills a fixed hourly fee plus a premium per-GB data transfer charge, routing user traffic over the AWS backbone for better performance. For latency-sensitive global apps it helps, but the premium adds up. Here is the model.
Cross-cloud networking cost: the price of multi-cloud connectivity
Connecting workloads across clouds means egress on both sides plus interconnect or VPN cost, so data moving between clouds is billed twice and adds latency. Minimizing cross-cloud data movement is the main lever. Here is how.
Bandwidth cost optimization: paying less to move data
Bandwidth (data transfer) cost spans egress, cross-region, cross-AZ, and CDN transfer, and it hides across many services. Compression, caching, CDNs, in-region traffic, and committed transfer pricing cut it. Here is a complete playbook.
VPC cost optimization: the networking pieces that bill
A VPC itself is free, but its components, NAT gateways, VPC endpoints, data transfer, and traffic mirroring, carry cost. Knowing which pieces bill, and optimizing them, keeps VPC networking cheap. Here is the breakdown.
Network topology cost: how architecture shapes the bill
Network topology, hub-and-spoke, mesh, flat, or segmented, determines data transfer paths and connectivity cost. A well-designed topology keeps traffic cheap and manageable; a poor one multiplies transfer and complexity. Here is how to design for cost.
CI/CD cost optimization: faster pipelines cost less
CI/CD cost is compute-minutes: runners executing builds and tests, priced per minute (hosted) or as instances (self-hosted). Caching, parallelization, and only building what changed cut both time and cost. Here is how.
GitHub Actions cost: minutes, runners, and storage
GitHub Actions bills per runner-minute (with a free allowance), with larger and specialized runners costing multipliers, plus storage for artifacts and packages. Caching, right-sized runners, and self-hosting for scale cut it. Here is the model.
GitLab CI cost: compute minutes and runner choices
GitLab CI bills compute minutes on shared runners (with a free allowance and cost factors by runner type), or you run self-managed runners on your own infrastructure. Caching, right-sized runners, and self-hosting for scale cut it. Here is the model.
Self-hosted CI runners: when they cost less than hosted
Self-hosted CI runners run on your own infrastructure, trading per-minute hosted pricing for instance cost plus operational effort. At high build volume, or with Spot and autoscaling, they cost less. Here is the tradeoff.
Container build cost: faster image builds save CI minutes
Building container images consumes CI compute, and slow builds that rebuild everything waste minutes. Layer caching, small base images, and multi-stage builds cut build time and cost. Here is how.
Artifact storage cost: build outputs add up quietly
Build artifacts, packages, and container images accumulate in storage, billed per GB, and unpruned artifacts grow the bill quietly. Retention policies, pruning, and tiering keep it flat. Here is how.
Feature flags cost: managed platforms vs self-hosted
Feature flag platforms (LaunchDarkly, Split, and others) price by seats, monthly active users, or flag evaluations; self-hosted or open-source options trade that for infrastructure. Evaluation volume and MAU drive managed cost. Here is the model.
Error tracking cost: events, retention, and sampling
Error tracking tools (Sentry and others) price by events (errors, transactions) ingested plus retention, so noisy errors and high transaction volume drive the bill. Filtering noise, sampling, and quotas cut it. Here is the model.
APM cost optimization: host-based vs usage-based pricing
Application performance monitoring (Datadog, New Relic, and others) prices by hosts, ingested data, or usage, and it is a notoriously large observability bill. Host right-sizing, data filtering, and sampling cut it. Here is how.
Log management cost compared: ingest, index, and retain
Log platforms (Datadog Logs, Splunk, Elastic, Loki, cloud-native) price by ingestion, indexing, and retention, with very different models. Ingest less, index selectively, and tier retention to cut the bill. This compares the approaches.
Distributed tracing cost: sampling is everything
Distributed tracing captures request paths across services, priced by spans or traces ingested, so high-traffic systems generate enormous volume. Intelligent sampling is the primary cost lever. Here is how.