unsubbed.co

Sonic

Sonic is a self-hosted databases & data tools tool that provides schema-less search backend using minimal RAM.

Schema-less search indexing, honestly reviewed. Written for teams tired of running Elasticsearch on servers that need 8GB of RAM just to breathe.

TL;DR

  • What it is: A fast, lightweight search backend written in Rust. It ingests text and returns object identifiers — think of it as a word index that points to records in your actual database, not a document store [1][README].
  • Who it’s for: Backend developers who need to add full-text search to their app without deploying the Elasticsearch stack. Not a plug-and-play product — this is a library/service you integrate, not a UI you open [README].
  • Cost savings: Elasticsearch requires 4–8GB RAM minimum for any real workload; a managed Elastic Cloud cluster starts at $95/mo. Sonic runs on ~30MB of RAM and deploys on the same $5/mo VPS you’re already running [1][README].
  • Key strength: Genuinely tiny footprint. Real production validation — Crisp uses Sonic to index half a billion objects on a $5/mo server [1]. Microsecond query response times under load.
  • Key weakness: It’s an identifier index, not a document store. You still need a primary database. No built-in HTTP API, no admin UI, no clustering. The project appears to be in maintenance mode since late 2023 [README]. Most non-technical founders should not be setting this up themselves.

What is Sonic

Sonic is a search index server written in Rust, created by Valerian Saliou — the founder of Crisp, a customer support SaaS platform [1]. The core design decision that makes it different from Elasticsearch, Solr, or Typesense: Sonic doesn’t store your documents. It stores only words and the identifiers that those words map to.

The practical flow: you push text and an ID into Sonic during indexing (say, “the quick brown fox jumped” → article:42). When a user searches for “brown fox,” Sonic returns article:42. Your application then fetches the actual article from whatever database holds it — PostgreSQL, MongoDB, wherever [README]. This indirection is both Sonic’s strength and its primary architectural constraint.

Valerian described the design philosophy in a 2019 interview: “I built Sonic to be ‘the Redis of search’: simple features, simple network protocol.” [1] The comparison to Redis is apt — like Redis, Sonic uses a custom TCP protocol called Sonic Channel instead of HTTP. Like Redis, it’s single-minded about doing one thing fast.

It was built to solve a real scaling problem at Crisp. Elasticsearch was too expensive for a freemium model with 100,000 users generating huge message volumes. The solution was a search backend so lean it could run on commodity hardware [1]. The benchmark numbers in the README back this up: ~30MB RAM under load, microsecond query response times.

As of this review, Sonic sits at 21,155 GitHub stars and is licensed under MPL-2.0 (Mozilla Public License 2.0), which is a copyleft license that requires modifications to Sonic itself to be released under the same license, but doesn’t require your application code to be open-sourced [README].


Why people choose it

The pitch is simple: Elasticsearch is overkill for most search use cases.

From the creator’s own words [1]: “Using traditional open-source search index softwares (eg. Elasticsearch amongst others) proved to be too expensive for our freemium model, as those systems are heavy and thus require huge server CPU and RAM.”

The teams landing on Sonic tend to have the same profile: they need autocomplete and fuzzy search in their app, they’re not running a Google-scale document corpus, and the idea of standing up a JVM-based cluster for a feature that should be a $5/mo concern is offensive to them. Sonic exists in the gap between “regex search on your Postgres table” (breaks at scale) and “managed Elasticsearch” (expensive, operationally heavy).

The production proof matters here. Crisp runs Sonic to power search across messages, conversations, contacts, and helpdesk articles for 100,000 users — half a billion indexed objects — on hardware that costs $5/month [1]. That’s not a benchmark, that’s a production workload that’s been running for years. It’s the strongest argument the project has.

The second draw is Rust. Valerian made the language choice deliberately: “The constraints of the language (eg. the borrow checker, the fact that there are no NULL values) guarantee that you won’t experience certain kinds of bugs while running your project in production (eg. NULL pointer exceptions and segmentation faults)” [1]. For a search daemon you start and forget, crash-resistance matters.


Features

Based on the README:

Core search:

  • Full-text search with collections organized into buckets. One bucket per user, one per tenant, whatever makes sense for your data model [README]
  • Typo correction: if a query returns no exact matches, Sonic tries alternate spellings [README]
  • Auto-complete via the SUGGEST command — returns word completions from the index in real time [README]
  • Full Unicode support across 80+ languages with automatic stop-word removal (so “the”, “a”, “and” in English don’t pollute your index) [README]

Index operations:

  • PUSH to add text, POP to remove entries, FLUSH to wipe a collection or bucket [README]
  • Background consolidation task makes pushed/popped entries available for search quickly without blocking the server [README]

Protocol:

  • Sonic Channel: a simple line-based TCP protocol, not HTTP. You open a persistent connection, authenticate with a password, and issue commands [README]
  • Designed to be lightweight on resources and straightforward to integrate

