cure.fit, a health and fitness startup headquartered in India, has seen explosive growth during 2020. The company’s mobile application brings together all aspects of a healthy lifestyle on a single platform. It debuted in the United States just as consumers were looking for at-home fitness options while working from home due to COVID-19.
To keep up with demand, cure.fit needed a scalable architecture that could accommodate spikes in traffic, while also delivering unique content to users based on their segment.
cure.fit offers a suite of products, including cult.fit, eat.fit, mind.fit, and care.fit, so users can take a holistic approach to health and wellness. Each user is segmented based on their cure.fit usage and receives a personalized experience on pages such as merchandising, to help maximize revenue. However, with so many different use cases, the challenge was creating an architecture that was flexible enough to capture different data across user segments, quickly update to display personalized content, and scale to accommodate high traffic volumes like when a fitness class is in session.
Using microservices and MongoDB Atlas running on Amazon Web Services (AWS), cure.fit built a scalable, fast architecture that enables its developers to innovate quickly and be the engine powering this growing startup.
To achieve the scale and speed it needed, cure.fit broke down the application's infrastructure into 40 microservices, each enabling a specific piece of the business.
Originally MongoDB Atlas was used only when there were non-relational data requirements. However, as developers experienced how easy it was to develop with, how well it scaled and its rich feature set, such as support for ACID transactions, MongoDB Atlas has become the default database for new microservices. It is now the operational database for more than 60% of existing microservices.
One example of where this approach has been particularly successful is on the merchandising page. cure.fit uses a three-layer architecture where the application faces the end user, MongoDB Atlas is on the backend, and an API layer is in the middle. With the microservices approach, it only takes an hour to build a unique user experience, compared to at least a week for a traditional feature release. “When we released something to the user in the traditional way via some kind of code push or batches—if something goes wrong it becomes a huge pain,” said Kunal Khandelwal, Software Engineer, cure.fit. “But with MongoDB Atlas, we can just revert back to a previous version.” This strategy has enabled the team to A/B test quickly and discover new ways to engage users.
Capturing valuable data across products
Using a flexible database schema, cure.fit was able to capture a wide range of data from users throughout the cure.fit product suite. From communicating via web forms, to running complicated offer combinations for unique segments, to tracking customer usage across the cure.fit catalog, MongoDB Atlas provided a way for Khandelwal and his team to organize diverse data that’s constantly changing. “Responses from users through our forms can be really varied, so we needed a powerful document database that could accommodate all that data in a natural way,” Khandelwal said. “This helps us better engage our users and collate the constant feedback from them.”
Freeing up developers with a managed service
Part of the reason cure.fit went with MongoDB Atlas was because it’s a fully managed service and frees the team of database operations tasks. “As a startup we’re always looking for managed services,” Khandelwal said. “MongoDB Atlas on AWS saves us the effort of managing infrastructure, scaling up and down, obtaining metrics, and getting regular backups. This way we can focus on development and delivering a great user experience.”
Kunal Khandelwal, Software Engineer, cure.fit
Getting ready for growth with built-in features
Built-in features like cross-region replication, support for ACID transactions, and connection pooling enable cure.fit to deliver a high-performance application, even at scale. Multiple read replicas allow Khandelwal and his team to equally divide read-heavy workloads amongst different nodes, while transactions can occur across multiple collections. With the entire infrastructure running on AWS, Khandelwal is ready to help cure.fit capitalize on its explosive growth. “AWS has anything and everything we need to grow,” he said. “It’s an entire managed platform and ecosystem, so it was the natural choice for us.”
Kunal Khandelwal, Software Engineer, cure.fit