Company
Date Published
Oct. 29, 2024
Author
Alex Fattouche, Corey Horton
Word count
3762
Language
English
Hacker News points
16

Summary

Cloudflare's DNS provider is used by 14.5% of all websites as an authoritative DNS provider, with a responsibility to provide reliable and high-performance service. The company's DNS system is often compared to a phone book, with records that provide details about domains, including IP addresses associated with hostnames. Cloudflare's scale means it handles a massive volume of DNS data, making migration from one database cluster to another a complex task. A team led by the DNS team migrated 20+ internal services from direct database access to using an internal DNS Records gRPC API, which allowed for better control over database access and improved performance. The migration involved several phases, including initial copying, change capture, and applying changes in the destination database. After the migration, Cloudflare saw a steep drop in usage across the original database cluster, and an increase in requests per second to the DNS Records API, with improved CPU usage and reduced incident rates.