Client libraries: The README lists libraries for Node.js, Python, Go, PHP, Ruby, Java, Nim, and Deno [README]. Ecosystem coverage is decent — any mainstream backend language has something usable.

Deployment options: Docker image available (valeriansaliou/sonic:v1.4.9), binary releases for Linux and macOS, Homebrew for macOS [README]. Config is a single .cfg file.

What it does not have:

  • HTTP/REST API (Sonic Channel is TCP only)
  • Admin UI or web interface
  • Built-in clustering or replication
  • Document storage — again, it returns IDs only
  • Access control beyond a single shared password
  • Built-in TLS (you proxy it)

Pricing: SaaS vs self-hosted math

Sonic has no SaaS tier and no commercial license. It’s free software, period.

The relevant cost comparison is against the alternatives you’d otherwise reach for:

Elasticsearch / Elastic Cloud:

  • Elastic Cloud starts at ~$95/mo for the smallest managed deployment
  • Self-hosted Elasticsearch needs 4–8GB RAM minimum for a production cluster, plus JVM tuning, plus ILM configuration
  • Adding search to a small app via Elastic is a $100–$200/mo decision just for the infra

Typesense Cloud:

  • Starts at $24/mo for the managed tier
  • Open-source, self-hostable — a closer comparison. Requires more RAM than Sonic but has a REST API and admin UI

Meilisearch Cloud:

  • Free tier with 100K documents, paid from $30/mo
  • Again, self-hostable, REST API-first, more developer-friendly than Sonic

Sonic self-hosted:

  • $0 software license
  • Runs on a VPS you probably already have — 30MB RAM footprint means it shares a box with other services comfortably
  • Incremental monthly cost: effectively $0 if you fold it into an existing server

The math is clean for teams already self-hosting: add Sonic to your existing stack for free, free your $95–$200/mo Elastic bill. The catch is the integration work — Sonic doesn’t replace Elasticsearch operationally, it replaces it architecturally by pushing complexity (document storage, relevance ranking, faceting) back to you.


Deployment reality check

Getting Sonic running is genuinely simple by self-hosted standards.

The Docker command from the README:

docker run -p 1491:1491 \
  -v /path/to/sonic/config.cfg:/etc/sonic.cfg \
  -v /path/to/sonic/store/:/var/lib/sonic/store/ \
  valeriansaliou/sonic:v1.4.9

The config file is minimal — you set a password, tune memory limits, configure the data path. That’s mostly it.

What you also need:

  • A client library for your language to speak the Sonic Channel protocol
  • Your application logic to push content into Sonic during writes and query it during searches
  • A reverse proxy if you want TLS on the connection (Sonic doesn’t terminate TLS itself)

Where it gets harder:

  • No HTTP API. Every language integration goes through a Sonic Channel client library. If your language doesn’t have a maintained library, you’re writing the protocol integration yourself. The protocol is simple (line-based TCP), but it’s non-zero work.
  • No clustering. Sonic is a single-node search daemon. If it goes down, search goes down. There’s no replication or failover built in. For most small applications this is fine; for anything requiring HA, it’s a problem you solve in infrastructure (restart policies, health checks) rather than in Sonic.
  • Maintenance posture. The README notes it was last tested against Rust 1.74.1 from December 2023. GitHub activity on the repository has slowed considerably compared to 2019–2021. The project works, but active feature development appears minimal. If you need a search backend with an active maintainer shipping improvements, look at Meilisearch or Typesense instead.
  • The two-database pattern. Every application using Sonic runs two data stores: Sonic for the word index, and your primary database for actual content. This is architecturally sound (Sonic is honest about what it is) but it adds operational surface area. Back up both, monitor both, ensure both are consistent.

Realistic time to working integration: 1–2 hours for a developer comfortable with Docker and a backend language that has a Sonic client library. Most of that time is writing the indexing and query logic in your application, not configuring Sonic itself.


Pros and cons

Pros

  • Genuinely tiny resource footprint. 30MB RAM under load is not marketing copy — Crisp runs half a billion indexed objects on this [1]. You can run Sonic on infrastructure that would buckle under Elasticsearch.
  • Microsecond query performance. The README benchmarks and real-world Crisp usage both point to sub-millisecond search response times. For search autocomplete where latency is visible to users, this matters [README][1].
  • Production-validated at scale. The creator built this to solve a real problem at a real business, deployed it, and left it running. That’s a stronger endorsement than any benchmark [1].
  • Dead-simple deployment. Single binary or Docker container, one config file, one port. No JVM, no cluster configuration, no index lifecycle management.
  • Rust. Crash-resistant, low memory overhead, no garbage collection pauses. Appropriate language choice for a long-running search daemon [1].
  • Typo correction and auto-complete built in. Two features users expect from search come for free [README].
  • Good Unicode support. 80+ languages with stop-word removal — not an afterthought [README].
  • Free. MPL-2.0, no commercial tiers, no feature gating.

