- Difficulty adding new functionality to the company’s monolith
- System complexity and lack of governance around maintaining internally built solutions
- High incoming traffic to the platform, increasing the manual tasks needed for the team to provide consistent availability of delivery services
- Kong provides the ability to templatize custom request path transformations and JWT validations to enable automation of repeatable processes across the organization
- Kong’s Plugin Development Kit (PDK) delivers turnkey solutions for meeting agile requirements while also ensuring minimal latency
- Kong’s circuit breaking, rate limiting and load balancing capabilities help elevate the management, reliability and availability of key infrastructure services
- Architectural flexibility supports the growth of iFood’s ecosystem, with its endpoints expected to double over the next two years to support the company’s global market expansion
- Kong provides iFood with the agility needed to maintain consistent platform uptime during meal-time traffic spikes, allowing the development team to focus on building out new platform functionality rather than simply maintaining the runtime environment
- Consistent API availability significantly decreased the platform’s high-impact incidents by 33% (incidents affecting more than five percent of the user base at any one time, e.g., customers, drivers, and partner restaurants)
Delivering a Diverse Offering to the FoodTech Industry
iFood is the leading food delivery service in Brazil. Since its emergence in 2011, the FoodTech company has witnessed rapid growth and is now delivering over 44 million orders per month while supporting over 200,000 partner restaurants and 150,000 active couriers on the platform. Along with a growing presence in Mexico and Colombia, iFood has its sights set on impacting 1 billion customers across the globe and has continued to invest in modern technology to help further diversify its product offerings within the FoodTech industry.
Global Growth and the Opportunities Ahead for iFood
To deliver on its global expansion goals, iFood leans on its Site Reliability Engineering (SRE) team to ensure that the food delivery platform is well-equipped to support the company’s accelerated timeline for growth. “We need to look at both the challenges and opportunities ahead of us to grow iFood globally,” said Gabriel Froes, head of site reliability engineering at iFood. “How do we evolve the product to reach 1 billion customers, and what strategies do we implement to effectively expand our offering?” As part of this initiative to expand its customer reach, iFood understands the importance of catering to its local communities first. Especially sensing the impact felt following the COVID-19 pandemic, iFood launched programs to provide meal vouchers and financial assistance to partner restaurants to help maintain the livelihood of their small businesses. Ultimately, this aligns with iFood’s mission to deliver a positive impact within the walls of its communities by democratizing access to a variety of great food that customers want, when they want it.
iFood Chooses Kong Gateway to Elevate the Management of Key Services
iFood strategically selected Kong Gateway in 2018 as a solution to remove the bottlenecks involved with decentralizing the company’s monolithic architecture. “We had multiple instances of a split monolith, with two routes in front of this traffic,” explained Leandro Carneiro, senior SRE at iFood. “However, adding functionality to our monolith was very painful and not a user-friendly experience for our team.” Today, iFood is operating primarily in Amazon Web Services with 450 public/private APIs running its core business. With the team anticipating its application endpoints to easily double over the next two years, timing became opportune to introduce a solution like Kong Gateway into iFood’s ecosystem. In addition to instantly
elevating the management, reliability and availability of key infrastructure services, Kong’s service connectivity platform provided the SRE team with the added flexibility to create templated versions of their custom JWT validations and request path transformations, thus allowing for swift implementation of repeatable processes across the enterprise with minimal latency as iFood accelerates its journey towards modern architecture patterns. “Our SRE team is responsible for defining iFood’s cloud best practices and how we should provision our cloud infrastructure to more effectively manage our rapidly growing service connections,” said Froes. “Kong’s out-of-the-box request path transformations and JWT validations made it far easier for our developers to move fast and focus on building our systems rather than simply maintaining the environments they are running in.”
iFood Reduces Complexity with Kong’s À La Carte Menu
As a FoodTech leader, iFood prides itself on providing customers with on-demand cuisine options across a diverse pallet of restaurants within existing and emerging markets. For the company’s SRE team, it is equally as important to ensure optimal platform flexibility in order for iFood to continue providing a seamless end-user experience at scale. “The biggest impact Kong provides our business is reducing platform downtime. Our initiative to evaluate Kong was driven by our growing number of high-impact incidents occurring on the platform and furthermore, the complexity surrounding our internal solution was becoming a cumbersome task for our team to maintain,” explained Froes. Similar to iFood customers who can quickly open the delivery app and select their favorite dish from a conveniently laid-out à la carte menu, the iFood SRE team turned to Kong’s Plugin Development Kit (PDK) to access a ‘plug-and-play’ menu of customizable policies and turnkey solutions to support their agile requirements. “It is easy to extend Kong’s functionality through custom plugins,” said Froes. “We wrote some plugins in Lua scripting and were able to quickly implement the custom routes that we needed. The flexibility that Kong’s platform provides our team through its plugin architecture is easily one of the biggest differentiators for us, and it has enabled our team to achieve results much faster than any other solutions we have tried for this.”
Providing Application Resilience for High-Traffic Workloads
Aligned with its go-to-market strategy, iFood runs monthly promotional campaigns to incentivize more customers to place orders through the platform. While this strategy is successful in driving additional traffic, it also greatly increases the amount of pressure put on iFood’s backend systems. “When we run campaigns, we find we will often have traffic peaks at abnormal times of the day, and the platform does not always have time to escalate to accommodate for all of the new requests,” said Froes. “We don’t want to close the door and say no one can order, so we use Kong’s gatekeeper functionality to allow only one-third of the incoming traffic to reach our backend systems at any one time,
thus giving our platform the bandwidth it needs to appropriately accommodate for the new traffic it is receiving.” The baseline for iFood’s platform traffic comes in at 70,000 requests per second (4.2 million requests per minute). However, immediately following a typical monthly promotion, the platform may witness traffic spikes upwards of 110,000 requests per second (6.6 million requests per minute). To cope with these significant surges in service demand, iFood uses Kong to rate limit its traffic and ‘keeps the doors open’ for its business while also leveraging an integration with Prometheus to run active/passive health checks to maintain ideal platform performance. “The circuit breaking and load balancing capabilities of Kong quickly went from a nice-to-have to a must-have for managing our peak traffic spikes – this quickly became a very valuable piece of Kong for us,” said Carneiro.
“Our SRE team will use market standard tools whenever possible to manage our system’s development life cycle, from its conception, architectural decisions, provisioning and maintenance – with a focus on maintainability, resilience and disaster recovery best practices. With Kong, we aim to reach operational excellence and become the reference in system resilience and tools that improve the iFood engineering team’s experience.”
— Gabriel Froes, Head of Site Reliability Engineering, iFood