Semrush Saves 40% on BigQuery Compute Spend through Automation

Summary

Semrush, a leading global platform for digital marketing intelligence, achieved a 40% reduction in its BigQuery compute spend by implementing Alvin’s autonomous optimization agent. Alvin’s agent dynamically routes each query to the most cost-effective billing model and tunes reservations to maximize efficiency and performance, all in real-time. The outcome for Semrush was improved spend predictability and consistency without being tied to long-term capacity commitments.

Challenge

Semrush operates high-volume, complex data pipelines that historically relied on BigQuery’s on-demand pricing model. While this model provided the necessary scale, given it is charged per byte scanned it led to a steady increase in costs as data volumes grew due.

The engineering team wanted to reduce spend but was hesitant to move toward multi-year slot commitments, which involve long-term lock-in and can lead to wasted capacity during periods of lower demand. They required a solution that could offer the cost benefits of capacity billing with the total flexibility and elasticity of on-demand spend.

Solution

Semrush integrated Alvin’s autonomous agent drawn by the service’s ability to offer immediate value with minimal engineering overhead. With the flip of a switch, Alvin started operating across Semrush’s custom data environment consisting of both data pipelines and customer facing product features, written mainly in Go and Python. The agent operates as a proxy between Semrush's data architecture and the BigQuery API, intercepting and optimizing every query in milliseconds. 

  • Dynamic Query Routing: Alvin fingerprints every query to analyze historical slot usage and bytes processed, assigning it to the most cost-effective pricing model - either on-demand or capacity - in real-time.
  • Automated Reservation Management: The agent automatically manages BigQuery reservation capacity at the second level to optimize resource allocation and reduce periods of wasted slot consumption.
  • No-Risk Model: Alvin utilizes a performance-based pricing model, only taking a share of the realized savings, ensuring a guaranteed positive ROI.

Results

  • 40% reduction in total BigQuery query costs in POC period.
  • Increased predictability of daily spend by smoothing out spikes through reservation routing.
  • Zero lock-in, maintaining the ability to scale up or down perfectly to meet demand.
  • Millisecond latency overhead, ensuring no impact on the performance of mission-critical pipelines.
"Alvin's service is hard to ignore when your BigQuery bill starts giving you headaches. Not only did we reduce our monthly costs by 40%, but it also allowed us to auto-scale our slot usage and stop thinking about how to manage on-demand vs. capacity-based pricing models. This saves us valuable developer hours and lets us focus on our core product."

Ben Barten, Engineering Manager at Semrush

Billing Model Optimization

Alvin continuously analyzes every query executed by Semrush, identifies the optimal billing SKU, and executes the query using the most cost-effective model.

  • For compute-heavy queries, on-demand billing is utilized so Semrush only pays for bytes scanned rather than the higher cost of reserved slots.
  • For scan-heavy queries, capacity billing is used, neutralizing the cost of scanning large datasets.

Ready to Optimize Your Data Spend?

Discover how Alvin can transform your cloud data costs. Schedule a personalized demo or run a free savings analysis to quantify your potential outcomes and see immediate value.

Company Size
1001-5000
Industry
MarTech
Region
AMER
Query Sources
Go
Python

Cut your BigQuery spend with no code changes

Automated optimization with zero ongoing effort.
Run Savings Report