<?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[Your AWS Bill Is the Wrong Metric: How to Calculate Cloud Cost per Customer]]></title><description><![CDATA[Stop tracking your total AWS bill. Here’s a 6-step method, formulas and a worked example for calculating cloud cost per customer and per pricing tier.]]></description><link>https://889.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Tue, 24 Nov 2026 12:36:24 GMT</lastBuildDate><atom:link href="https://889.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Vibe-Coded App Security Checklist: 8 Risks to Check, in Order]]></title><description><![CDATA[A risk-first security checklist for vibe-coded apps built with Lovable, Cursor, Bolt or Replit: secrets, auth, backups, monitoring, GDPR — in order.]]></description><link>https://889.hashnode.dev/vibe-coded-app-security-checklist-8-risks-to-check-in-order</link><guid isPermaLink="true">https://889.hashnode.dev/vibe-coded-app-security-checklist-8-risks-to-check-in-order</guid><category><![CDATA[vibe coding]]></category><category><![CDATA[vibecoding]]></category><category><![CDATA[Security]]></category><category><![CDATA[AI]]></category><category><![CDATA[Startups]]></category><category><![CDATA[webdev]]></category><dc:creator><![CDATA[Natali]]></dc:creator><pubDate>Thu, 19 Nov 2026 11:23:10 GMT</pubDate><content:encoded><![CDATA[<p>If you shipped an MVP with Lovable, Cursor, Bolt, Replit or Claude Code, you probably went from idea to real users in weeks. That speed is the whole point of vibe coding, a term Andrej Karpathy coined in early 2025. The catch: AI tools optimise for "it works in the demo", not for "it's safe to run in production".</p>
<p>The extreme version of that gap made headlines in July 2025, when an AI coding agent deleted a live production database during an explicit code freeze on a high-profile founder's project. The everyday version is quieter: a key in the browser bundle, a database that lets one user read another user's rows, backups nobody ever switched on.</p>
<p>This post is the engineer-to-engineer version of our risk-first checklist for 1–5 person teams. No scaling advice, no enterprise process. Just what to check, in what order, and what you can fix yourself for free.</p>
<h2>TL;DR</h2>
<ul>
<li>Check risks in this order: <strong>secrets and auth → backups → monitoring → documentation → cost → privacy → scalability → investor readiness</strong>.</li>
<li>Six fixes cost nothing: rotate exposed keys, turn on host backups, add an uptime monitor, add an error tracker, enable 2FA everywhere, publish a privacy policy and terms.</li>
<li>Don't pay for scale before traction. Do get one independent review before you call the app production-ready.</li>
</ul>
<h2>Why vibe-coded apps fail differently</h2>
<p>AI-generated code is usually fine on the happy path. What it skips is everything that never shows up in a demo: access rules, secret handling, backups, alerting, documentation. As our CTO Roman Burdiuzha puts it: <em>"Your problem is the Supabase key sitting in the browser bundle."</em></p>
<p>So we don't start with code quality or architecture. We start with the risks that are both likely and expensive.</p>
<h2>The risk priority list</h2>
<table>
<thead>
<tr>
<th>#</th>
<th>Risk</th>
<th>Likelihood × impact</th>
<th>Fix it yourself for free?</th>
</tr>
</thead>
<tbody><tr>
<td>1</td>
<td>Exposed secrets and broken auth</td>
<td>High × High</td>
<td>Partly: you can rotate keys, but hidden exposures need a real scan</td>
</tr>
<tr>
<td>2</td>
<td>No backups</td>
<td>Med-high × Catastrophic</td>
<td>Mostly: usually a one-click toggle</td>
</tr>
<tr>
<td>3</td>
<td>No monitoring</td>
<td>High × Medium</td>
<td>Yes, with free tools</td>
</tr>
<tr>
<td>4</td>
<td>Fragile, undocumented codebase</td>
<td>Medium</td>
<td>Partly: founders miss their own blind spots</td>
</tr>
<tr>
<td>5</td>
<td>Cost and performance</td>
<td>Low now, rises with growth</td>
<td>Rarely: problems hide until the bill arrives</td>
</tr>
<tr>
<td>6</td>
<td>Privacy and compliance</td>
<td>Situational; high for health, finance or EU users</td>
<td>Mostly with a template, not for sensitive data</td>
</tr>
<tr>
<td>7</td>
<td>Scalability</td>
<td>Low before traction</td>
<td>Not applicable: defer it</td>
</tr>
<tr>
<td>8</td>
<td>Investor / acquisition readiness</td>
<td>Situational</td>
<td>No: build it before the ask</td>
</tr>
</tbody></table>
<h2>1. Exposed secrets and broken authentication</h2>
<p>This is the biggest risk in most AI-built apps. Keys leak from four places:</p>
<ul>
<li>client-side code (anything shipped to the browser)</li>
<li>public repos, <strong>including old commits</strong></li>
<li>preview deployments</li>
<li>AI chat logs where you pasted a key "just to debug"</li>
</ul>
<p>If a key ever touched any of these, treat it as exposed and rotate it. Then move secrets into server-side environment variables and scan both your full git history and your live bundles.</p>
<pre><code class="language-bash"># Illustrative example: adapt to your stack and tooling
# 1. Scan the full git history, not just the current HEAD
gitleaks detect --source . --log-opts="--all"

