The Company

Hiya is trusted by global businesses, carriers and consumers to provide secure, engaging connections and stop unwanted calls. Built on the world's leading Voice Performance Platform, Hiya connects businesses with their customers, helps carriers secure their networks, and protects people from spam and fraud calls.

Why is DynamoDB Optimization Hard?

Given the sophisticated fraud landscape of phone scams and spam calls, Hiya utilizes AWS's DynamoDB to find and track patterns of fraudulent behavior. Similar to other AWS services, cost-saving mechanisms are provided by AWS specifically for DynamoDB in the form of Reserved Read or Write Capacity Units, providing up to a 73% discount to on demand pricing! But how do you decide how many units to commit to?

Hiya’s daily usage exhibits both daily and weekly seasonality: it goes up during the day and down at night, and weekdays have relatively higher usage than weekends. This is a typical pattern for many businesses, but it presents a problem when it comes to reserving units. If your usage were perfectly constant, you could simply reserve exactly what you use. But variance in usage puts you in a bind between two kinds of waste: when the usage line goes above the reservation line, you pay for On-Demand, which is expensive, but when it dips below the reservation line your reserved units go to waste.

Cloud Cost Management from Spreadsheet to Automation

Meticulously designed spreadsheets were Hiya's main cloud cost management tool. In many ways, this was a good solution; it allowed them to choose a sensible number of units to reserve and start saving money. Many organizations don’t take advantage of reservations at all and end up paying way too much for On-Demand.

But the spreadsheets needed to be manually updated every time Hiya wanted to make a new reservation and it was difficult to tell if the final decision was really optimal. It’s difficult to track calculations through formulas in various spreadsheet cells. This meant they had to spend a lot of time worrying about AWS cost optimization, which they’d rather spend focusing on their infrastructure.

Automated Cost Optimization

At its heart, this problem is parallel to the cost optimization problem already solves with reservations for EC2, Databases, and others: How do you get the best possible deal for the services you use? Explicit calculations to find the “waste” from unused reservations aren’t necessary, you simply need to calculate the total cost you’ll end up paying for your DynamoDB usage (reservation cost + on demand cost).

This approach, combined with automated pulls of usage data, allowed us to calculate an optimal reservation level based on their historical usage patterns.

With the spreadsheet solution, they had to simplify the problem by looking at reservation amounts in increments of 5,000. By moving from spreadsheets to code as a cost management tool, we made it easy to dial in on a more granular solution, as well as creating a provably optimal process that can be replicated for future purchases.

By reserving the optimal number of units, they project to save over 20% compared to On-Demand.

Learn more about DynamoDB and Cloud Optimization

Subscribe to our newsletter to keep up to date on the latest trends in cost management and cloud optimization or visit our website to learn more.

Subscribe to our Newsletter