Home / Companies / Tailscale / Blog / Post Details
Content Deep Dive

An unlikely database migration

Blog post from Tailscale

Post Details
Company
Date Published
Author
Brad Fitzpatrick and David Crawshaw
Word Count
1,668
Language
-
Hacker News Points
-
Summary

When Brad Fitzpatrick joined Tailscale, he discovered that the company's initial database solution involved storing data in a single large JSON file, which was simple but not scalable. As performance issues arose, they considered traditional databases like MySQL or PostgreSQL but opted for etcd due to its ability to fit into server memory and its compatibility with Go, the language in which their control plane was written. The switch to etcd allowed for more efficient data handling by breaking down the data lock and writing only changed data, enhancing both performance and scalability. Although etcd lacks the robust indexing systems of standard SQL databases, Tailscale developed in-memory indexes that are transactionally consistent to address this. The migration to etcd was smooth, resulting in significant improvements, particularly in commit latency, and paving the way for future enhancements such as blue-green deployment to maintain rapid development cycles.