# 2. Build, then grep the client output for anything secret-shaped
npm run build
grep -rEn "(sk_live_|service_role|SECRET|PRIVATE_KEY)" dist/ .next/static/ 2&gt;/dev/null
</code></pre>
<p>Auth is the other half. AI tools often skip row-level security, so confirm your database <strong>denies access by default</strong> and only opens up per user:</p>
<pre><code class="language-sql">-- Illustrative: deny-by-default with per-user access (Postgres / Supabase-style)
alter table public.invoices enable row level security;

create policy "owner can read own invoices"
  on public.invoices for select
  using (auth.uid() = user_id);
</code></pre>
<p>Then test it the way an attacker would: log in as user A and request user B's record by ID. Do the same for API routes and anything under <code>/admin</code>.</p>
<h2>2. Backups: the mistake with no undo</h2>
<p>Assume backups are <strong>off</strong> until you have personally verified them. Supabase, Railway, Render and Neon all offer backups, often free or for a few dollars a month.</p>
<p>Turning them on is only half the job. Run a restore drill:</p>
<ol>
<li>Restore the latest backup into a <strong>separate</strong> project.</li>
<li>Time how long it takes.</li>
<li>Write down the steps so someone else can repeat them at 3 a.m.</li>
</ol>
<p>An untested backup is only a hope.</p>
<h2>3. Monitoring: don't find out from angry users</h2>
<p>If your outage alarm is a support email, you have no monitoring. Two free-tier tools cover most of it:</p>
<ul>
<li><strong>Uptime:</strong> UptimeRobot or Better Stack</li>
<li><strong>Errors:</strong> Sentry</li>
</ul>
<p>The detail people miss: make sure alerts reach a phone someone actually checks. When you outgrow free tiers, <a href="https://gartsolutions.com/services/sre/it-monitoring/">proper IT monitoring and alerting</a> becomes part of <a href="https://gartsolutions.com/software-reliability/">software reliability</a> in general, not a side task.</p>
<h2>4. A fragile, undocumented codebase</h2>
<p>The test is simple: can someone explain how the app works without reading the code live? If the answer is "only the AI that wrote it", you have a handoff problem waiting for your first engineering hire.</p>
<p>A one-page system map goes a long way:</p>
<pre><code class="language-markdown">&lt;!-- Illustrative template --&gt;
# System map
- Frontend: framework, where it's hosted, how it deploys
- Backend / API: routes, auth method, where it runs
- Database: provider, schema owner, backup status, last restore test
- Secrets: where they live, who can rotate them
- External services: payments, email, LLM APIs (+ who owns each account)
- Known weird parts: "don't touch X because Y"
</code></pre>
<p>If the code itself is the mess, we wrote up how to approach <a href="https://gartsolutions.com/vibe-coding-cleanup/">cleaning up an AI-built codebase</a> step by step.</p>
<h2>5. Cost and performance landmines</h2>
<p>Low risk on day one, but it grows with every user. Three patterns account for most surprises:</p>
<ul>
<li>queries that fetch whole tables when you need one row</li>
<li>missing caching</li>
<li>paid API calls inside loops</li>
</ul>
<pre><code class="language-ts">// Illustrative anti-pattern: fetch everything, filter in JS
const { data } = await db.from("orders").select("*");
const order = data.find((o) =&gt; o.id === id);

