The infrastructure team at Replit aimed to optimize their Goval, a set of infrastructure components running tens of thousands of Repls simultaneously. They initially operated in a single failure domain but later partitioned it into multiple clusters for improved reliability and scalability. The new architecture used consistent hashing to ensure uniform cluster sizing and reduced the risk of cascading failures. To manage this complex infrastructure, Replit adopted Infrastructure as Code (IAC) using CDK for Terraform and Typescript, which simplified provisioning, management, and operation. They implemented a three-step migration procedure to transfer traffic to new clusters without downtime, relying on feature flags to monitor key statistics and minimize impact. The successful reworking of their infrastructure has improved reliability, reduced manual alterations, and unlocked the possibility of creating single-tenant clusters for enterprise customers.