Zomato is an India-based restaurant aggregator and food delivery company with more than 350,000 listed restaurants across more than 700 cities in India. In late 2020, Zomato engaged Amazon Web Services (AWS) to migrate Profile Store, its in-house feature store, to a new database. After the migration, Zomato achieved a near-100 percent uptime even during peak periods, such as Diwali and New Year’s Eve.
It is vital for Zomato to maintain 100 percent uptime for Profile Store because it contains an array of current, historical, and derived data, as well as behavioral attributes related to individual users, restaurants, and menu items. This in turn drives restaurant, dish, and cuisine recommendations across the entire platform. Profile Store is a priority service as disruptions have previously led to order losses.
Zomato’s developers previously spent a significant amount of time managing the Profile Store using a NoSQL database. During peak periods, when traffic would increase by as much as 2.5 times, developers from multiple teams had to spend a couple of weeks analyzing metrics and up to 2 days to provisioning additional resources. If sudden traffic spikes exceeded the forecasted resources, it could lead to downtime as well.
Upscaling the system to handle massive peak traffic
In October 2020, Zomato began working with AWS to migrate Profile Store’s database to Amazon DynamoDB. Zomato chose Amazon DynamoDB as it already had other workloads running on the service, and it had proven to be scalable and reliable. The entire migration process was completed by December 2020.
“Profile Store plays an integral part in driving new features on the Zomato App,” shared Aanchal Singh, engineering manager at Zomato. “Amazon DynamoDB allows us to successfully cater to requirements while meeting our service-level agreements.”
Since the migration, Zomato has handled more than 2.5x spikes in transaction volume without extensive pre-planning or downtime. Profile Store was benchmarked to handle up to 17.5 million requests per minute (RPM) and was able to manage 12 million RPM on 31 December 2020 without any performance degradation. On 31 December 2021, the platform processed 50 percent more orders than the daily average.
“The scalability of Amazon DynamoDB gives us a competitive edge in this increasingly crowded space which we wouldn’t have achieved with our previous database,” said Lalit Verma, engineering lead at Zomato.
The scalability of Amazon DynamoDB gives us a competitive edge in this increasingly crowded space which we wouldn’t have achieved with our previous database.”
Lalit Verma
Engineering lead at Zomato
A seamless transition into the new database service
Along with additional optimizations, migrating to Amazon DynamoDB helped Zomato reduce its weekly spending by 25 percent. After assessing Zomato’s average, monthly, and peak loads, the AWS team made right-sizing recommendations for Zomato’s Amazon DynamoDB capacity and resources.
Zomato began the migration in November 2020 by checking the compatibility of its Application Programming Interfaces (APIs) to ensure data input and output would not be affected. The team also conducted a soft launch with a small portion of the traffic prior to the cutover to review any potential issues.
Moreover, the NoSQL database Zomato previously used did not support batch requests. After migrating to AWS, Zomato was able to implement batch requests of 500 requests per call. “Batch calls allow Zomato’s machine learning models to work with more data points, which improves the overall efficiency and accuracy of the personalization models. Ultimately, it is about giving our customers more tailored recommendations based on their personal preferences,” explained Vaibhav Khandelwal, senior software development engineer at Zomato.
Finally, the team saves considerable monitoring time each week because Amazon DynamoDB is a fully managed service and does not require constant monitoring. As a result, Zomato has been able to redirect the team to other higher-value projects within the organization.
A reliable partner that helps scale the business
Currently, about 90 percent of Zomato’s business-critical workloads run on various AWS services, allowing Zomato to scale seamlessly according to business needs.
Zomato is now exploring how it can use other AWS services to further improve its data analytics capabilities and downtime recovery for a better user experience. For example, the team is considering using Amazon OpenSearch Service to perform log analytics and real-time application monitoring and AWS Elastic Disaster Recovery to minimize downtime and data loss.