// Better: let the database do the work
const { data: order } = await db
  .from("orders")
  .select("id,status,total")
  .eq("id", id)
  .single();
</code></pre>
<p>Review these before a launch, a PR push or a paid campaign. Free tiers turn into real bills faster than you expect.</p>
<h2>6. Data privacy and compliance blind spots</h2>
<p>GDPR applies if you collect personal data from people in the EU, even just email addresses, wherever your company is based. For generic SaaS, a template privacy policy plus a consent flow covers most of it.</p>
<p>Health, fintech or EU-heavy products are different: they need a proper review. If you're in that bucket, look at a dedicated <a href="https://gartsolutions.com/services/it-audit-services/compliance-audit/">compliance audit</a> before enterprise customers or regulators ask.</p>
<h2>7. Scalability: defer it</h2>
<p>Before traction this is almost always the wrong thing to optimise. Revisit it when traffic or infrastructure costs climb month over month.</p>
<h2>8. Investor and acquisition readiness</h2>
<p>Technical due diligence will ask about security posture, architecture, code ownership and data handling. You can't put that together in the week the raise starts, so start as soon as a round or acquisition becomes real.</p>
<h2>The six free fixes (do these today)</h2>
<ol>
<li><strong>Rotate exposed credentials.</strong> Anything that touched client code, a public repo or an AI chat log. About 30 minutes if you know where to look.</li>
<li><strong>Turn on host backups.</strong> Check your Supabase, Railway, Render or Neon settings.</li>
<li><strong>Set up an uptime monitor.</strong> UptimeRobot or Better Stack free tier.</li>
<li><strong>Add an error tracker.</strong> Sentry free tier.</li>
<li><strong>Enable 2FA everywhere.</strong> Hosting, domain registrar, payment processor, GitHub.</li>
<li><strong>Publish a privacy policy and terms.</strong> Free templates are fine, even pre-revenue, if you collect any user data.</li>
</ol>
<h2>Map your situation to a first move</h2>
<table>
<thead>
<tr>
<th>Your situation</th>
<th>First move</th>
</tr>
</thead>
<tbody><tr>
<td>Non-technical founder, Lovable/v0/Replit MVP, real users</td>
<td>Free self-check, then an independent risk scan before calling it production-ready</td>
</tr>
<tr>
<td>Technical co-founder used Cursor or Claude Code and lost track of the code</td>
<td>Write handoff documentation</td>
</tr>
<tr>
<td>A user reports seeing someone else's data</td>
<td>Emergency stabilisation, immediately</td>
</tr>
<tr>
<td>First real payments</td>
<td>Secrets and auth first, then a privacy/compliance screen</td>
</tr>
<tr>
<td>Raising pre-seed or seed</td>
<td>Risk scan now; full investor readiness once the raise is real</td>
</tr>
<tr>
<td>Hiring your first engineer</td>
<td>Handoff documentation</td>
</tr>
<tr>
<td>Usage spike (launch, press, viral post)</td>
<td>Cost and query check; scale review if growth continues</td>
</tr>
<tr>
<td>Production broke and nobody knows why</td>
<td>Emergency stabilisation</td>
</tr>
</tbody></table>
<h2>DIY vs. bringing in help</h2>
<p>Our rule of thumb: <strong>do it yourself when the fix is a toggle. Get help when you don't know what you don't know.</strong></p>
<p>Rotating keys, enabling backups and adding Sentry are toggles. Finding the key that leaked through a preview deployment eight commits ago, or proving your access rules hold across every route, usually isn't. That's where an independent <a href="https://gartsolutions.com/services/it-audit-services/">IT audit team</a> earns its fee.</p>
<p>If you're building the next app and want to avoid half of this list from the start, see our <a href="https://gartsolutions.com/vibe-coding-best-practices/">vibe coding best practices, from prompt to production</a>, and the broader take on <a href="https://gartsolutions.com/production-readiness/">production readiness for AI-built apps</a>.</p>
<p>For the complete risk matrix, decision table and FAQ, read <a href="https://gartsolutions.com/vibe-coding-checklist/">the full guide</a> or grab the <a href="https://gartsolutions.com/wp-content/uploads/2026/11/Gart-Vibe-Coded-Whats-Next-Playbook.pdf">Risk-First Playbook PDF</a>.</p>
<hr />
<p>Not sure how much risk is hiding in your AI-built app? <a href="https://gartsolutions.com/contact-us/">Tell us what you've built</a> and we'll point you to the first thing to fix.</p>
<p><em>Written by the team at</em> <a href="https://gartsolutions.com/"><em>Gart Solutions</em></a><em>, a cloud infrastructure and DevOps consultancy.</em></p>
]]></content:encoded></item><item><title><![CDATA[Do You Actually Need Kubernetes? A Practical Docker vs K8s Decision Guide]]></title><description><![CDATA[Docker and Kubernetes solve different problems. When Docker is enough, when you’ve outgrown it, and the middle-ground options in between.]]></description><link>https://889.hashnode.dev/do-you-actually-need-kubernetes-a-practical-docker-vs-k8s-decision-guide</link><guid isPermaLink="true">https://889.hashnode.dev/do-you-actually-need-kubernetes-a-practical-docker-vs-k8s-decision-guide</guid><category><![CDATA[Kubernetes]]></category><category><![CDATA[kubernetes architecture]]></category><category><![CDATA[k8s]]></category><category><![CDATA[Devops]]></category><category><![CDATA[containers]]></category><dc:creator><![CDATA[Natali]]></dc:creator><pubDate>Tue, 17 Nov 2026 16:46:35 GMT</pubDate><content:encoded><![CDATA[<p>"Should we use Docker or Kubernetes?" is one of the most common questions we get from engineering teams. It's also slightly the wrong question, because the two don't compete. They solve different problems.</p>
<p>Here's how we explain the difference to clients at <a href="https://gartsolutions.com/">Gart Solutions</a>, and the checklist we use to decide when Kubernetes is worth its complexity.</p>
<h2>Two different jobs</h2>
<p><strong>Docker packages your application.</strong> A Dockerfile describes the environment; the image is a portable, versioned artifact; the container runs the same way on a laptop, a CI runner or a server. If you're new to the idea, we cover the basics in <a href="https://gartsolutions.com/the-power-of-containerization/">the power of containerization</a>.</p>
<p><strong>Kubernetes runs many containers across many machines.</strong> It handles scheduling, scaling, load balancing, service discovery and self-healing across a cluster.</p>
<p>So the real question is: <em>once your app is containerized, do you need an orchestrator, and if so, which one?</em></p>
<p>One common misconception: Kubernetes doesn't need Docker at runtime. Modern clusters run containers through runtimes like <strong>containerd</strong> or <strong>CRI-O</strong>. You still build images with Docker (or similar tools); the cluster just runs them a different way.</p>
<h2>What Kubernetes adds on top of containers</h2>
<table>
<thead>
<tr>
<th>Capability</th>
<th>Kubernetes</th>
<th>Docker on its own</th>
</tr>
</thead>
<tbody><tr>
<td>Orchestration across nodes</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td>Scaling</td>
<td>Automatic</td>
<td>Manual</td>
</tr>
<tr>
<td>Service discovery</td>
<td>Built-in</td>
<td>Limited</td>
</tr>
<tr>
<td>Load balancing</td>
<td>Built-in Services</td>
<td>External load balancer needed</td>
</tr>
<tr>
<td>Self-healing</td>
<td>Restarts and reschedules failed pods</td>
<td>Restart policies on one host</td>
</tr>
<tr>
<td>Rolling updates and rollbacks</td>
<td>Built-in</td>
<td>Scripted</td>
</tr>
<tr>
<td>Learning curve</td>
<td>Steep</td>
<td>Gentle</td>
</tr>
</tbody></table>
<p>Every row in the Kubernetes column has a cost: cluster infrastructure, upgrades, networking, RBAC, monitoring, and people who understand all of it.</p>
<h2>When Docker alone is enough</h2>
<ul>
<li>A monolith or a handful of services</li>
<li>Traffic you can predict and handle on one or two hosts</li>
<li>A small team with no dedicated platform engineer</li>
<li>A few minutes of downtime during deploys is acceptable</li>
</ul>
<p>In this case, Docker Compose on a well-managed VM, with a pipeline that builds and ships images, is a perfectly professional setup. Invest in solid <a href="https://gartsolutions.com/services/devops/ci-cd-services/">CI/CD</a> before you invest in a cluster.</p>
<h2>Signals you've outgrown it</h2>
<ul>
<li>You run enough services that deploys need coordination</li>
<li>Different services need to scale independently</li>
<li>You need zero-downtime deploys and automatic recovery from node failure</li>
<li>You're hand-writing scripts to do things an orchestrator does natively</li>
<li>You deploy the same stack across several environments, regions or clouds</li>
</ul>
<p>If three or more of these are true, it's time to look at orchestration seriously. Microservices are usually the trigger, so it's worth checking whether you really need them first: <a href="https://gartsolutions.com/monolithic-vs-microservices-do-you-really-need-microservices/">monolithic vs microservices</a>.</p>
<h2>The middle ground most teams skip</h2>
<p>Kubernetes is not the only next step. Before you build a cluster, consider:</p>
<ol>
<li><strong>Managed container services</strong> like AWS ECS/Fargate, Google Cloud Run or Azure Container Apps. You get scaling and health checks without operating a control plane. Which one fits depends on your provider; here's how we think about <a href="https://gartsolutions.com/how-to-choose-cloud-provider-aws-vs-azure-vs-google-cloud/">choosing between AWS, Azure and Google Cloud</a>.</li>
<li><strong>Managed Kubernetes</strong> like EKS, GKE or AKS. The provider runs the control plane; you still own workloads, networking, upgrades and security.</li>
<li><strong>Kubernetes as a service from a partner.</strong> Useful when you need Kubernetes but don't want to hire a platform team first. More on that model in <a href="https://gartsolutions.com/kubernetes-as-a-service-kaas/">Kubernetes as a Service (KaaS)</a>.</li>
</ol>
<p>We compare more options in our guide to <a href="https://gartsolutions.com/best-orchestration-tools/">container orchestration tools</a>. If you're running across several clouds, see <a href="https://gartsolutions.com/mastering-multi-cloud-management/">mastering multi-cloud management</a>.</p>
<h2>A real-world example</h2>
<p>One of our clients in the microchip market needed to manage a large fleet of IoT devices. Containerizing the workloads and running them on Kubernetes gave them portability across environments, better resource utilization, and automated deployment, scaling and monitoring. That's the kind of scale and variability where Kubernetes earns its keep.</p>
<h2>A quick decision checklist</h2>
<p>Answer honestly:</p>
<ul>
<li><input disabled type="checkbox" /> Do we have more than ~5 services that deploy independently?</li>
<li><input disabled type="checkbox" /> Do we need automatic scaling under unpredictable load?</li>
<li><input disabled type="checkbox" /> Is downtime during deploys or node failures unacceptable?</li>
<li><input disabled type="checkbox" /> Do we have (or can we hire or rent) people who can operate a cluster?</li>
<li><input disabled type="checkbox" /> Are we prepared for the extra infrastructure cost of a cluster?</li>
</ul>
<p><strong>Mostly "no":</strong> stay on Docker and Compose, and invest in CI/CD and monitoring. <strong>Mixed:</strong> try a managed container service first. <strong>Mostly "yes":</strong> Kubernetes is likely worth it. Plan the migration rather than lifting everything at once.</p>
<h2>Wrapping up</h2>
<p>Docker and Kubernetes work best together: Docker for building and packaging, Kubernetes for running at scale. The mistake is adopting Kubernetes because it's the default, not because your system needs it.</p>
<p>The full guide, with complete pros-and-cons tables, is on our blog: <a href="https://gartsolutions.com/kubernetes-vs-docker">Kubernetes vs Docker: Comparing Containerization and Orchestration</a>.</p>
<p>Planning a move to Kubernetes? Here's how we approach <a href="https://gartsolutions.com/services/kubernetes/">Kubernetes consulting and migration</a>, or <a href="https://gartsolutions.com/contact-us/">talk to our team</a>.</p>
<hr />
<p><em>Written by the team at</em> <a href="https://gartsolutions.com/"><em>Gart Solutions</em></a><em>, a cloud infrastructure and DevOps consultancy.</em></p>
]]></content:encoded></item><item><title><![CDATA[Your AWS Bill Is the Wrong Metric: How to Calculate Cloud Cost per Customer]]></title><description><![CDATA[Most SaaS teams can tell you their monthly AWS bill to the dollar. Very few can tell you what it costs to serve one customer, or which pricing tier quietly…]]></description><link>https://889.hashnode.dev/your-aws-bill-is-the-wrong-metric-how-to-calculate-cloud-cost-per-customer</link><guid isPermaLink="true">https://889.hashnode.dev/your-aws-bill-is-the-wrong-metric-how-to-calculate-cloud-cost-per-customer</guid><dc:creator><![CDATA[Natali]]></dc:creator><pubDate>Fri, 13 Nov 2026 07:39:19 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6af61721cc9e82ce83df2085/810ffaf1-adcb-4071-b96b-2481212085fb.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Most SaaS teams can tell you their monthly AWS bill to the dollar. Very few can tell you what it costs to serve one customer, or which pricing tier quietly loses money on infrastructure.</p>
<p>That gap matters. A bill that grows 20% month over month could be healthy growth or pure waste. The total number can't tell you which. A unit cost can.</p>
<p>This post walks through how we calculate <strong>cost per customer</strong> for SaaS clients at <a href="https://gartsolutions.com/">Gart Solutions</a>: the formulas, the six steps, and a worked example that shows why the "obvious" calculation is wrong.</p>
<h2>What cloud unit economics actually means</h2>
<p>Cloud unit economics ties cloud spend to a unit of business value. For most SaaS products, that unit is a customer. For others it's an active learner, a GB processed, a video hour, or an inference.</p>
<p>For reference, SaaS Capital's 2026 survey of private B2B SaaS companies puts <strong>median hosting spend at about 5% of ARR</strong>. Where you sit relative to that number is your first signal.</p>
<p>The usual reasons unit costs drift up:</p>
<ul>
<li>oversized databases sized for a peak that never came</li>
<li>logs with no retention policy</li>
<li>non-production environments as big as production</li>
</ul>
<p>We've collected the most common ones in <a href="https://gartsolutions.com/cloud-costs-optimization-traps/">20 cloud cost optimization traps</a>.</p>
<h2>The four formulas you need</h2>
<pre><code class="language-text">Cost per customer   = (direct costs + allocated shared costs) / active paying customers
Unit margin         = revenue per customer - cost per customer
Hosting %           = cloud cost / revenue
Tenant shared cost  = (tenant driver usage / total driver usage) x shared cost pool
</code></pre>
<p>The hard part is the inputs, not the arithmetic.</p>
<h2>Six steps to a cost-per-customer number you can trust</h2>
<h3>1. Pick the right cost basis</h3>
<p>Use <strong>net amortized cost</strong>, so Savings Plans and Reserved Instances are spread across the months they cover. Exclude promotional credits and tax. Include AWS Support and any Marketplace software your product depends on.</p>
<h3>2. Separate production from non-production</h3>
<p>Dev, staging, CI runners and demo environments are real costs, but they don't scale with customers. Keep them out of the production unit cost. The cleanest way is separate accounts in AWS Organizations. The next best is an enforced <code>environment</code> tag in Terraform.</p>
<h3>3. Split direct costs from shared costs</h3>
<p>Anything dedicated to one customer or tier (a dedicated database, a single-tenant cluster) is a direct cost. Tag it with <code>tenant_id</code> or <code>customer_tier</code> and activate those as cost allocation tags.</p>
<p>For shared Kubernetes or ECS clusters, enable <strong>AWS split cost allocation data</strong> so container-level usage shows up in your Cost and Usage Report. If you run many nodes, watch for the <a href="https://gartsolutions.com/hidden-costs-in-running-many-cluster-nodes-on-kubernetes/">hidden costs of running many cluster nodes on Kubernetes</a>.</p>
<h3>4. Allocate shared costs with a usage driver</h3>
<p>Pick a driver that actually correlates with infrastructure load:</p>
<ul>
<li><strong>Good drivers:</strong> API requests, compute seconds, GB stored, GB transferred</li>
<li><strong>Weak drivers:</strong> seat count, revenue share</li>
</ul>
<p>AWS Cost Categories can apply split rules so you're not doing this in a spreadsheet every month.</p>
<h3>5. Divide by the right customer count</h3>
<p>Use <strong>active paying customers in the same month</strong>. Free users are an acquisition cost, not a cost of serving revenue.</p>
<h3>6. Compare against revenue and track it monthly</h3>
<p>Calculate unit margin and hosting % by tier. A practical setup is to query the Cost and Usage Report in Athena, join it with MRR from your billing system, and alert on month-over-month swings above roughly 15%.</p>
<p>Here's a starting point for the Athena side. It's illustrative and uses legacy CUR column names; switch to amortized cost columns for production reporting:</p>
<pre><code class="language-sql">SELECT
  date_trunc('month', line_item_usage_start_date) AS month,
  resource_tags_user_customer_tier               AS tier,
  SUM(line_item_unblended_cost)                  AS direct_cost
