Case Study

Holy cow! CattleEye reduces EC2 cost by over 60% with Spot Scaling

Client
cattleeye-green
CattleEye
Industries
Agriculture
Technologies
EC2, Sagemaker
Region
EMEA, UKI
Country
United Kingdom

Meet CattleEye

Livestock platform partners with DoiT to scale its business, not its costs

CattleEye is the world’s first hardware-independent autonomous livestock monitoring platform. Providing daily mobility and body condition scores for cows, CattleEye helps farmers manage the health and welfare of their herd. The service is valuable – CattleEye has been proven to save their customers up to $420 per cow per year in management costs. And against an annual cost of $500 to $1000 per cow per year, this represents a meaningful savings for a cattle farmer.

The challenge

Running inference pipelines on AWS Batch, CattleEye applies computer vision technology to off-the-shelf cameras, monitoring cows and analyzing footage to improve the welfare of over a million cows. But real-time analysis of cows is a compute-intensive job, and AWS EC2 drives the majority of CattleEye’s costs. 

As their customer base grew, they saw AWS compute costs triple in a matter of a few months. These costs are complicated by the organization’s irregular demands for compute capacity. Videos tend to come in batches at the end of a defined window for each farm (ex. 9am-1pm), and are processed as they arrive, so they can be running on 100+ machines at a time. But the defined windows aren’t evenly distributed throughout the day. CattleEye was also looking to run inference compute on the edge via AWS Panorama, making future capacity needs unknown. 

Together, these business needs made purchasing AWS Savings Plans (SPs) or Reserved Instances (RIs) impractical. Clearly, the market presented lots of opportunity, and CattleEye needed to grow if they wanted to capture it. But growth meant a need for additional funding and partner programs like the AWS ISV Accelerate Program through AWS’s Foundational Technical Review (FTR) – and getting more funding meant that CattleEye needed to wrangle its costs. 

Managing cloud costs was the responsibility of CattleEye engineering leader Mike McFarland. Like many in his role, McFarland knew that CattleEye was overspending on their cloud, but he couldn’t identify specific cost drivers. To do so, he knew he would need granular visibility into spend – from projects to cost centers to usage spikes. And he needed the ability to share these views and insights with his key stakeholders like the CEO and customer success team. 

Initially, McFarland considered AWS Spot before the solution presented significant technical restrictions. 

“We initially ran our inference pipelines on GPU instances, but weren’t able to leverage Spot as much as we would’ve liked. And researching other instances we could run on that would allow us to use Spot more frequently was time consuming.”

The solution

CattleEye has been familiar with DoiT International since they launched their first version of the livestock monitoring platform. Given this history, McFarland knew he could leverage DoiT’s consulting and cloud management technologies to reduce compute costs and complete their Foundational Technical Review.

First, CattleEye turned to DoiT Spot Scaling, which manages the instance composition of their Auto Scaling Groups (ASGs) so they could better adopt Spot instances. Initially relying solely on on-demand instances, now their batch processing runs 100% on Spot instances – and CattleEye is saving big as a result. 

“We use Spot Scaling for running our batch processing, and we’ve saved between 50% – 60% compared to on-demand by benefiting from Spot Scaling’s instance recommendations.”

EC2 cost

With costs better managed, McFarland set out to help his internal stakeholders to better understand and visualize their cloud costs. For this, he leveraged DoiT’s Cloud Analytics Reports and Attributions. Using Attributions, CattleEye grouped cloud resource costs into “buckets” that represented different cost centers (production, dev, data science, etc.). With these “buckets”, they could build reports and use them as a Grafana data source to unify cloud and observability costs in a single dashboard. Finally, internal stakeholders had a view and understanding of the costs of their work!

aws-ec2

Finally, McFarland was ready to put these new reports and insights into practice. Like many engineering leads, however, he had a small team that was already focused on developing and supporting their own products. Instead of leaning on his own in-house engineers, McFarland and CattleEye were able to leverage DoiT’s Senior Solutions Architects to prepare for their Foundational Technical Review (FTR). Together, McFarland and the DoiT team underwent a Well-Architected Review to validate some architecture decisions made ahead of the FTR.

“DoiT’s Solutions Architects have been an invaluable resource, particularly in helping us navigate and prepare for the AWS Foundation Technical Review. We are a start-up with a small team, so DoiT’s inside knowledge of the processes allowed us to focus our efforts in the right places. This saves us time and minimizes distractions from building our product.” 

The results have been impactful to this small, growing innovator. CattleEye has expanded its sales channels, secured AWS funding for additional deployments, and added credibility to their product with the “Reviewed by AWS” badge.

The result

  • Cut on-demand EC2 costs by over 60% with Spot Scaling
  • Converted 100% of batch processing to run on AWS Spot
  • Secured additional sales channels and funding through the AWS Foundational Technical Review (FTR)

Mike McFarland, Lead Software Engineer, CattleEye
“We use Spot Scaling for running our Batch Processing and have saved between 50% – 60% compared to on-demand by benefiting from Spot Scaling instance recommendations. The on-boarding process was easy and intuitive.”

Learn more about how DoiT can help you

Latest case studies

Schedule a call with our team

You will receive a calendar invite to the email address provided below for a 15-minute call with one of our team members to discuss your needs.

You will be presented with date and time options on the next step