cost optimization
798 articles on cost optimization — what drives the cost, how it is priced, and where the savings actually are.
Azure AI Search cost: you pay for provisioned search units
Azure AI Search (formerly Cognitive Search) bills by tier and search units, provisioned by the hour regardless of query volume. Replicas and partitions multiply the cost. Here is how units price and how to size them for cost and performance.
AWS DocumentDB cost: instance hours, storage, and I/O add up
DocumentDB bills like Aurora: instance hours per node, $0.10 per GB-month of storage, and $0.20 per million I/O requests. On a busy cluster the I/O line often rivals compute. Here is the full breakdown and where to cut.
AWS Neptune cost: provisioned instances vs Serverless, plus I/O
Neptune charges per instance hour (or per NCU on Serverless), $0.10 per GB-month of storage, and $0.20 per million I/O. Serverless scales to your load; provisioned is cheaper when load is steady. Here is how to choose and control the bill.
AWS Glue cost optimization: DPU hours, crawlers, and the catalog
Glue bills about $0.44 per DPU-hour for jobs and crawlers, with a minimum billing per run, plus Data Catalog storage and request fees. Fewer, right-sized DPUs and less frequent crawling are the main levers. Here is the breakdown.
AWS EMR cost optimization: the surcharge, Spot, and Serverless
EMR adds a per-instance surcharge on top of EC2, so the cluster costs more than the instances alone. Spot for task nodes, right-sized core nodes, and EMR Serverless for bursty jobs are the main levers. Here is how to cut it.
AWS Athena cost optimization: you pay per terabyte scanned
Athena charges $5 per TB of data scanned, so cost is decided by how much data each query reads, not how often you query. Partitioning, columnar formats, and compression cut scans by an order of magnitude. Here is how.
AWS Kinesis Data Firehose cost: per GB ingested, plus conversions
Firehose charges about $0.029 per GB ingested (first 500 TB/month), with extra for format conversion and VPC delivery. Cost tracks data volume, so batching and compression before ingest are the main levers. Here is the breakdown.
AWS Elastic Beanstalk cost: the service is free, the resources are not
Elastic Beanstalk adds no charge of its own. You pay for the EC2, load balancer, RDS, and storage it provisions. That means every EC2 cost lever applies, and the environment type quietly decides the bill. Here is what to watch.
AWS App Runner cost: active vs provisioned, and the idle charge
App Runner bills active compute (vCPU and memory) while serving requests and a lower provisioned charge for memory when idle. That idle floor matters for low-traffic services. Here is how the two rates work and when App Runner is worth it.
AWS Lightsail vs EC2 cost: fixed bundles vs pay-as-you-go
Lightsail sells fixed monthly bundles that include an instance, storage, and transfer allowance, which is predictable and often cheaper for small workloads. EC2 is pay-as-you-go and scales further. Here is when each wins.
AWS Amplify Hosting cost: build minutes, hosting, and SSR compute
Amplify Hosting bills build minutes, stored artifacts, data served, and server-side rendering compute. For a static site it is cheap; SSR and heavy traffic are where cost grows. Here is the breakdown and where to cut.
AWS ECR cost explained: storage is cheap, data transfer is the bill
Elastic Container Registry charges $0.10 per GB-month of image storage, trivial for most teams. The real cost is data transfer: cross-region and internet pulls add up, while pulls to ECS or EKS in the same region are free. Here is the full breakdown.
AWS Route 53 cost explained: hosted zones, queries, and health checks
Route 53 bills $0.50 per hosted zone per month plus $0.40 per million standard queries, and alias queries to AWS resources are free. Latency and geo routing cost more per query, and health checks add up. Here is where the money goes.
AWS KMS cost explained: $1 per key, then it is all API requests
KMS charges $1 per month per customer-managed key and $0.03 per 10,000 API requests. AWS-managed keys are free to hold but you still pay for requests. On a busy service, request volume, not key count, is the bill. Here is how to control it.
VPC endpoint vs NAT gateway cost: when the endpoint is free money
Gateway endpoints for S3 and DynamoDB are free and remove that traffic from your NAT gateway entirely. Interface endpoints cost per hour per AZ plus per GB, which can still beat NAT on high-volume paths. Here is how to choose.
AWS CloudFront cost explained: egress tiers, requests, and free origins
CloudFront has no fixed fee, you pay for data transfer out to viewers (tiered by region and volume) and per-request charges. Transfer from AWS origins to CloudFront is free, which is why a CDN often lowers your total bill. Here is the breakdown.
P95 latency cost optimization: cutting spend without missing the tail
Average latency hides the tail that users feel and SLOs measure. Optimizing cost against p95, not the mean, is what keeps a cheaper configuration from quietly breaking. Here is how to reason about the p95-versus-cost frontier.
Caching to reduce cloud cost: deflect the work you are paying for
Every cache hit is a database query, a Lambda invocation, or an origin fetch you did not pay for. Caching is one of the few levers that cuts cost and improves latency at once. Here is where to add it and how the math works.
Kubernetes requests and limits: how they set your cluster cost
Requests, not usage, decide how many nodes you pay for, the scheduler packs pods by requests. Set them too high and you buy idle nodes; too low and you risk throttling and OOM kills. Here is how to size them for cost and stability.
Rightsizing without hurting performance: the safe way to cut cost
Naive rightsizing trims CPU and memory until latency spikes and you roll it back. The safe method holds a performance budget (p95, error rate, headroom) while cutting cost. Here's the method and the traps.
Autoscaling cost vs performance: tuning the knobs that matter
Autoscaling trades spend for headroom. Target utilization, min/max, and cooldowns decide whether you overpay for idle capacity or miss your latency target under load. Here's how each knob moves cost and p95.
API Gateway REST vs HTTP API cost: when the cheaper one costs more
HTTP APIs are $1.00 per million requests versus $3.50 for REST, about 70% cheaper. But REST's caching, usage plans, and request validation can make the 'expensive' option the cheaper system. Here's the real comparison.
AWS Config cost explained: you're billed per change, not per resource
AWS Config bills ~$0.003 per configuration item (recorded on every resource change) plus rule evaluations. The bill is churn × recording scope. Here's how to scope recording so Config stays cheap.
Reserved vs on-demand: a decision framework, not a guess
Commit when utilization clears the break-even (~60-70% for a 1-year term). Here's how to calculate it, when to ladder 1- vs 3-year, how to avoid stranding, and where Spot fits.