quantcast company logo

Quantcast’s ML Engine Achieves Faster Queries at Lower Costs Using AWS Graviton2 Processors


Quantcast, an advertising technology company and the creator of an intelligent audience solution that empowers brands, agencies, and publishers to know and grow their audiences online, needed a more cost-effective way to run its real-time bidding (RTB) solution. Quantcast used Amazon Web Services (AWS) to migrate two of its major services to AWS Graviton processors, which run on 64-bit Arm Neoverse cores. These services were Kamke, a custom OLAP-style database consisting of over a trillion data points, and a Java multiplexer, Mux, that conducts ingesting, normalization, filtering, and staging operations for the RTB stack. By migrating to Arm-based instances on AWS Graviton2 processors, Quantcast improved the latency of its audience-planning queries and achieved cost savings through compute optimization.

“We are always keen on trying new instance classes to improve areas such as cost optimization,” says Rory Carmichael, head of infrastructure platform at Quantcast. “Using AWS, we expect to see substantial performance improvements every year.”

Quantcast team at work

Using the AWS Graviton2 processors, we can cost-effectively deliver the performance and latency our customers expect from our advertising, reporting, and planning solutions.”

Rory Carmichael
Head of Infrastructure Platform, Quantcast

Helping Advertisers Know Their Audiences

Quantcast was founded in 2006 to improve online advertising using artificial intelligence and machine learning. The company has 18 offices around the globe and over 600 employees, and it has a presence in five AWS Regions across the United States, Asia, and Europe. Ara, Quantcast’s artificial intelligence and machine learning engine, delivers automated insights, marketing performance, and results at scale to drive business growth. The solution includes an RTB solution that empowers advertisers to buy and sell digital advertising inventory using near-real-time data from 100 million online destinations. It uses a combination of various AWS services and AWS Partner services such as Aerospike Database Enterprise Edition on AWS, a near-real-time NoSQL data storage solution.

Previously, Quantcast used Amazon Elastic Compute Cloud (Amazon EC2) C5 Instances and Amazon EC2 R5 Instances (specifically Amazon EC2 R5d Instances), which are a generation of memory-optimized instances. However, the company wanted to use Arm-based instances to improve performance and reduce latency when delivering near-real-time results. It also saw the opportunity to lower its compute, storage, and networking costs using Arm-based architecture.

Quantcast chose to migrate two applications to AWS Graviton2 processors. One was Kamke, a custom OLAP-style profile data store consisting of over a trillion data points, which Quantcast uses to deliver audience profile characteristics that can be used to make ad-buying decisions. Quantcast also migrated Mux, an RTB application running at the edge. Mux formats requests from various ad exchanges to an internal protocol format, enriches data using other near-real-time data sources, facilitates fraud detection and prevention, and multiplexes requests to other data processes that decide how to price and bid on ad requests. The application runs four to five million requests per second at peak across four regions, and all transactions must be completed in 10–120 ms. By using AWS Graviton2 processors, Quantcast is better equipped to meet these requirements on an enterprise scale, achieving higher performance and lower costs.

Improving Performance with Arm-Based Instances on AWS Graviton2 Processors

The first system Quantcast migrated to AWS Graviton2 processors was Kamke, in the fall of 2020. Because the system needs large amounts of both RAM and attached storage, Quantcast decided to switch to the R6gd class of machines. Spinning up an AWS Graviton2 cluster only required updating the appropriate Amazon Machine Images (AMIs), which provide the information required to launch an instance, along with compiler flags, then running an open-source infrastructure-as-code software tool. Quantcast immediately achieved a 15 percent improvement in query time and an 18 percent improvement in cost savings. Over time, the engineering team was able to make a number of Arm-specific improvements that reduced the query time by over 30 percent and reduced costs by 20 percent. “High-performance computing on Arm processors is still pretty new, and people are still figuring out how the code needs to be structured to run most effectively on these cores,” says Jackson Newhouse, principal engineer at Quantcast. “AWS offers a lot of helpful guidance.”

On AWS Graviton2 processors, Kamke can swiftly analyze 18 million distinct data segments and data on billions of device identifiers—over two trillion data tuples. Completing a typical word cloud query—which compares an arbitrary audience with tens of thousands of segments, each with millions of identifiers—takes about 1 second.

In early 2021, the company ported Mux from Amazon EC2 C5 Instances to Amazon EC2 C6g Instances, starting with its smallest data center, in Asia. After gaining confidence there, Quantcast next ported Mux in its European data center and performed fine-tuning to accommodate the higher load requirements in that region. After reconfirming the cost benefits of AWS Graviton2 processors in Europe, Quantcast completed ports in the US East and US West Regions.

Mux is a network-heavy application, making millions of Transmission Control Protocol and User Datagram Protocol requests to different bidders. To improve the application’s performance, Quantcast uses Amazon Corretto—a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit—as a Java virtual machine. “Using Amazon Corretto made a dramatic difference in achieving the network performance we needed,” says Christopher Wirt, staff engineer at Quantcast. “We got to the next stage where we could roll out Amazon EC2 C6g Instances across an entire data center.”

Continuing to Migrate Its RTB Solution

Quantcast has fully migrated Kamke and Mux, achieving faster, more cost-effective computing. Next, the company plans to migrate other components of its RTB solution—starting with its scoring models—to AWS Graviton2 processors. “Using the AWS Graviton2 processors, we can cost-effectively deliver the performance and latency our customers have come to expect from our advertising, reporting, and planning solutions,” says Carmichael.

About Quantcast

Quantcast is a global advertising technology company founded in 2006 to provide an intelligent audience solution for brands, agencies, and publishers to know and grow audiences online. Headquartered in San Francisco, it has 18 locations around the world.

Benefits of AWS

  • Achieved a 30% improvement in query time on Kamke
  • Runs four to five million requests per second at peak, completing transactions in 10–120 ms
  • Reduced latency
  • Improved network performance
  • Reduced costs for running Kamke by 20%
  • Completes a typical word cloud query in about 1 second

AWS Services Used

AWS Graviton processor

AWS Graviton processors are custom built by Amazon Web Services using 64-bit Arm Neoverse cores to deliver the best price performance for your cloud workloads running in Amazon EC2.

Learn more »

Amazon Corretto

Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK).

Learn more »

Amazon EC2 R6g Instances

Amazon EC2 R6g instances are powered by Arm-based AWS Graviton2 processors. They deliver up to 40% better price performance over current generation R5 instances and are ideal for running memory-intensive workloads such as open-source databases, in-memory caches, and real-time big data analytics.

Learn more »

Amazon EC2 C6g Instances

Amazon EC2 C6g instances are powered by Arm-based AWS Graviton2 processors. They deliver up to 40% better price performance over C5 instances and are ideal for running advanced compute-intensive workloads.

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.