FROM cur_database.cur_table
WHERE resource_tags_user_environment = 'production'
GROUP BY 1, 2
ORDER BY 1, 2;
</code></pre>
<h2>A worked example: why the naive number lies</h2>
<p>Take a hypothetical SaaS with 1,520 paying customers, $258,500 MRR, and a net amortized AWS bill of <strong>$24,000/month</strong>:</p>
<ul>
<li>$4,000 is non-production</li>
<li>$20,000 is production: $8,000 direct plus $12,000 shared, allocated by API request volume</li>
</ul>
<table>
<thead>
<tr>
<th>Tier</th>
<th>Customers × price</th>
<th>Direct</th>
<th>Shared</th>
<th>Total</th>
<th>Cost/customer</th>
<th>% of tier revenue</th>
</tr>
</thead>
<tbody><tr>
<td>Starter</td>
<td>1,200 × $49</td>
<td>$0</td>
<td>$3,000</td>
<td>$3,000</td>
<td>$2.50</td>
<td>5.1%</td>
</tr>
<tr>
<td>Growth</td>
<td>300 × $399</td>
<td>$2,000</td>
<td>$5,400</td>
<td>$7,400</td>
<td>$24.67</td>
<td>6.2%</td>
</tr>
<tr>
<td>Enterprise</td>
<td>20 × $4,000</td>
<td>$6,000</td>
<td>$3,600</td>
<td>$9,600</td>
<td>$480.00</td>
<td>12.0%</td>
</tr>
<tr>
<td><strong>Total</strong></td>
<td>1,520</td>
<td>$8,000</td>
<td>$12,000</td>
<td>$20,000</td>
<td>$13.16 blended</td>
<td>7.7%</td>
</tr>
</tbody></table>
<p>The naive calculation, $24,000 ÷ 1,520 = <strong>$15.79</strong>, is wrong for every single tier.</p>
<p>The real story is Enterprise at 12% of revenue. Its dedicated databases were sized for peak load and never reviewed. Knowing it costs about <strong>$480/month to serve one Enterprise customer</strong> gives you a hard discount floor and a defensible reason to charge for dedicated infrastructure.</p>
<h2>What "good" looks like</h2>
<p>These bands are our own reading from client work, not survey data:</p>
<table>
<thead>
<tr>
<th>Hosting % of revenue</th>
<th>What it usually means</th>
<th>Next step</th>
</tr>
</thead>
<tbody><tr>
<td>Under 3%</td>
<td>Lean</td>
<td>Protect it: budgets, anomaly alerts, monthly review</td>
</tr>
<tr>
<td>3–7%</td>
<td>Around median</td>
<td>Hygiene plus commitments, typically 10–25% savings</td>
</tr>
<tr>
<td>7–12%</td>
<td>Above median</td>
<td>Rightsize top drivers, Savings Plans or Spot</td>
</tr>
<tr>
<td>Over 12%</td>
<td>Usually structural (unless video/AI/data is the product)</td>
<td>Architecture review</td>
</tr>
</tbody></table>
<p>Two real examples from our projects:</p>
<ul>
<li><strong>FluentU (EdTech):</strong> RDS alone was 65% of the AWS bill. Fixing that took an architecture change and a migration, not tuning. Monthly run-rate dropped about 78%. <a href="https://gartsolutions.com/case-studies/fluentu-aws-to-hetzner-migration/">Read the FluentU case study</a>, and if you're weighing a similar move, see our <a href="https://gartsolutions.com/hetzner-vs-aws/">Hetzner vs AWS comparison</a>.</li>
<li><strong>Jewelry AI (video analytics):</strong> an overnight batch vision pipeline moved to Spot VMs. Cost per video hour fell about 80%, with no impact on processing. <a href="https://gartsolutions.com/case-studies/cutting-costs-by-81-azure-spot-vms-drive-cost-efficiency-for-jewelry-ai-vision/">Read the Jewelry AI case study</a>.</li>
</ul>
<p>The rule we took away: <strong>when one service is more than half of your cost per customer, start with architecture, not discounts.</strong></p>
<h2>Crawl, walk, run</h2>
<ul>
<li><strong>Crawl:</strong> blended cost per customer and hosting % every month. Audience: CTO and CFO.</li>
<li><strong>Walk:</strong> cost per tier with usage-driver allocation. Needs tags, Cost Categories, split cost allocation and CUR in Athena.</li>
<li><strong>Run:</strong> unit cost per feature, tracked against targets and checked in design reviews.</li>
</ul>
<p>For most companies under a few hundred engineers, <strong>showback</strong> (teams see their unit costs) works better than <strong>chargeback</strong> (costs hit team budgets). We describe how we set this up in practice in <a href="https://gartsolutions.com/finops-as-cloud-cost-management-strategy-our-experience/">FinOps as a cloud cost management strategy</a>.</p>
<h2>Wrapping up</h2>
<p>Your total cloud bill tells you how much you spend. Cost per customer tells you whether that spend is working. Start with the crawl stage this month; a rough number beats no number.</p>
<p>The full guide, with an interactive calculator and FAQ, is on our blog: <a href="https://gartsolutions.com/cloud-unit-economics/">Cloud Unit Economics: How to Calculate Cost Per Customer</a>. Once you've measured, here's our <a href="https://gartsolutions.com/aws-cost-optimization/">AWS cost optimization playbook</a> and <a href="https://gartsolutions.com/20-easy-ways-to-optimize-expenses-on-aws-and-save-over-80-of-your-budget/">20 easy ways to optimize AWS expenses</a>.</p>
<p>Need a second pair of eyes on your bill? Gart Solutions runs <a href="https://gartsolutions.com/cloud-cost-optimization/">cloud cost optimization</a> engagements for SaaS teams in Europe and the US. <a href="https://gartsolutions.com/contact-us/">Book a cost review</a>.</p>
<hr />
<p><em>Written by the team at</em> <a href="https://gartsolutions.com/"><em>Gart Solutions</em></a><em>, a cloud infrastructure and DevOps consultancy.</em></p>
]]></content:encoded></item></channel></rss>