Cons

  • Not a product — an integration. You cannot hand this to a non-technical person and expect them to use it. It requires application code that speaks the Sonic Channel protocol. Every search result is an ID; your app fetches the actual content.
  • No HTTP/REST API. Sonic Channel is TCP-based. Browser-to-Sonic connections don’t work directly — you route through your backend. In 2026, most search backends provide a REST API; Sonic’s protocol choice made sense in 2019 and is now a friction point.
  • Maintenance appears to have slowed. Last noted Rust version is from 2023. If you’re evaluating search backends for a new project, Meilisearch and Typesense are more actively developed with larger contributor communities.
  • No clustering, no HA. Single-node architecture. Acceptable for many workloads; a gap for anything requiring search availability guarantees.
  • No document storage. You own consistency between Sonic and your primary database. If a record is deleted from PostgreSQL but not popped from Sonic, users get orphaned search results. Manageable, but it’s complexity your application must handle.
  • No admin UI. Debugging the index state means writing queries via the protocol or using a client library interactively. There’s no Kibana equivalent.
  • Limited ecosystem relative to alternatives. Client libraries exist for major languages but aren’t always well-maintained. Typesense and Meilisearch have better-maintained official SDK coverage.

Who should use this / who shouldn’t

Use Sonic if:

  • You’re a developer adding full-text search to an existing application with a known data model.
  • Your infrastructure is constrained — shared VPS, tight RAM budgets, price-conscious hosting.
  • You need autocomplete and fuzzy search without the Elasticsearch operational burden.
  • You’re comfortable integrating a TCP protocol client and handling the two-database consistency pattern yourself.
  • You’re already self-hosting and want to add search to your stack without introducing a new category of infrastructure cost.

Don’t use Sonic if:

  • You’re a non-technical founder who wants to click a button and have search. This is a developer integration, not a hosted service.
  • You need faceted search, filtering, geosearch, or relevance ranking beyond basic TF-IDF word matching. Sonic doesn’t do this.
  • You need high-availability search with replication and failover. Sonic is single-node.
  • You want a maintained, actively developed search backend. For greenfield projects in 2026, Meilisearch or Typesense are safer bets.
  • You need an HTTP/REST API to call from the browser or from non-traditional environments.

Don’t use Sonic (use Meilisearch instead) if:

  • You want a full-featured, actively maintained open-source search backend with REST API, relevance tuning, filtering, and a clean developer experience.

Don’t use Sonic (use Typesense instead) if:

  • You want managed cloud hosting, an actively maintained project, SDKs, and faceting — with comparable self-hosting ease.

Alternatives worth considering

  • Meilisearch — The most direct modern alternative. REST API-first, actively maintained, Docker-deployable, handles filtering and faceting. Requires more RAM than Sonic but is orders of magnitude easier to integrate. Self-hosted is free; managed cloud starts at $30/mo.
  • Typesense — Similar positioning to Meilisearch. REST API, official SDKs, managed cloud option. Also open-source with a commercial cloud tier. Better for teams that want a clean managed option without running their own infra.
  • Elasticsearch (self-hosted) — The incumbent. Featureful beyond anything Sonic attempts: aggregations, geosearch, ML ranking, analytics. Requires a JVM, 4–8GB RAM minimum, and meaningful ops knowledge. Only makes sense if you need its power.
  • Elasticsearch (Elastic Cloud) — Managed version of the above. Starts at ~$95/mo. The thing Sonic exists to avoid.
  • PostgreSQL full-text search — If you’re already on Postgres, tsvector + tsquery handles many search use cases without an additional service. Limited autocomplete and no fuzzy matching. Worth evaluating before adding any external search backend to your stack.
  • SQLite FTS5 — For very small datasets or single-user applications, SQLite’s built-in full-text search is underrated and requires no separate service.

Bottom line

Sonic is what it says it is: a fast, lightweight search backend for teams that find Elasticsearch absurd for their use case. The Crisp production story is legitimate — half a billion objects indexed, $5/month of infrastructure, microsecond query times. If you are a developer who needs to add search to an application, doesn’t want to run a JVM cluster, and is comfortable integrating a TCP protocol client, Sonic delivers on its promise.

The honest caveats are equally real: the project appears to be in maintenance mode rather than active development, the TCP-only protocol is friction in a REST-native world, and the two-database pattern requires application discipline to keep consistent. For new projects in 2026, Meilisearch or Typesense are safer choices with larger communities and more active maintainers. For teams that specifically need a near-zero-RAM search daemon and are comfortable with the integration work, Sonic is still one of the best options available — and the price is hard to beat.


Sources

  1. Federico Carrone, This is not a Monad Tutorial / Medium“Sonic: a minimalist alternative to Elasticsearch written in Rust” (Apr 3, 2019). https://medium.com/this-is-not-a-monad-tutorial/sonic-a-minimalist-alternative-to-elasticsearch-written-in-rust-7f3612ecb47b

Primary sources: