Bengaluru: Zerodha has replaced the ageing storage infrastructure behind its Kite trading platform’s user preferences with an open-source system developed in-house, following nearly a year of engineering, testing and deployment.
Called Zerodha Blobasaur, the new system uses Rust and SQLite to store customised trading layouts, chart configurations and other interface preferences.
The brokerage has already deployed it in production across three nodes, moving away from its earlier SSDB-based infrastructure.
Zerodha founder and CEO Nithin Kamath highlighted the project in a November 23 post on X, drawing attention to the engineering effort behind a feature most users take for granted: having their application remember how they have configured it.
The detailed technical account, published on November 19 by software engineer Sarat Chandra on Zerodha’s engineering blog, explains why the brokerage decided to build its own storage infrastructure instead of adopting another existing database.
The project also reflects a specific engineering requirement. Zerodha needed a system capable of handling frequent updates, large data payloads and sudden increases in traffic without introducing unnecessary complexity into its existing applications.
Why Zerodha Needed a New Storage System
Kite users can customise their trading screens with multiple charts, technical indicators, drawings, watchlists and other tools. Kite Terminal Mode extends these capabilities by allowing users to arrange different widgets into personalised workspaces.
Every time users modify these configurations, the platform needs to store the changes and retrieve them when required.
These settings are saved as data blobs, mostly in JSON format, with individual payloads ranging from a few kilobytes to several megabytes.
Unlike conventional database records, the storage system does not need to understand the contents of these blobs. It simply needs to store and retrieve them efficiently.
Zerodha previously relied on CouchDB before shifting to SSDB, a disk-backed storage system compatible with the Redis protocol. SSDB served the brokerage for several years, but its limitations became increasingly difficult to accommodate.
According to the engineering team, SSDB was no longer maintained and could operate only on a single node. Handling larger payloads also affected latency, eventually requiring Zerodha to impose a 1 MB limit on stored blobs.
The brokerage evaluated alternatives including ScyllaDB, PostgreSQL, YugabyteDB, RocksDB, SeaweedFS and object storage.
However, the team found that the requirements around frequent overwrites, large payloads, data expiry, operational complexity and infrastructure costs made these options less suitable for its particular workload.
Zerodha was targeting thousands to tens of thousands of requests per second, including unpredictable traffic bursts during volatile market conditions. This led to the decision to develop a dedicated storage system.
How Zerodha Blobasaur Works
Rather than building an entirely new database engine, Zerodha chose SQLite as the underlying storage layer and developed a distributed architecture around it.
Written in Rust, Zerodha Blobasaur distributes data across multiple SQLite database files, known as shards. This design addresses one of SQLite’s key limitations: although it supports concurrent readers, each individual database permits only one active writer at a time.
Blobasaur uses separate shards to allow multiple write operations to proceed independently. Within each shard, a dedicated writer batches pending changes, while separate connections handle read requests.
The system also compresses stored data to reduce disk usage. Zerodha uses Zstandard (zstd) compression in its production deployment.
Another important design decision is compatibility with the Redis ecosystem. Blobasaur supports Redis commands and the Redis Cluster protocol, allowing existing applications to communicate with it through familiar client libraries.
For distributed deployments, requests are routed to the appropriate machine based on their keys, with individual machines further distributing data across their local shards.
This approach allowed Zerodha to introduce a new storage backend without requiring a complete overhaul of the applications using it.
Zerodha’s Internal Tests Show Higher Write Performance
Zerodha’s benchmark results indicate that distributing workloads across multiple shards substantially improved write throughput.
With one shard, the system recorded 7,740 write operations per second. Increasing the configuration to 16 shards raised the figure to 25,324 operations per second.
A workload consisting of equal proportions of read and write operations also improved, with throughput increasing from 14,227 to 29,538 operations per second.
The tests used 64 concurrent connections, 100,000 keys and 64 KiB JSON payloads. Both the server and load generator ran on a 16-core laptop, with the data directory placed in memory using tmpfs to isolate database locking and CPU overhead from variations in disk performance.
The production deployment provides a separate indication of how Zerodha is using the system. The brokerage runs Blobasaur across three nodes, each with four virtual CPUs and 8 GB of RAM.
Across a full trading session, Zerodha reported approximately 2 milliseconds of latency at the 99th percentile for commands on each node.
A Month of Parallel Operations Helped Zerodha Replace SSDB
Migrating existing user preferences was another challenge because the brokerage needed to move historical data without disrupting Kite services.
Zerodha initially directed new workloads, including Terminal Mode workspace storage, to Blobasaur. For existing data, it introduced parallel writes, sending updates to both SSDB and the new system while historical preferences were transferred in the background.
The two systems continued operating simultaneously for a month. After Zerodha reported no discrepancies between them, the brokerage switched off SSDB.
Existing applications were also migrated from a single-node Redis client to a cluster-aware client to support the new distributed architecture.
The transition required additional work around disk-space reclamation and background maintenance. The engineering team also addressed latency spikes caused by large expiry-cleanup operations by moving cleanup through the normal writer process and splitting it into smaller batches.
Open-Source Release Comes With Reliability Trade-offs
Zerodha has made Blobasaur publicly available on GitHub under the GNU Affero General Public License version 3 (AGPLv3). Its repository includes configuration documentation, supported commands, compression options and migration and maintenance tools.
However, developers evaluating the software will need to consider its durability and scaling limitations.
The production configuration uses SQLite’s write-ahead logging mode with the synchronous setting at NORMAL. This improves performance but can result in the loss of recent committed changes following an operating-system crash or power failure, even though database consistency is preserved.
An optional asynchronous-write mode introduces another trade-off by allowing the system to acknowledge a request before the change has been committed to SQLite.
Zerodha considers these compromises acceptable for its intended use because Blobasaur stores interface preferences rather than critical financial records.
The distributed system also does not yet support automatic failover or live redistribution of hash slots between running nodes. Changing the number of shards currently requires stopping the server and running a migration.



