OLX Group logo

OLX Saves 50% Using CloudFront Functions for Edge Compute on AWS

2022

The global network of trading platforms OLX Group (OLX) was looking for a cost-effective solution to alleviate the time-consuming operational burden of managing its legacy on-premises hardware for content delivery. Its unique use case involved a high volume of lightweight edge compute that required the ability to scale quickly to serve spikes in peak traffic while minimizing latency and time-outs. Using solutions from Amazon Web Services (AWS), OLX rearchitected its content delivery network (CDN), building a secure, scalable solution that improved performance, saved time for company engineers, and cut the cost of compute at the edge by 50 percent.

OLX Group
kr_quotemark

The operational work is so much easier when you’re running things on AWS. Using AWS, we can run the trading process in the online world.” 

Maciej Sobkowiak 
Lead Site Reliability Engineer, OLX Group

Finding a Compute Solution at the Edge

Over 300 million people per month across more than 30 countries use OLX’s trading platforms as a simple, convenient way to buy or sell cars or other goods, shop for homes, and find jobs. The company had been delivering content through a combination of AWS services and another company’s edge computing solution, using on-premises servers. As its contract was running out with its edge services provider in 2020, OLX started to look at cost-effective ways to better customize the online experience for its users at the lowest possible latency. OLX turned to Amazon CloudFront, a CDN service built for high performance, security, and developer convenience. To facilitate functions related to CloudFront events, OLX used Lambda@Edge—a feature of CloudFront that lets organizations run code closer to users of the application, which improves performance and reduces latency. OLX migrated to Lambda@Edge without any loss in functionality.

In 2021, AWS introduced CloudFront Functions, offering logic at the edge that helps organizations securely deliver data, videos, applications, and APIs to their customers globally with low latency and high transfer speeds. CloudFront Functions are ideal for lightweight processing of web requests, OLX’s use cases. With a team of just four people, OLX was able to run a proof of concept within 6 weeks and then propagate the changes on the CDN by country using the capabilities of Amazon Route 53—a way to route end users to internet applications—in a safe and reversible manner in case of any problems using Route 53 weighted records. Engineers set the caching behavior they wanted in single paths that connected to the backend server. “That’s why I like using Amazon CloudFront: it’s very simplified,” says Maciej Sobkowiak, lead site reliability engineer at OLX. “We could start using CloudFront Functions at the edge as soon as it was available. It can scale dynamically.”

Using CloudFront Functions to Improve Performance and Reduce Cost

Using CloudFront Functions, OLX has broader global scalability through a network of more than 310 points of presence (POP) locations, which means that it can handle the more than 170,000 requests per second passing through POPs during peak hours. As a result, OLX no longer experiences cold start issues, in which sudden spikes in traffic that approached concurrency limits caused time-outs or increased latency for users, in the larger countries that it serves. In fact, users now access content from OLX with less than 1 millisecond of latency and an average response time of 120 milliseconds, including for client communication. 

Plus, OLX saw a reduction in its backend use because of the effectiveness of the POP response in off-loading traffic and improved cache hit ratio, implementing more than 100,000 CloudFront Functions every second and generating more than 40 GB per second of bandwidth. OLX also reduced its CDN edge compute bill by 50 percent. “It’s a very clear pricing model,” Sobkowiak says. “One of the main reasons that we pushed for the migration is that the CDN pricing was so good. It made a huge difference in cost.” 

Using Amazon CloudFront helped OLX standardize its logs, storing them in Amazon Simple Storage Service (Amazon S3), an object storage service offering industry-leading scalability, data availability, security, and performance. To access data in a structured manner, OLX introduced Amazon Athena, an interactive query service that makes it easy to analyze data in Amazon S3 using standard SQL. “Logging is very efficient and very easy to do,” says Sobkowiak. OLX can also access metrics simply in near real time using CloudFront Functions alongside other AWS services. OLX can make changes across all CloudFront POPs in about 3 minutes, quickly check for changes in patterns, and use alerting that it created on the CDN layer to look for problems. “It’s very easy, and it’s very standardized,” says Sobkowiak. “AWS does a really good job in helping us stream and scrape the metrics. It’s transparent for us. It’s just there.” 

To control how traffic reaches its applications, OLX’s security team uses AWS WAF, a web application firewall that helps protect web applications or APIs against common web exploits and bots that may affect availability, compromise security, or consume excessive resources. OLX was able to customize the rules, extending the deny lists and open-day lists and blocking specific unwanted traffic. As further protection, OLX uses AWS Shield, a managed distributed denial-of-service protection service that safeguards applications running on AWS. 

Throughout its entire migration process, first to Lambda@Edge and then to CloudFront Functions, OLX worked closely alongside AWS support teams. As OLX hit concurrency limits in its original migration to Lambda@Edge, AWS responded within minutes. “The AWS team was always available,” Sobkowiak says. “The Lambda@Edge concurrency model can be pretty challenging to understand, and they were able to explain why we hit limits.” As one of the first users of CloudFront Functions, OLX continues to provide feedback to AWS. For example, AWS responded quickly to OLX’s requests for additional features, such as access to the client source TCP ports so that authorities could help identify users when required.

Expanding the Use of AWS to Advance Operations

OLX continues to plan large initiatives involving AWS services, including the continual expansion of its use of AWS compute services as well as a suite of database solutions. It is growing the use of Amazon OpenSearch Service, which helps businesses search, visualize, and analyze up to petabytes of text and unstructured data. OLX also will be looking for ways to continue to improve the performance of its online marketplaces as the POP footprint of CloudFront continues to grow. “The operational work is so much easier when you’re running things on AWS,” Sobkowiak says. “Using AWS, we can run the trading process in the online world.”


About OLX Group

OLX Group operates one of the fastest growing networks of trading platforms globally. Serving over 300 million people every month in more than 30 countries, OLX Group helps users buy and sell cars and household goods, find housing, get jobs, and much more.

Benefits of AWS

  • Scales to handle 170,000+ requests per second at peak
  • Saved 50% on costs for compute at the edge
  • Implements with less than 1 millisecond of latency
  • Implements 100,000+ CloudFront Functions every second
  • Gained visibility into metrics
  • Simplified and standardized logging
  • Reduced cold start issues and request time-outs

AWS Services Used

Amazon CloudFront

Amazon CloudFront is a content delivery network (CDN) service built for high performance, security, and developer convenience.

Learn more »

CloudFront Functions

With Amazon CloudFront, you can securely deliver data, videos, applications, and APIs to your customers globally with low latency and high transfer speeds. 

Learn more »

AWS WAF

AWS WAF is a web application firewall that helps protect your web applications or APIs against common web exploits and bots that may affect availability, compromise security, or consume excessive resources.

Learn more »

AWS Shield

AWS Shield is a managed Distributed Denial of Service (DDoS) protection service that safeguards applications running on AWS.

Learn more »


Get Started

Organizations of all sizes across all industries are transforming their businesses and delivering on their missions every day using AWS. Contact our experts and start your own AWS journey today.