Zoom, Spotify and others slashed their cloud costs by millions - how did they do it?
Tags: kubernetes, aws, devops, cloud
Published: 2021-06-17 14:20:02

<!-- wp:paragraph -->
<p><strong>In Q1 2021, </strong><a href="https://www.cnbc.com/2021/06/01/zoom-zm-earnings-q1-2022.html"><strong>Zoom reported</strong></a><strong> that its gross margin widened to 73.9% from 69.4% in the previous quarter - primarily thanks to the optimization of public cloud resources.</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>And Zoom is certainly not the only company that realized the value of optimizing the cloud infrastructure.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>As businesses migrate their workloads to the cloud and build cloud-native applications, they’re starting to realize that overprovisioning and cloud sprawl aren’t just urban legends.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For startups, the cloud is an essential technology because of its unparalleled support for scalability. But the cloud may quickly turn into a struggle because of growing costs.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Here's what <a href="https://a16z.com/2021/05/27/cost-of-cloud-paradox-market-cap-cloud-lifecycle-scale-growth-repatriation-optimization/">a16z</a> wrote in a recent analysis:</p>
<!-- /wp:paragraph -->

<!-- wp:quote {"className":"is-style-large"} -->
<blockquote class="wp-block-quote is-style-large"><p>“[...] across 50 of the top public software companies currently utilizing cloud infrastructure, an estimated<strong> $100B of market value </strong>is being lost among them due to cloud impact on margins — relative to running the infrastructure themselves.”</p></blockquote>
<!-- /wp:quote -->

<!-- wp:paragraph -->
<p>How can companies deal with the long-term cost implications of the cloud? Cloud cost optimization is the best answer.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>3 companies that optimized their cloud costs</h2>
<!-- /wp:heading -->

<!-- wp:heading -->
<h2>1. Spotify developed a cost allocation tool to save millions of dollars</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Service ownership is a key problem in taming cloud costs. Tracking the teams’ responsibility for the cloud bill and keeping costs down is a pain.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>To handle this, <strong>Spotify developed a homegrown solution called <a href="https://redmonk.com/jgovernor/2021/04/28/shifting-cost-optimisation-left-spotify-backstage-cost-insights/">Cost Insights</a></strong> that tracks the company’s cloud expenses. By doing that, Spotify allows engineers to take ownership of cloud spend&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Spotify also helps its developers by <strong>providing suggestions about optimization strategies</strong> like <a href="https://cast.ai/blog/guide-to-kubernetes-autoscaling-for-cloud-cost-optimization/" target="_blank" rel="noreferrer noopener">autoscaling</a> solutions within the portal. The internal crowdsourced document called Our Cookbook allows engineers to submit insights on what has worked for them in terms of system optimizations to help other teams.</p>
<!-- /wp:paragraph -->

<!-- wp:quote {"className":"is-style-large"} -->
<blockquote class="wp-block-quote is-style-large"><p>Soon enough, developers started to treat cost optimization like a game - bragging about their victories and motivating other teams to play as well. Spotify is planning to add a leaderboard functionality to play on these social and competitive components of cost control.</p></blockquote>
<!-- /wp:quote -->

<!-- wp:paragraph -->
<p><strong>Result? Spotify reduced its annual cloud spend by millions of dollars.</strong> All thanks to helping engineers to make smarter decisions about resource allocation.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>2. Segment optimized its infra and increased margin by 20%</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Segment managed to<strong> reduce its infrastructure costs by 30% despite increasing traffic volume by 25%</strong>, all within six months.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>How come? It was all thanks to incremental optimization of infrastructure decisions.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Here’s one example:&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Segment has an internal validation service written in Node.js that validates incoming messages to ensure that they meet their message format.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The team ran the service in containers with one full vCPU and 4GB of memory allocated to each. To publish 200,000 messages per second, Segment needed 800 of these containers, as each container processed 250 messages per second.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The service still gets the same allocation, but the team rewrote and optimized the logic.</p>
<!-- /wp:paragraph -->

<!-- wp:quote {"className":"is-style-large"} -->
<blockquote class="wp-block-quote is-style-large"><p>Result? Today, Segment processes 220,000 messages per second across only 340 containers. The throughput per container more than doubled to reach almost 650 messages per second, allowing Segment to cut its expenses for this component in half.&nbsp;</p></blockquote>
<!-- /wp:quote -->

<!-- wp:paragraph -->
<p>BTW. Segment is no stranger to cloud cost optimization. The team shared <a href="https://segment.com/blog/the-million-dollar-eng-problem/">another great story</a> on their blog on how they handled rapidly growing cloud costs and trimmed their AWS bill by $1 million annually.&nbsp;</p>

{% twitter 1343754367267205121 %}

<!-- wp:heading -->
<h2>3. La Fourche moved to different VMs and saved 69.9%&nbsp;</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The online grocery store La Fourche was running its containers on Amazon Elastic Kubernetes Service (EKS) and soon saw the cloud bill rise from $1,000 to $10,000. This is when the company’s CTO decided that optimization can’t wait. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If La Fourche waited any longer, it might have become the next victim to the never-ending cycle of growing cloud bills and long-term savings plans.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>La Fourche started by analyzing the cloud bill in detail. The company turned to the <a href="https://cast.ai/eks-optimizer/">CAST AI Savings Report</a> and ran an agent in read-only mode over their EKS infrastructure. The Savings Report showed that moving to different virtual machines would help to slash costs by a lot.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Beforehand, La Fourche was using 15 t3.2xlarge and 2 t3.xlarge instances. At the time of running, the analysis generated the cost of $4,349.95. </p>
<!-- /wp:paragraph -->

<!-- wp:quote {"className":"is-style-large"} -->
<blockquote class="wp-block-quote is-style-large"><p><strong>Moving these workloads to 5 c5a.2xlarge instances instead would reduce by a smashing 69.9% ($1,310.40). Next month, La Fourche got a bill that was lower by $3,000.</strong></p></blockquote>
<!-- /wp:quote -->

<!-- wp:heading -->
<h2>Over to you</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The latest edition of the State of the Cloud Report revealed that<strong> 61% of organizations are planning to optimize their use of cloud resources</strong> in search of cost savings. Cloud cost optimization is the top initiative for the fifth year in a row.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Reducing cloud costs can make a dramatic impact on a company’s bottom line. The examples we shared above clearly show that infrastructure costs depend on a team’s ability to provision just what it needs.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Cloud cost optimization is the low-hanging fruit here - it allows staying in the cloud, but for half of the cost.&nbsp;</strong></p>
<!-- /wp:paragraph -->