How much does it cost to run a search backend?
A search backend over 20 million documents serving 5 million queries a month costs about 946 dollars on a managed cluster, or 269 dollars self-managed. Here is the breakdown and where the extra 677 dollars actually goes.
Quick answer
A search backend indexing 20 million documents (about 120 GB with replicas) and serving 5 million queries a month costs roughly 946 dollars a month on a managed OpenSearch cluster, or about 0.19 dollars per thousand queries. The cluster itself is 675 dollars of that: three r6g.large data nodes at 366 dollars, three dedicated master nodes at 237 dollars, and 600 GB of storage at 73 dollars. Running the same three data nodes yourself on EC2 costs about 269 dollars, a 60 percent saving that buys you responsibility for upgrades, snapshots, and cluster recovery.
Search clusters are priced on nodes, not on queries, which means the cost is set the day you choose a topology and barely moves afterwards. Five million queries a month or fifty million, the three data nodes cost the same. That makes search one of the easiest workloads to cost accurately and one of the easiest to overprovision.
The workload we are pricing
Assume a product catalog and document search in us-east-1 with 20 million documents averaging 2 KB, so about 40 GB of source data. Indexed with analysis, stored fields, and one replica, that is roughly 120 GB of index across the cluster. Queries run at 5 million a month, peaking at about 25 per second. Documents update at 500,000 a day, arriving through a queue and indexed in batches. There is an API tier in front of the cluster that handles query parsing, permission filtering, and result shaping.
The monthly breakdown
| Component | Specification | Monthly cost |
|---|---|---|
| Data nodes | 3 x r6g.large.search at 0.167/hr | $365.73 |
| Dedicated master nodes | 3 x m6g.large.search at 0.108/hr | $236.52 |
| Query API tier | 4 Fargate tasks at 1 vCPU / 2 GB | $144.16 |
| Cluster storage | 600 GB gp3 at 0.122/GB | $73.20 |
| Logs and metrics | 100 GB ingest plus retention | $53.00 |
| Load balancer | ALB plus about 5 LCU | $45.63 |
| Source of truth table | DynamoDB, 20M documents, 40 GB | $10.00 |
| Snapshots | 300 GB in object storage | $6.90 |
| Index queue | SQS, 15M messages | $6.00 |
| Indexing workers | 300K batched Lambda invocations | $2.56 |
| Raw document archive | 100 GB S3 Standard | $2.30 |
| Total | $946.00 |
Indexing is almost free, serving is not
Half a million document updates a day, batched fifty to an invocation, costs 2.56 dollars of compute plus 6 dollars of queue charges. Meanwhile the cluster that holds the result costs 675 dollars. The asymmetry is the defining feature of search economics: you pay to keep an index resident in memory and available, not to build it.
This has a practical consequence. Reindexing, which teams often avoid because it feels expensive, costs almost nothing in compute. A full rebuild of 20 million documents is maybe 400,000 batched writes, a few dollars. The constraint on reindexing is cluster headroom during the rebuild, not money. Sizing the cluster with enough spare capacity to run a blue-green reindex is a far better use of node budget than avoiding reindexing altogether.
Managed against self-managed
| Line | Managed service | Self-managed on EC2 |
|---|---|---|
| 3 data nodes | $365.73 (r6g.large.search) | $220.75 (r6g.large) |
| 3 master nodes | $236.52 | $0 (co-located or 3 x t4g.small at $36) |
| 600 GB storage | $73.20 at 0.122/GB | $48.00 at 0.080/GB |
| Snapshots | Included | $6.90 |
| Upgrades, patching, recovery | Included | Your time |
| Cluster subtotal | $675.45 | $268.75 to $311 |
The managed premium is about 60 percent, and most of it is the dedicated master nodes, which the managed service strongly recommends and which a self-managed three-node cluster typically co-locates. Whether 380 dollars a month is a fair price for not doing version upgrades, not building snapshot automation, and not being paged when a node fails depends on how many clusters you run and how much search matters to the product. The general shape of the decision is covered inmanaged versus self-hosted search cost.
Right-sizing the cluster
Three r6g.large nodes give 48 GB of total RAM for a 120 GB index. The rule of thumb is that you want the frequently-accessed portion of the index in the filesystem cache, which for a catalog with a hot subset is usually fine. If queries are slow and CPU is low, the cluster is memory-starved and needs bigger nodes, not more of them.
| Topology | Total RAM | Monthly node cost | Suits |
|---|---|---|---|
| 2 x t3.medium.search | 8 GB | $52.56 | Under 2M small documents |
| 3 x r6g.large.search | 48 GB | $365.73 | 20M documents, 25 qps |
| 3 x r6g.xlarge.search | 96 GB | $731.46 | 50M documents or heavy aggregations |
| 6 x r6g.large.search | 96 GB | $731.46 | Same RAM, higher query concurrency |
The last two rows cost the same and solve different problems. Scaling up helps when the index does not fit in memory; scaling out helps when queries queue behind each other. Diagnosing which one you have before buying either is worth more than the price difference. Further levers are inOpenSearch cost optimization.
Unit economics
At 946 dollars for 5 million queries, search costs 0.19 dollars per thousand queries. Because the cluster cost is fixed, that unit number falls fast with volume: at 25 million queries a month on the same cluster it is 0.038 dollars per thousand. The implication is that adding search surfaces to a product is nearly free once the cluster exists, while the first search feature carries the whole 675 dollars. Price the topology from Terraform against the resource catalog before committing, because node count and instance family are the only decisions that really matter.
FAQ
How much does it cost to run a search backend?
About 946 dollars a month on a managed OpenSearch cluster for 20 million documents (roughly 120 GB of index with replicas) serving 5 million queries a month, including three data nodes, three dedicated master nodes, 600 GB of storage, an API tier, an indexing queue, snapshots, and logging. That is about 0.19 dollars per thousand queries.
Is managed search worth the premium over self-hosting?
The managed premium here is about 60 percent: 675 dollars for the cluster against roughly 269 dollars running the same three data nodes on EC2. Most of the gap is dedicated master nodes, which managed services recommend and self-managed three-node clusters usually co-locate. The 380 dollar difference buys version upgrades, snapshot automation, and not being paged when a node fails.
Why is search indexing so much cheaper than search serving?
Because you pay to keep an index resident and available, not to build it. Half a million document updates a day, batched fifty per invocation, costs about 2.56 dollars of compute plus 6 dollars of queue charges, while the cluster holding the result costs 675 dollars. A practical consequence is that reindexing is nearly free in compute terms; the real constraint is cluster headroom during the rebuild.
How do I size a search cluster?
Match RAM to the hot portion of the index. Three r6g.large nodes give 48 GB for a 120 GB index, which works when a subset is frequently accessed. If queries are slow while CPU stays low, the cluster is memory-starved and needs bigger nodes; if queries queue behind each other with healthy memory, it needs more nodes. Both fixes cost the same, so diagnosing correctly matters more than the price.
What is a realistic cost per search query?
About 0.19 dollars per thousand queries at 5 million queries a month on this cluster. Because cluster cost is fixed regardless of query volume, that unit cost falls fast: 25 million queries on the same hardware is 0.038 dollars per thousand. The first search feature carries the full 675 dollar cluster cost, and every additional search surface after that is nearly free.
How does C3X help price a search backend?
C3X reads your Terraform and prices the cluster topology, node instance types, storage volumes, API tier, and queues against a live catalog. Since search cost is set almost entirely by node count and instance family at provisioning time, seeing the monthly figure for a topology change in the pull request is exactly where the decision should be made.
What to do next
Choose your cluster topology with the price in front of you. C3X reads your Terraform and prices your resources against a live catalog. Start with the quickstart.
Share this post
Try C3X on your own Terraform
Free and open source. No API key required. One command to install, one command to estimate.