Project Name
How a Media Publisher Cut Search Costs by 80% by Moving from Algolia to Self-Hosted Typesense
![]()
The client is a digital media publisher running a high-traffic content platform that serves around 50 million reader searches every month. On-site search is central to engagement, because readers rely on it to find fresh stories, archives, and topics quickly. As the audience and content library grew, usage-based hosted search pricing grew with them. Every traffic spike and every newly indexed article pushed the monthly bill higher, and the search data and platform sat on a vendor’s infrastructure. Leadership wanted search that scaled with traffic without costs scaling at the same rate, and direct ownership of the data behind it. The migration still had to be invisible to readers: same relevance, same speed, no disruption.
- Search costs scaling with traffic and records: Usage-based SaaS pricing meant every rise in search volume and every new article added to the index increased the bill, turning audience growth into a cost problem.
- Years of relevance tuning at risk: Indexes, synonym sets, and ranking rules had been refined over time. A migration that lost them would immediately degrade the results readers relied on.
- No ownership of search data or infrastructure: Data and platform sat with a third-party vendor, limiting control over where data lived, how the stack was configured, and when it changed.
- Zero tolerance for search downtime: At around 50M monthly searches, any outage would hit engagement immediately, so a self-hosted replacement could not introduce a single point of failure.
- Keeping a fast-moving index fresh: New and updated articles publish continuously. Without reliable reindexing, readers would see stale or missing results.
- No in-house visibility into search health: Leaving a managed service meant the team would own uptime and latency, but it had no monitoring in place for a search cluster.
Ksolves treated the engagement as a like-for-like migration first and an optimization second: readers had to get the same quality of results on day one, served from infrastructure the publisher fully controlled. The team moved search to Typesense, an open-source search engine, self-hosted in the client's own AWS environment. The governing principle was predictable cost with no loss of relevance or availability.
- Self-hosted Typesense on AWS EC2: Replaced usage-billed hosted search with Typesense on the publisher's own EC2 instances, so cost is tied to provisioned infrastructure rather than search volume or record count.
- Index, synonym, and ranking rule migration: Migrated existing indexes, synonym sets, and ranking rules from Algolia into Typesense collections, preserving the relevance tuning readers were used to.
- Containerized deployment in the client's account: Packaged Typesense with Docker and deployed it inside the publisher's AWS account, giving the team full ownership of search data, configuration, and upgrade timing.
- 3-node highly available cluster: Deployed a three-node cluster using Typesense's built-in Raft-based replication, so search keeps serving even if a node fails.
- Automated reindexing pipelines: Built pipelines that push new and updated content into Typesense, keeping the index in step with publishing without manual effort.
- Prometheus and Grafana monitoring: Instrumented the cluster with Prometheus metrics and Grafana dashboards and alerts covering latency, node health, and resource usage.
Technology Stack
| Category | Technology |
|---|---|
| Search Engine | Typesense (self-hosted) |
| Infrastructure | AWS EC2 |
| Containerization | Docker |
| High Availability | 3-node cluster with Raft-based replication |
| Monitoring | Prometheus + Grafana |
- Search costs cut by 80%: Before: the hosted search bill rose with every increase in traffic and indexed records. After: self-hosted Typesense on AWS EC2 reduced search costs by 80%.
- p95 latency held under 40 ms: Before: search speed depended on a third-party SaaS the team could not tune or inspect. After: p95 latency stays under 40 ms on the self-hosted cluster.
- 100% of search data and traffic brought in-house: Before: all ~50M monthly searches, plus indexes, synonyms, and ranking rules, lived on a vendor platform. After: everything runs on infrastructure the publisher owns.
- Vendor-dependent uptime replaced by 3-node HA: Before: availability depended entirely on an external provider. After: the cluster tolerates the loss of one node without interrupting search.
A high-traffic digital publisher was paying usage-based search fees that climbed with every query and every new article, with no ownership of its search data. Ksolves migrated its search from Algolia to a self-hosted, 3-node Typesense cluster in the publisher’s own AWS account, preserving its indexes, synonyms, and ranking rules. Search costs fell by 80% while p95 latency stayed under 40 ms across roughly 50M monthly searches. The team now controls its data, configuration, and upgrade cadence, with Prometheus and Grafana providing full operational visibility. With cost decoupled from traffic, the publisher can grow its audience and archive, and extend search features, without renegotiating a vendor bill.
Is Your Hosted Search Bill Growing Faster Than Your Audience?