Off Label: CockroachDB as a File System
2026-08-18
Description
In this video, we explore an unconventional ("off-label") use case for CockroachDB... CockroachDB fundamentally stores data in a distributed way, so it already has all the built-in ingredients needed to manage and scale a file system across multiple regions. What's you'll learn: Hierarchical Structures: How to use CockroachDB's LTree data type to beautifully map out complex directory paths and enforce global file structure uniqueness as a primary key. Multi-Region Data Locality: Setting up a cluster spanning Europe, the US, and APAC. We'll look at configuring "regional by row" tables to keep private data close to the local user, alongside a "global" table setup so public files are replicated worldwide for low latency reads. Granular Security: Implementing Row-Level Security (RLS) to restrict file ownership and access permissions. Watch how users are automatically restricted to seeing only their own files, files explicitly shared with them, or public files. 00:05 – Introduction and Core Concept 00:33 – Cluster and Table Architecture 02:20 – Data Insertion and Server Setup 02:32 – Running Demo 03:08 – Summary and Key Takeaways Learn more at cockroachlabs.com #distributedsql #cockroachDB #database