Quick Summary
In this Zomato case study, we will explore Zomato’s journey to analyze how it achieved 100% uptime for Profile Store by migrating its Database to DynamoDB. We will also explore how it improved performance, scalability, and cost-effectiveness by migrating its billing system from TiDB to Amazon DynamoDB.
The food delivery and hospitality industry is a beacon of innovation and resilience. Yet, Zomato stands out as an epitome of innovation and perseverance. Since its establishment in 2008, this Indian company has transcended borders to become a front-runner with a presence spanning 24 countries and a loyal user base of 80 million individuals. A steadfast commitment to quality permeates every aspect of its operations, fueling its expansion. We want to learn from its evolution by exploring the reasons behind Zomato’s migration from TiDB to Amazon DynamoDB.
By utilizing DynamoDB’s scaling and efficient data retrieval features, Zomato ensured the uninterrupted operation of its Profile Store, offering personalized recommendations even during peak usage times. Our comprehensive Zomato case study explains how it executed a planned migration in phases to provide a shift without downtime, demonstrating dedication to uninterrupted service delivery.
Zomato’s journey began in Delhi, where a simple observation of a lunch queue sparked a business idea. Foodiebay, an earlier venture, paved the way for what we know today as Zomato.
Founded in 2008 by Deepinder Goyal and Pankaj Chaddah, Zomato has become a prominent player in the food delivery industry in India and across 24 countries. The platform caters to diners and restaurants, offering features like discovery, review systems, food ordering, reservations, and dine-in options. Restaurants can also use Zomato’s delivery services to connect with customers. Today, Zomato has 80 million users across 10,000 cities in 24 countries.
Financially, Zomato has seen a strong upswing. Revenue surged by 123% in 2022, reaching Rs 4,109 crore. However, a loss of Rs 346.6 crore was reported for the December quarter of February 2023. The second quarter of 2021-2022 saw a Gross Order Value (GOV) of INR 58.5 billion.
Zomato has also participated in investment, raising $2.6 billion across 22 funding rounds. They have invested in 14 companies themselves, successfully exiting from 2, and currently have a portfolio of 12. The company has garnered support from 29 investors and completed 15 acquisitions.
In essence, this particular Zomato case study of database migration is one of continuous growth and a commitment to revolutionizing the food delivery experience for diners and restaurants.
Amazon DynamoDB is a managed NoSQL service that offers performance and easy scalability. It adjusts automatically to meet your requirements, removing the hassle of provisioning and patching tasks while ensuring data security through encryption at rest. It allows you to concentrate on the core of your business — fostering growth. Explore the DynamoDB encryption at rest feature to delve deeper into data security.
Here’s how DynamoDB can assist you;
Picture this. You are new to Zomato, feeling hungry and unsure of what to choose. Suddenly, you come across spot-on suggestions for restaurants, dishes, and cuisines that match your taste buds perfectly. This is all thanks to Zomato Profile Store, a data repository that stores your preferences and those of millions of users. Keeping this system running 24/7 is crucial to avoid disruptions in your dining plans!
Thanks to this upgrade, Zomato now experiences uptime for its Profile Store even during busy times like Diwali and New Year’s Eve. It ensured that personalized recommendations continued to flow with the number of users searching for their next meal. Additionally, the system has effortlessly handled traffic spikes exceeding 2.5 times its capacity without needing pre-configuration or downtime.
Zomato relies on its customer base, which leads to expected surges in website traffic during meal hours. The main goal is to uphold responsive performance (latency) even when there’s a high influx of orders. Special occasions, such as holidays, bring an added layer of complexity. Ideally, Zomato wants to handle these peak times without overinvesting the resources while ensuring a user experience during quieter periods. It is where DynamoDB’s scalability truly stands out.
Tests demonstrated that following the shift to DynamoDB, the Profile Store could manage 17.5 million requests per minute (RPM). This remarkable capability was tested on December 31st, 2020, when the system flawlessly processed 12 million RPM—the year ended on December 31st, 2021. The Zomato platform dealt with a surge of orders 50% higher than its daily volume, showcasing DynamoDB’s effectiveness in scaling during peak demand.
The Zomato case study highlights that after migration from TiDB to Amazon DynamoDB, Zomato reduced its costs by 25%. After analyzing Zomato’s monthly and peak periods, the AWS team recommended adjustments to optimize Zomato’s DynamoDB capacity and resources.
Zomato initiated the migration process in November 2020 by checking the compatibility of its APIs to ensure data input and output. A trial run was conducted with a certain amount of traffic before transitioning to identify potential issues.
By transitioning from TiDB to Amazon DynamoDB, Zomato has ensured uptime for its Profile Store during heavy traffic. This directly translates into a user experience, with tailored recommendations ultimately leading to customer satisfaction and, hopefully, many enjoyable dining experiences!
Hire AWS Developers and enjoy a dramatic 90% reduction in microservice response.
Behind the scenes of every Zomato order lies a complex but crucial system: the Billing Platform. It manages everything after you place your order, from online food purchases to dine-in experiences, even facilitating social initiatives like Feeding India. This platform ensures smooth financial transactions, handling payments and facilitating large-scale payouts to restaurants and delivery riders – all critical for processing daily transactions.
Zomato’s Billing Platform utilizes an asynchronous messaging approach to prioritize reliability and availability. Imagine a series of independent tasks working together – Kafka technology connects these tasks, allowing them to function independently and adapt to changing needs. The platform acts as a central hub, receiving and sending messages to process orders and generate detailed financial records for various uses.
In the past, Zomato relied on TiDB, a database known for its unique combination of scalability and reliability. This allowed Zomato to handle real-time transactions (essential for processing orders) and data analysis (crucial for financial reporting) within the same system. TiDB’s distributed architecture also offered horizontal scaling, enabling the addition of resources as needed while ensuring fault tolerance and high availability for minimal downtime.
The Zomato case study revealed that due to its ability to offer a blazing-fast response time and seamless scalability, they decided to go with DynamoDB, a serverless, NoSQL database service. Besides, the pay-as-you-go solution provided by DynamoDB seems to be in focus with what Zomato was expecting – focusing on application development without managing servers. Amazon DynamoDB’s functionalities empowered Zomato to scale effortlessly, streamline developer workflows, minimize repetitive tasks, and ultimately reduce their total cost of ownership (TCO).
Apart from the abovementioned reasons, Zomato relied on Amazon DynamoDB for other reasons discussed below:
“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.”
Mr. Lalit Verma, Engineering Lead, Zomato
Zomato initially included TiDB in the original design to handle our OLTP workloads. Zomato’s engineering team decided to use TiDB due to its strong knowledge of the relational model and MySQL and its capacity to scale horizontally to meet scaling requirements.
Over time, Zomato has significantly expanded its operations, and with the inclusion of Blinkit and HyperPure, it became necessary for their billing platform to support multiple tenants. Scaling and maintaining the TiDB database presented Zomato with numerous obstacles.
As per the Zomato case study, some of the challenges it faced in managing the TiDB database are as follows,
Zomato initially opted for TiDB, a familiar relational database, for its billing platform. This choice leveraged the team’s expertise in MySQL and TiDB’s horizontal scaling capabilities to handle growth. However, as Zomato expanded with Blinkit and HyperPure, managing a multi-tenant TiDB database grew complex.
Inspired by successful deployments of Amazon DynamoDB in other microservices, Zomato decided to streamline its approach. They migrated to a unified Amazon DynamoDB table designed using the adjacency list pattern. This consolidated all business and entity data into one location, eliminating the need for scattered data retrieval and boosting performance. It significantly reduced costs, particularly for read operations, as a single query could retrieve all necessary data. This migration leveraged the power of DynamoDB’s serverless architecture and pay-per-use model, leading to a more efficient and cost-effective solution for Zomato’s billing platform.
Zomato’s billing system deals with massive amounts of data, requiring a database designed for fast access. The DynamoDB’s approach of dividing data into manageable partitions with a designated “partition key” for access proved valuable, significantly improving query performance and overall scalability. This streamlined structure replaced Zomato’s prior complex system with a single Amazon DynamoDB table.
However, choosing the right partition key is critical. Zomato uses a “composite” key combining factors like merchant ID and business type to distribute data evenly across partitions, preventing overloaded sections and optimizing performance. Additionally, Zomato utilizes a “global secondary index” (GSI) to efficiently query complex data relationships, ensuring smooth operation for their large-scale billing system.
To ensure a seamless migration from TiDB to Amazon DynamoDB with zero downtime and uninterrupted service, Zomato implemented a meticulously planned, phased approach. It involved writing data simultaneously to both databases (dual write) for consistency, establishing replication to keep data synchronized, performing data synchronization to eliminate discrepancies before the final switch, and deploying robust failover mechanisms to guarantee continuous availability throughout the entire process.
We created this Zomato case study to understand the intricate details of each phase and how they achieved it,
Get Started with Our Expert AWS Managed Services.
The primary motivation for migrating from TiDB to Amazon DynamoDB was a two-fold advantage: improved application performance and reduced operational complexity. This shift paid off in a big way, as illustrated in the figure below. Microservice response times saw a dramatic 90% decrease on average. Even more impressive, these response times remain consistently low (around 75 milliseconds) regardless of traffic fluctuations.
The original database architecture presented a significant bottleneck. The figure shows that the microservice could only handle up to 2,000 requests per minute. This limitation in database throughput could have improved the overall performance and scalability of the microservice, hindering Zomato’s growth potential. Addressing this issue has become crucial to meeting future demands.
Migrating from TiDB to Amazon DynamoDB significantly improved database performance, eliminating the previous bottleneck. As a result, the microservice throughput skyrocketed to a whopping 8,000 requests per minute (RPM) at our current scale! This translates to Zomato handling four times the traffic compared to the old design. This enhanced throughput eliminated lag and enabled near-real-time billing, improving service level agreements (SLAs).
A significant advantage of opting for Amazon DynamoDB is its pay-as-you-go system. In contrast to our method with TiDB, where we had to allocate more resources than needed for sudden traffic increases, DynamoDB enables us to pay solely for the resources we utilize. This shift has a significant 50% reduction in our monthly billing system expenses.
Also Read: Netflix’s AWS Migration Case Study – The Journey To Become a Streaming Giant
When migrating your database to DynamoDB, you can learn many lessons from our Zomato case study. By successfully migrating its billing system from TiDB to Amazon DynamoDB, Zomato ensured a smooth transition with zero downtime and no disruption to its customers. This move empowered them to handle their growing user base more efficiently.
Here’s how DynamoDB is making a difference:
Even you can enjoy increased database throughput by 4x, reduced latency by 90%, and lowered costs by 50%. Leverage our AWS migration services to access the exceptional DynamoDB expertise of our Certified AWS developers.
Zomato migrated from TiDB to Amazon DynamoDB to improve application performance, reduce operational complexity, and achieve scalability and cost efficiency.
Zomato ensured zero downtime during the migration process by implementing a meticulously planned, phased approach, including dual writes for data consistency, replication for synchronization, and robust failover mechanisms.
The key benefits Zomato experienced after migrating to DynamoDB included improved application performance, reduced operational complexity, enhanced scalability, and significant cost savings.
Zomato addressed the scaling and performance challenges with TiDB by adopting a unified DynamoDB table design, optimizing partition keys, and leveraging global secondary indexes for efficient queries.
Zomato was drawn to Amazon DynamoDB for features such as flexible scaling, efficient data retrieval, automatic scaling, serverless management, and fast, consistent performance, which aligned with its requirements for handling massive data loads and ensuring high availability for its billing platform.
Yes, we can assist you in migrating to Amazon DynamoDB from your existing database. Our team has extensive experience in database migration, and we follow a carefully planned approach to ensure a smooth transition with minimal downtime.
We will assess your current database setup, plan the migration process, handle data replication and synchronization, and provide support throughout the migration to ensure everything runs seamlessly. We aim to help you leverage the benefits of Amazon DynamoDB, such as improved performance, scalability, and cost efficiency while minimizing any disruption to your operations.
Your Success Is Guaranteed !
We accelerate the release of digital product and guaranteed their success
We Use Slack, Jira & GitHub for Accurate Deployment and Effective Communication.