Company
Date Published
Author
Hennadii Shymanskyi, Farruco Sanjurjo
Word count
3929
Language
English
Hacker News points
None

Summary

This is a success story about Contentful's environment cloning improvements, which aimed to solve performance issues and scalability problems in their database. The team applied the copy-on-write approach to improve data redundancy and integrity while minimizing performance impact. They introduced a new schema with denormalized tables, reducing table size and query complexity. To mitigate risks, they implemented a dual-schema setup, where the old schema was kept for a period of time after the migration to ensure seamless transitions. The team also developed a custom migration tool that utilized auto-pausing techniques to handle potential database overloads during the process. After a gradual rollout across thousands of databases, the new copy process showed significant improvements in speed, efficiency, and scalability, with environment copies taking under 5 minutes to complete. The migration was deemed successful, with no data loss or incidents reported, and provided numerous benefits for Contentful's customers, including predictable environment copy times, increased productivity, and enhanced development and testing cycles.