<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Building GoPanda]]></title><description><![CDATA[Building GoPanda]]></description><link>https://gopanda.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 29 Nov 2026 20:22:48 GMT</lastBuildDate><atom:link href="https://gopanda.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[From Azure VM to Azure Container Apps: How We Reduced Hosting Costs by 70% Without Rewriting Our FastAPI Backend]]></title><description><![CDATA[A few weeks ago, a routine Azure billing email made me take a closer look at our infrastructure. At GoPanda ( we're still an early-stage startup. Our…]]></description><link>https://gopanda.hashnode.dev/from-azure-vm-to-azure-container-apps-how-we-reduced-hosting-costs-by-70-without-rewriting-our-fastapi-backend</link><guid isPermaLink="true">https://gopanda.hashnode.dev/from-azure-vm-to-azure-container-apps-how-we-reduced-hosting-costs-by-70-without-rewriting-our-fastapi-backend</guid><category><![CDATA[Devops]]></category><category><![CDATA[backend]]></category><dc:creator><![CDATA[Humayun]]></dc:creator><pubDate>Mon, 08 Jun 2026 13:14:02 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a26bc26d99c7df194cf386f/0414ff87-6f96-48d2-bd4a-8623079c1c49.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A few weeks ago, a routine Azure billing email made me take a closer look at our infrastructure.</p>
<p>At GoPanda (<a href="https://gopanda.in">https://gopanda.in</a>), we're still an early-stage startup. Our traffic is relatively low, and our FastAPI backend was comfortably running on an Azure Virtual Machine.</p>
<p>The setup worked.</p>
<p>The problem was that the VM cost the same whether we received 10 requests a day or 10,000.</p>
<p>We were paying for uptime, not usage.</p>
<p>That realization led me down a rabbit hole that eventually ended with a complete migration from Azure Virtual Machines to Azure Container Apps (ACA).</p>
<p>What started as a cost optimization exercise ended up being a great lesson in modern cloud infrastructure.</p>
<h2>The Original Architecture</h2>
<p>Our backend stack was fairly straightforward:</p>
<ul>
<li><p>FastAPI</p>
</li>
<li><p>Docker</p>
</li>
<li><p>Azure Virtual Machine</p>
</li>
<li><p>GitHub Actions for deployments</p>
</li>
</ul>
<p>The application itself was already containerized, so deployment wasn't particularly difficult.</p>
<p>However, the VM came with a few drawbacks:</p>
<ul>
<li><p>Fixed monthly cost</p>
</li>
<li><p>OS maintenance and patching</p>
</li>
<li><p>Paying for idle compute</p>
</li>
<li><p>Manual capacity planning</p>
</li>
<li><p>Infrastructure tightly coupled to a specific machine</p>
</li>
</ul>
<p>For a startup still validating and growing its product, these tradeoffs didn't feel ideal.</p>
<h2>Why Azure Container Apps?</h2>
<p>Initially, I evaluated several options:</p>
<ul>
<li><p>Continue using Azure VM</p>
</li>
<li><p>Move to Azure Functions</p>
</li>
<li><p>Use Azure Kubernetes Service (AKS)</p>
</li>
<li><p>Use Azure Container Apps</p>
</li>
</ul>
<p>Azure Container Apps ended up being the most practical choice.</p>
<p>The simplest way I can describe ACA is:</p>
<blockquote>
<p>Kubernetes without having to manage Kubernetes.</p>
</blockquote>
<p>Azure handles:</p>
<ul>
<li><p>Cluster management</p>
</li>
<li><p>Networking</p>
</li>
<li><p>Ingress</p>
</li>
<li><p>Scaling</p>
</li>
<li><p>Control plane operations</p>
</li>
</ul>
<p>Meanwhile, developers focus on:</p>
<ul>
<li><p>Containers</p>
</li>
<li><p>Deployments</p>
</li>
<li><p>Application logic</p>
</li>
</ul>
<p>You still get features such as:</p>
<ul>
<li><p>Revision-based deployments</p>
</li>
<li><p>Autoscaling</p>
</li>
<li><p>Traffic splitting</p>
</li>
<li><p>Service discovery</p>
</li>
<li><p>Managed ingress</p>
</li>
</ul>
<p>Without operating a Kubernetes cluster yourself.</p>
<p>For small teams, that's a very attractive tradeoff.</p>
<h2>Why We Didn't Choose Azure Functions</h2>
<p>This was the most obvious alternative.</p>
<p>After all, if the goal is lower costs and serverless infrastructure, Azure Functions seems like the natural choice.</p>
<p>The problem was that our backend is a traditional FastAPI application.</p>
<p>It relies on:</p>
<ul>
<li><p>Routing</p>
</li>
<li><p>Middleware</p>
</li>
<li><p>Authentication</p>
</li>
<li><p>Long-lived API patterns</p>
</li>
</ul>
<p>Moving to Functions would have meant adapting the application around a different execution model.</p>
<p>Our objective wasn't to become serverless at the code level.</p>
<p>Our objective was to become serverless at the infrastructure level.</p>
<p>Azure Container Apps allowed us to keep the existing architecture largely unchanged while gaining:</p>
<ul>
<li><p>Managed infrastructure</p>
</li>
<li><p>Autoscaling</p>
</li>
<li><p>Better cost efficiency</p>
</li>
<li><p>Container portability</p>
</li>
</ul>
<p>Most importantly, our deployment artifact remains a standard Docker image.</p>
<h2>Challenges During Migration</h2>
<h3>1. Azure Student Subscription Restrictions</h3>
<p>One challenge I wasn't expecting involved Azure Student subscription limitations.</p>
<p>Azure Container Registry cloud builds (<code>az acr build</code>) were unavailable in our subscription.</p>
<p>Instead, we built images locally and pushed them directly to Azure Container Registry.</p>
<p>Not a major issue, but definitely something to be aware of.</p>
<h3>2. Apple Silicon Architecture Mismatch</h3>
<p>This consumed more time than I'd like to admit.</p>
<p>I was building Docker images on an M-series MacBook.</p>
<p>By default, Docker generated ARM64 images.</p>
<p>Azure Container Apps expected AMD64 images.</p>
<p>The fix was surprisingly simple:</p>
<pre><code class="language-bash">docker build --platform linux/amd64 .
</code></pre>
<p>A one-line change solved the deployment failures.</p>
<h3>3. Configuration Management</h3>
<p>The VM-based deployment relied heavily on server-side <code>.env</code> files.</p>
<p>Moving to ACA encouraged a cleaner approach:</p>
<ul>
<li><p>Environment variables</p>
</li>
<li><p>Managed secrets</p>
</li>
<li><p>Stateless deployments</p>
</li>
</ul>
<p>This made the application easier to deploy and reproduce across environments.</p>
<h3>4. Updating CI/CD</h3>
<p>We already had GitHub Actions in place.</p>
<p>However, the workflow needed to be adapted for Azure Container Apps.</p>
<p>The deployment flow now looks like this:</p>
<pre><code class="language-text">GitHub Push
    ↓
Build Docker Image
    ↓
Push to Azure Container Registry
    ↓
Deploy New ACA Revision
</code></pre>
<p>This significantly simplified production deployments.</p>
<h2>Results</h2>
<p>After the migration, we now have:</p>
<ul>
<li><p>Infrastructure that scales based on actual demand</p>
</li>
<li><p>Revision-based deployments</p>
</li>
<li><p>Managed HTTPS ingress</p>
</li>
<li><p>No VM maintenance</p>
</li>
<li><p>No OS patching</p>
</li>
<li><p>Cleaner configuration management</p>
</li>
<li><p>Portable containerized deployments</p>
</li>
</ul>
<p>And as a side effect:</p>
<p><strong>Our monthly hosting costs dropped by more than 70%.</strong></p>
<h2>Final Thoughts</h2>
<p>The most interesting takeaway from this migration is that cloud-native infrastructure isn't only useful when you're operating at massive scale.</p>
<p>For early-stage startups, it can be equally valuable before scale.</p>
<p>At this stage, my biggest constraint isn't server capacity.</p>
<p>It's time.</p>
<p>Every hour spent maintaining infrastructure is an hour not spent improving the product or talking to users.</p>
<p>Azure Container Apps helped reduce that operational burden while lowering costs at the same time.</p>
<p>For our current stage, it turned out to be a better fit than both a traditional VM and Azure Functions.</p>
<p>If you're building a containerized application and don't want the operational overhead of managing Kubernetes, ACA is definitely worth exploring.</p>
<p>You can check out what we're building at GoPanda:</p>
<p><a href="https://gopanda.in">https://gopanda.in</a></p>
]]></content:encoded></item></channel></rss>