Fork Media Group

Fork Media Achieves 40% Lower Costs with Databases Running on AWS Graviton2 Processors


Contextual advertising, in which ads are placed on a website to match relevant content on that page, is projected to grow by 13.3 percent annually through 2026. Although contextual ad placement is an effective way to target users who are likely to respond, brands must be careful of the environment in which their ad is placed. Most brands wouldn’t want their ad showing alongside an article about political corruption, for example, even if certain keywords make a contextual match in an advertising algorithm.

Based in India, Fork Media Group (FMG) is a media tech company that goes beyond contextual advertising to offer “brand safety.” Over the past five years, FMG has deployed artificial intelligence and machine learning tools to understand the images, body content, headline, and overall sentiment of a webpage before placing an ad for its customers. Brands benefit from a complete context match and a guaranteed brand-safe environment. FMG currently serves ads to 7–9 million unique web visitors per day and works with top local and international online publishers in India, Southeast Asia, and the Gulf Cooperation Council (GCC).

Technology concept. 3D render

Using the AWS Graviton2 processors, we can cost-effectively deliver the performance and latency required for our advertising solutions."

Nikhil Sheth
Senior Vice President of Engineering, Fork Media Group

Delivering Low-Latency Ads in Milliseconds

FMG had been using two different cloud computing platforms. But as the business grew, the latency in servicing its media assets—consisting of video, audio, and static images—began ranging from 500 milliseconds to 1 second, higher than its internal service level agreement of 200 milliseconds.

To meet its SLA and maximize ad visibility, FMG decided to consolidate its ad server databases on Amazon Web Services (AWS) in 2019. The company started using Amazon CloudFront as a low-latency content delivery network and is now consistently achieving its SLA.

It also adopted Amazon Elastic Compute Cloud (Amazon EC2) Auto Scaling with Amazon EC2 Spot Instances—which makes up nearly 60 percent of its Amazon EC2 capacity dedicated to ad delivery workloads. This approach optimizes FMG's ad delivery while minimizing costs, resulting in a 30 percent cost reduction for the company. By using Amazon EC2 Auto Scaling to dynamically add capacity when traffic spikes, FMG also achieved a 50 percent reduction in ad delivery latency.

Experimenting to Find Best Price and Performance

By mid-2020, FMG migrated about half of its workloads to AWS and was self-managing its primary MySQL database engine on Amazon EC2. However, its engineers faced challenges in managing high query volumes for its mission-critical database, with 25–40 queries per user.

The business decided on Amazon Relational Database Service (Amazon RDS) with x86 processors, in conjunction with Amazon Elastic Block Store (Amazon EBS) to automate database administration at scale. However, performance was hindered by bottlenecks due to disk input/output operations per second (IOPS). FMG determined that it had to separately provision IOPS to achieve the query performance needed, but that proved too costly. FMG had to allocate a larger disk size to achieve better IOPS, which drove up costs.

Reflecting on the performance gains in content delivery and the cost savings achieved with Spot Instances, FMG approached AWS for advice. The AWS team suggested a proof of concept (POC) with AWS Graviton2 ARM-based processors to achieve the best price-performance ratio for databases running on Amazon EC2.

Achieving Seamless Scaling at Lower Cost

Because running workloads on AWS Graviton2 processors costs less than using x86 processors, FMG was able to upgrade its instances from r5.4xlarge to r6g.16xlarge, thus increasing memory for nearly the same cost. The higher-grade instances essentially allowed FMG to do more in-memory querying faster, and with reduced IOPS storage load and cost.

Carlyle Oliver, head of engineering for Fork Media Group–Contextual, says, “We were able to scale up without incurring additional cost and bottlenecks, using the same network configuration. This would have been significantly more expensive on a non-Graviton processor.”

In addition, Amazon EBS storage volumes have shrunk 25 percent, which contributes to a 40 percent decline in the overall cost of the company’s main database and attached storage. Explains Nikhil Sheth, senior vice president of engineering at Fork Media Group, “With Graviton instances, we had better disk read/write performance and hence were able to reduce our Amazon EBS volumes. By using the AWS Graviton2 processors, we can cost-effectively deliver the performance and latency required for our advertising solutions.”

Migrating Two Databases in Three Months

After successfully migrating its main database to AWS Graviton2 processors, FMG migrated another database shortly thereafter. It took FMG just under three months to migrate both databases, including the time taken for the POC and testing. It gradually performed the migration to R6g instances during periods of little to zero ad activity between 11 p.m. and 1 a.m.

For most, if not all, of FMG’s team, this was their first experience with ARM-based processors. Oliver shares, “We hesitated about using Graviton initially, but after the POC and load testing, all that hesitancy disappeared. AWS provided suggestions before and during the migration, which when combined with online documentation, was sufficient for us to migrate confidently and independently.”

The company discovered a wide range of ARM-compatible software available on the market, especially for heavy users of open-source technology like FMG. According to Oliver, finding the optimal operating system (OS) and database configuration was also key to success. “We had to narrow down the right combination and version of the Ubuntu OS, supported libraries, and the latest MySQL edition that’s compatible with our system. From there, we integrated open-source monitoring solutions that were compatible, and performance has been smooth ever since.”

Reducing Latency by 90%

As of December 2021, the business is migrating all production ad servers to Graviton, looking to match the price and performance gains achieved with its databases. It is also containerizing ad delivery using Amazon Elastic Kubernetes Service (Amazon EKS) and considering a data lake on AWS to leverage more analytics on its growing data volumes.

The integration of cloud-native solutions on AWS has contributed to additional latency gains as well. The latency between endpoints for serving any static advertising asset has dropped to 50 milliseconds from more than 500 milliseconds, which according to Oliver, makes a huge difference in FMG’s application performance.

In addition to cost reduction, FMG’s CPU consumption has decreased by 45 percent since migrating to AWS Graviton2 processors. Oliver concludes, “We can now manage 30–40 percent more user traffic with the same infrastructure setup. We’re now well positioned for expansion in line with the projected growth in ad tech and contextual advertising.”

Next Steps

To learn more, visit AWS Graviton Processor.

About Fork Media Group

Fork Media Group is a media tech company based in Mumbai, India, that specializes in contextual online advertising in a brand-safe environment. The group serves ads to 7–9 million users each day and works with domestic as well as international publishers.


  • Serves ads in 50 milliseconds
  • Reduces costs by 40% for main database and storage
  • Reduces latency by 90%
  • Decreases CPU utilization by 45%
  • Migrates to AWS Graviton2 processors in less than 3 months
  • Improves efficiency with integrated, cloud-native services

AWS Services Used

Amazon CloudFront

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

Learn more »

Amazon EC2 Spot Instances

Amazon EC2 Spot Instances let you take advantage of unused EC2 capacity in the AWS cloud. Spot Instances are available at up to a 90% discount compared to On-Demand prices.

Learn more »

Amazon Elastic Kubernetes Service

Amazon Elastic Kubernetes Service (Amazon EKS) is a managed container service to run and scale Kubernetes applications in the cloud or on-premises.

Learn more »

AWS Graviton Processor

AWS Graviton processors are designed by AWS to deliver the best price performance for your cloud workloads running in Amazon EC2.

Learn more »

Get Started

Companies of all sizes across all industries are transforming their businesses every day using AWS. Contact our experts and start your own AWS Cloud journey today.