Citus Con: An Event for Postgres 2023 will happen virtually Apr 18-19 in 2023. Big news, the Call for Speakers is open! 💥
Copper, the #1 CRM for G Suite, is the first CRM built for relationship management, not record maintenance. Built to address the pain points of traditional CRMs, Copper eliminates manual data entry, automates tedious tasks, recommends actions and allows users to work right out of your inbox without having to update or maintain their CRM. Over 12,000 businesses are adopting Copper because it's built to seamlessly integrate with the G Suite tools workers love to use every day, driving better collaboration, increased productivity, and long-lasting customer relationships.
The Copper CRM application is built using Ruby on Rails and needs to support up to 55,000 operations per minute, at peak. Supporting the growth of its user base and increased activity on its SaaS application requires a cloud database that can scale.
“We have to account for a large number of data access patterns, ranging from analytics to transactional workloads,’ says Kelly Cheng, former CTO and Co-Founder at Copper. “Unlike other SaaS businesses with just one very high-use data access pattern, we can’t hyper-optimize for a single pattern. We have to use all of the capabilities of Postgres.’
Before adopting Citus Cloud, Copper had a single Postgres instance as its primary data store—and the company was reaching the limits of what single-node Postgres could do. “We spent more than six weeks moving some important data to Amazon S3 because we thought we would run out of headroom in a quarter,’ says Jesse Willett, former principal architect at Copper.
Hitting the capability limits of the company’s single-node Postgres database would have had dire consequences. “We realized we might have to start limiting new customer registration, which would have stalled our business growth,’ says Willett.
The Copper team began exploring different approaches to scale their database. Unfortunately, most options would have taken too long and would have diverted developers from working on their CRM application to instead work on database infrastructure.
“We were looking at re-implementing all 150,000 lines of code in a NoSQL key/value store that was violently, radically different from our Postgres database,’ says Willett. “That would have required a complete ground-up rewrite of each of our CRM features, which we would have had to stage one at a time. It might have taken months per feature initially—for 50 features. I imagined a bottomless pit of three or four years with a team of five people. And we would have had a horrible operational challenge of deploying features on two separate database architectures in parallel.’
Another option Copper considered was to shard at the application layer, which meant re-architecting the application to work with multiple, separate Postgres databases.
“We knew that sharding at the application layer would be more efficient than re-implementing the entire app for NoSQL. But sharding our application still would have taken us at least 6 months, and then it would have required almost permanent monitoring and maintenance by 1.5 full-time employees,’ says Willett. “And sharding the application would have meant pulling software engineers off new feature development. The opportunity cost would have been higher than the labor cost.’
The team considered a variety of other Postgres solutions but quickly narrowed the field. “One Postgres solution wasn’t ready to support an online, transactional SaaS application like ours—it was geared more toward analytics. It also didn’t have any credible cloud options—and we wanted a fully-managed cloud database,’ says Willett. “Then we looked at another leading cloud database, but there were rumors of performance issues.’
The speed change of Citus is a game changer. With Citus, we can make indexes in minutes that used to take hours.Jesse Willett, Former Principal Architect, Copper
After evaluating the options for scaling their database, the Copper team selected the Citus Cloud database as a service.
The fact that Citus is open source was important. “Open source gives us much greater flexibility for the future,’ says Cheng.
And because Citus is implemented as an extension to Postgres (essentially, software that layers on top of Postgres), Copper would still be running on Postgres. This approach made the Citus Cloud database service relatively easy to adopt, since the team at Copper did not need to re-architect their application to use Citus.
“We were able to migrate relatively easily to run on top of Citus, even though our app had zero knowledge of sharding beforehand,’ says Cheng. “And now that we’re using Citus, we don’t have to worry about how to manage our growth—not even 10X growth.’
By adopting Citus Cloud to scale out Postgres, we didn’t have to slow down feature development to shard at the application level. For us, Citus was the fastest and best way to protect our engineering throughput while still scaling the database.Kelly Cheng, Former CTO and Co-Founder, Copper
Throughout the migration process, the Copper team took advantage of the deep Postgres expertise in the Citus Data team.
“We definitely needed guidance,’ says Willett. “We needed to confirm a lot of things that we were thinking with experts who know Postgres and know how to scale it out. The Citus team offered expertise and assistance with onboarding that other cloud database providers simply couldn’t provide.’
Since migrating to Citus Cloud, the Copper team has noticed a significant improvement in the speed of accessing the database. “Database access is approximately 2X to 3X faster now that we're running on Citus,’ says Willett. “Of course, the speed of database access is only one factor in the overall responsiveness of our CRM, but the increase is still impressive.’
Fast database performance also dramatically speeds up administrative tasks. “The speed change of Citus is a game changer,’ says Willett. “With Citus we can make indexes in minutes that used to take hours.’
Moving to the Citus distributed database has helped Copper avoid single-node database limitations that could have halted customer growth. “It would have been a tremendous business problem to stop new customer sign-ups,’ says Cheng. “By deploying Citus, we don’t have to limit customer growth. Today we have twice as many customers as we might have had otherwise.’
We were able to migrate relatively easily to run on top of Citus, even though our app had zero knowledge of sharding beforehand. And now that we’re using Citus, we don’t have to worry about how to manage our growth—not even 10X growth.Kelly Cheng, Former CTO and Co-Founder, Copper
The team at Copper discovered Citus at just the right time. By adopting Citus Cloud, the Copper team kept their developers focused on creating new features for their CRM users.
“By adopting Citus Cloud to scale out Postgres, we didn’t have to slow down feature development to shard at the application level,’ says Cheng. “For us, Citus was the fastest and best way to protect our engineering throughput while still scaling the database.’
And because of Citus Cloud, Copper is able to do more complicated things in their application. “Our support for important new features last year, such as multi-currency, was enabled by Citus, by our willingness to have more complicated things going on in our Postgres database in terms of joins,’ says Willett. “That would not have been feasible in Elasticsearch, and we could not have afforded to support the new multi-currency feature before adopting Citus.’
Deploying Citus Cloud has enabled Copper to keep growing their SaaS business without worrying about how to scale their database infrastructure.
“Before Citus, we were worried about running out of space or memory for our single-node Postgres database, and we would tell our developers not to use certain expensive database features. Now we no longer have those restrictions. Instead of telling our developers we don’t want to create new indexes, we’re making indexes whenever we need to, quickly and easily,’ says Willett. “Citus is the most effective way to achieve horizontal scale without sacrificing the durability and advanced features of Postgres.’
Kelly Cheng, Former CTO and Co-Founder, Copper
By adopting Citus Cloud to scale out Postgres, we didn’t have to slow down feature development to shard at the application level. For us, Citus was the fastest and best way to protect our engineering throughput while still scaling the database.
The Copper CRM was built with three basic principles in mind: Keep it simple. Show what matters. Make it actionable. Copper has done that by seamlessly integrating with G Suite, eliminating painful data entry, and automating time-consuming tasks. Copper is a new kind of productivity CRM that's designed to do all your busywork, so you can focus on building long-lasting business relationships.