<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/let-s-build-planetscale-from-scratch-infrastructure-nfohkldk4" -->

---
title: Let's Build PlanetScale From Scratch: Infrastructure
description: A developer is building Homescale, an open-source PlanetScale-inspired system that creates writable database instances and point-in-time branches from...
canonical: https://daily.dev/posts/let-s-build-planetscale-from-scratch-infrastructure-nfohkldk4
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Let's Build PlanetScale From Scratch: Infrastructure | daily.dev
og:description: A developer is building Homescale, an open-source PlanetScale-inspired system that creates writable database instances and point-in-time branches from...
og:url: https://daily.dev/posts/let-s-build-planetscale-from-scratch-infrastructure-nfohkldk4
og:image: https://api.daily.dev/og/posts/NFOHKldk4.png
og:image:alt: Let's Build PlanetScale From Scratch: Infrastructure
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Let's Build PlanetScale From Scratch: Infrastructure

**[Hacker News](https://daily.dev/sources/hn)** · 11 min read · 1 upvotes · 0 comments

## Summary

A developer is building Homescale, an open-source PlanetScale-inspired system that creates writable database instances and point-in-time branches from immutable snapshots without copying full databases. The architecture borrows Docker's image/container model: database images are immutable, containers are writable clones, and branches are containers created from a point-in-time capture of another container. The storage layer uses Ceph RBD for copy-on-write block devices, enabling a 100 GB database branch to start with near-zero additional storage. Kubernetes acts as the control plane, with Rook managing the Ceph cluster and Ceph CSI translating PVC and VolumeSnapshot resources into RBD operations. The system is designed to be database-agnostic, with Postgres as the first supported engine behind an adapter interface. Part 1 covers the infrastructure design; future parts will address the API, controllers, and Postgres adapter.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://onatm.dev/2026/07/16/homescale-part-1>

## Questions this post answers

### How does Ceph RBD support copy-on-write cloning for database branching?

Ceph RBD supports copy-on-write cloning through snapshot layering: an RBD snapshot is a read-only point-in-time view of an image, and a clone is a writable RBD image that refers back to that snapshot for any data it has not yet written itself. On first write to shared data, Ceph copies the relevant object (default 4MB) into the clone before applying the change, so a branch of a 100GB database starts as mostly metadata rather than a full copy.

_Developers experimenting with copy-on-write storage architectures can find related infrastructure deep dives on daily.dev._

### Why does branching a database container require an intermediate snapshot state instead of cloning directly?

Branching from a writable container needs an intermediate read-only state because the image is already immutable but the running container is not; Homescale first captures the container at a point in time (an RBD snapshot), then creates the new branch container as a writable clone from that captured state. This avoids copying the full dataset and lets the new branch share unchanged data with its parent until it diverges.

_For readers designing storage lineage models, daily.dev surfaces more posts on database branching and snapshot architecture._

### What is the difference between how Amazon RDS/Cloud SQL and Aurora/AlloyDB separate database storage from compute?

Standard Amazon RDS engines and Google Cloud SQL attach network block storage (EBS or Persistent Disk/Hyperdisk) to a compute host, so the database sees a normal block device while its data lives independently of local disk. Aurora, AlloyDB, and Azure SQL Hyperscale go further, connecting compute instances to shared or distributed storage systems built specifically for the database, letting compute be replaced or scaled without copying data per instance.

_Engineers comparing managed database storage architectures can track these design patterns on daily.dev._

## Similar posts on daily.dev

- [PlanetScale — PlanetScale](https://daily.dev/posts/planetscale-planetscale-rnllipo87) · Programming Digest · 17 upvotes · 1 comments
- [PlanetScale Extends Database Platform to PostgreSQL](https://daily.dev/posts/planetscale-extends-database-platform-to-postgresql-dlbsyxmnj) · InfoQ · 3 upvotes · 0 comments
- [$5 PlanetScale — PlanetScale](https://daily.dev/posts/5-planetscale-planetscale-lot4wxsw5) · Hacker News · 12 upvotes · 0 comments
- [Kubernetes made deploying easy. Nobody warned you about the databases.](https://daily.dev/posts/kubernetes-made-deploying-easy-nobody-warned-you-about-the-databases--pbcdamp5e) · The New Stack · 2 upvotes · 0 comments

---

Tags: [#kubernetes](https://daily.dev/tags/kubernetes), [#postgresql](https://daily.dev/tags/postgresql)

[View this post on daily.dev](https://daily.dev/posts/let-s-build-planetscale-from-scratch-infrastructure-nfohkldk4)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Let's Build PlanetScale From Scratch: Infrastructure","url":"https://daily.dev/posts/let-s-build-planetscale-from-scratch-infrastructure-nfohkldk4","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/let-s-build-planetscale-from-scratch-infrastructure-nfohkldk4"},"datePublished":"2026-07-16T14:38:32.161Z","dateModified":"2026-09-14T07:49:36.227Z","description":"A developer is building Homescale, an open-source PlanetScale-inspired system that creates writable database instances and point-in-time branches from...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c14d1f72f136ec1c6d1bc27267cc5b93?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c14d1f72f136ec1c6d1bc27267cc5b93?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/let-s-build-planetscale-from-scratch-infrastructure-nfohkldk4","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"kubernetes,postgresql","timeRequired":"PT11M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"Let's Build PlanetScale From Scratch: Infrastructure"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/let-s-build-planetscale-from-scratch-infrastructure-nfohkldk4#faq","mainEntity":[{"@type":"Question","name":"How does Ceph RBD support copy-on-write cloning for database branching?","acceptedAnswer":{"@type":"Answer","text":"Ceph RBD supports copy-on-write cloning through snapshot layering: an RBD snapshot is a read-only point-in-time view of an image, and a clone is a writable RBD image that refers back to that snapshot for any data it has not yet written itself. On first write to shared data, Ceph copies the relevant object (default 4MB) into the clone before applying the change, so a branch of a 100GB database starts as mostly metadata rather than a full copy. Developers experimenting with copy-on-write storage architectures can find related infrastructure deep dives on daily.dev."}},{"@type":"Question","name":"Why does branching a database container require an intermediate snapshot state instead of cloning directly?","acceptedAnswer":{"@type":"Answer","text":"Branching from a writable container needs an intermediate read-only state because the image is already immutable but the running container is not; Homescale first captures the container at a point in time (an RBD snapshot), then creates the new branch container as a writable clone from that captured state. This avoids copying the full dataset and lets the new branch share unchanged data with its parent until it diverges. For readers designing storage lineage models, daily.dev surfaces more posts on database branching and snapshot architecture."}},{"@type":"Question","name":"What is the difference between how Amazon RDS/Cloud SQL and Aurora/AlloyDB separate database storage from compute?","acceptedAnswer":{"@type":"Answer","text":"Standard Amazon RDS engines and Google Cloud SQL attach network block storage (EBS or Persistent Disk/Hyperdisk) to a compute host, so the database sees a normal block device while its data lives independently of local disk. Aurora, AlloyDB, and Azure SQL Hyperscale go further, connecting compute instances to shared or distributed storage systems built specifically for the database, letting compute be replaced or scaled without copying data per instance. Engineers comparing managed database storage architectures can track these design patterns on daily.dev."}}]}
```

