SQLite Transforms into Distributed High-Performance Blob Storage

Exploring the feasibility, challenges, and use cases of using SQLite as an underlying engine for lightweight distributed Blob storage.
The article discusses a Hacker News post about building distributed high-performance Blob storage with SQLite, analyzing the motivation and difficulties. SQLite's single-file, zero-config, and transactional features make it suitable as a lightweight engine, but lacking network access and concurrent writes requires sharding, replication, and consensus. It proposes consistent hashing or range sharding, Raft for metadata, and chunking for large Blobs. Performance-wise, it suits edge/IoT and read-heavy scenarios, but network latency may bottleneck; true performance depends on implementation.
A post on Hacker News titled "Distributed, high-performance blob storage on SQLite" sparked discussion. Although it only had 26 points and 2 comments, it points to an interesting technical direction: using SQLite, an embedded database, to build distributed high-performance binary large object storage.
Why Use SQLite for Blobs?
SQLite is usually seen as a lightweight local database, suitable for mobile and small applications. But its single-file storage, zero-configuration, and transactional safety have led some to wonder: can SQLite be used as an underlying storage engine, with a distributed layer to extend its capabilities?
Binary large object (Blob) storage typically needs to handle unstructured data such as images, videos, and documents. Traditional solutions may rely on object storage services or specialized file systems, while SQLite-based solutions attempt to find a balance between simplicity and performance.
BLOB (Binary Large Object) is a field type in databases used to store binary data, typically for unstructured content such as images, audio, video, and PDFs. SQLite's BLOB columns can theoretically store up to about 1GB of data and support incremental writing (C interfaces like sqlite3_blob_open allow chunked reads and writes without loading everything into memory). However, storing large objects directly in database rows involves trade-offs: on one hand, transaction atomicity and backup consistency are easier to guarantee; on the other hand, large inline fields exacerbate page splits, increase WAL log size, and affect query planning. Therefore, a common practice is to set a threshold—small objects stored inline, large objects chunked into separate tables or external files with only reference paths stored in the database. Understanding how BLOBs are stored and read/written in SQLite is fundamental to evaluating the feasibility of "using SQLite for Blob storage."
Key Challenges of Distributed Architecture
Using SQLite in a distributed environment is not easy. SQLite itself does not support network access, and concurrent writes are limited to a single machine. Therefore, implementing distributed Blob storage requires building replication, sharding, and consistency mechanisms on top of SQLite.
One possible approach is to use multiple SQLite database instances as storage nodes, distributing data via consistent hashing or range sharding, and using some consensus protocol (such as Raft) to ensure metadata consistency. Additionally, Blob data is typically large, and storing it directly in SQLite BLOB columns may affect performance, so chunked storage or external file references may be needed.
Consistent Hashing is a distributed sharding technique that maps data keys to nodes. It organizes the hash value space into a ring, with both nodes and keys mapped onto the ring, and each key is handled by the first node in clockwise direction. Compared to modulo hashing, adding or removing nodes only affects data migration in adjacent ranges, greatly reducing rebalancing costs, and virtual nodes can mitigate load imbalance. In SQLite-based Blob storage, consistent hashing can be used to determine which storage node a Blob should reside on, while metadata (key-to-node mapping) requires an additional consensus layer for maintenance. Note that consistent hashing solves the data distribution problem but does not guarantee replica consistency; it still needs to be combined with replication protocols and failure detection mechanisms.
Raft is a consensus algorithm for managing replicated logs. Through leader election, log replication, and safety constraints, it enables multiple nodes to agree on the same state machine even under partial failures. It is easier to understand and implement than Paxos and is widely adopted by systems like etcd and TiKV. In this scheme, Raft is typically not used to replicate Blob data itself (due to large data volumes and high throughput requirements) but to maintain metadata: such as shard mapping, node membership, leases, and version numbers. Metadata goes through Raft for strong consistency, while Blob data is sharded and asynchronously replicated with multiple replicas to improve throughput. This layered design of "strong consistency on the control plane, eventual consistency on the data plane" is a common compromise in lightweight distributed storage.
Performance Considerations and Use Cases
The advantage of this approach is simple deployment, few dependencies, and SQLite's maturity ensures data durability. For edge computing, IoT devices, or distributed applications requiring lightweight storage, it may be an attractive choice.
However, whether it is truly "high-performance" depends on the specific implementation. SQLite's write performance is good on a single machine, but in distributed scenarios, network latency and synchronization overhead may become bottlenecks. Therefore, this approach is more suitable for read-heavy, write-light scenarios or those insensitive to latency.
WAL (Write-Ahead Logging) is a logging mode in SQLite where writes are first appended to a log file and then merged back into the main database, allowing read operations not to be blocked by writes, significantly improving concurrent read performance. With WAL enabled, SQLite supports a concurrent model of one writer and multiple readers, but concurrent writes are still not allowed. In distributed Blob storage, the value of WAL lies in: read requests within a single node can be processed in parallel, suitable for read-heavy workloads; but the WAL file grows continuously with writes and requires periodic checkpoints to reclaim space, and at high write rates, checkpointing itself may become a bottleneck. Additionally, WAL mode relies on shared memory and is not suitable for network file systems, which limits the possibility of SQLite instances directly sharing database files across machines and further explains why a distributed layer needs to be built on top.
Community Discussion and Insights
Although there was not much discussion on HN, comments may have covered implementation details or alternatives. This exploration reflects developers' ongoing interest in simple, embeddable storage solutions and reminds us that classic tools can find new life in new scenarios.
For technology decision-makers, evaluating this approach requires weighing operational complexity and performance requirements. If the team is already familiar with SQLite and the use case matches, it may be a lightweight distributed storage option worth trying.
One-line Summary
Exploring the feasibility, challenges, and use cases of using SQLite as an underlying engine for lightweight distributed Blob storage.
Paragraph Summary
The article discusses a Hacker News post about "building distributed high-performance Blob storage with SQLite," analyzing the motivation and difficulties of this technical direction. SQLite offers single-file, zero-configuration, and transactional safety features, making it suitable as a lightweight storage engine, but it lacks network access and has limited concurrent writes, so sharding, replication, and consensus mechanisms must be built on top. The article suggests using consistent hashing or range sharding to distribute data, Raft to ensure metadata consistency, and chunking or external references for large Blobs. In terms of performance, the approach features simple deployment and few dependencies, suitable for edge computing, IoT, and read-heavy scenarios, but network latency and synchronization overhead may become bottlenecks; whether it is truly "high-performance" depends on the specific implementation.
Related articles

Nothing CMF Buds 2A Drops to $17.89 on Black Friday: A New Low for ANC Earbuds
Nothing CMF Buds 2A wireless earbuds Black Friday deal: just $17.89 on Amazon, about $11 off retail and a record low. ANC earbuds at an entry-level price.

When AI Creation Gets Accused of "Spitting": Hacker News Heats Up Over the Glaude Controversy
A Hacker News post, "Spitting in the Face of Glaude," sparks debate on AI creation transparency and attribution ethics. This analysis examines the blurred creator identity behind the controversy and offers practical advice for AI content production.

Akai Embraces Custom Firmware: MPC Sample 1.4 Lets Users AI-Program Their Sampler
Akai embraces the modding community with MPC Sample 1.4 firmware, supporting vibe-coded custom firmware and effects. We analyze the impact of this open strategy on music hardware and AI-assisted programming.