<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><atom:link href="https://blog.nest.codes/en/feed.xml" rel="self" type="application/rss+xml"/><title>Azure Startup Credits: An Engineering Log</title><link>https://blog.nest.codes/en/</link><description>A hackathon-style build journal from our Microsoft for Startups milestone run on Azure</description><language>en</language><lastBuildDate>Fri, 20 Nov 2026 13:52:30 +0000</lastBuildDate><item><title>Azure service usage audit: proving each one does real work</title><link>https://blog.nest.codes/en/azure-service-usage-metrics-audit/</link><guid>https://blog.nest.codes/en/azure-service-usage-metrics-audit/</guid><pubDate>Fri, 20 Nov 2026 12:00:00 +0000</pubDate><description>Are any of our Azure services idle? Usage metrics for API Management, AI Search and Front Door said no—even a quiet load balancer earns its keep.</description><content:encoded><![CDATA[<p>In the Well-Architected Framework, a "workload" is your whole solution; in the startup program docs, it is a single Azure service you actively use. Chasing that difference, I asked a blunt question of our own setup: is every service we added actually doing work, or just switched on? The metrics said they all work—even a load balancer that is almost silent turned out to be insurance that earns its keep during failures.</p>
<h2 id="same-word-why-a-different-unit">Same word, why a different unit?</h2>
<p>The milestone asks a startup to keep using several services, for real, for 60 days (<a href="/en/why-azure-nvidia-inception-credits/">Day 0</a>). To check we were honoring the "for real" part, I had a Claude Code subagent compare our setup against the Well-Architected docs.</p>
<p>The two documents use the same word at different scales. Well-Architected calls a workload the collection of resources, code, models and data that together deliver a business outcome. By that measure our solution is roughly media processing, speech transcription, search, web and GPU inference.</p>
<p>The startup docs count each unique service you use in your solution. So we decided to use Well-Architected as a mirror rather than a counting rule: does each service do what its service guide says it is for?</p>
<p>The reviewer found most services matched their guide and flagged a few. One was keeping a low-priority GPU node always at one instance. Another was API Management on the Developer tier. The third was a load balancer with almost no traffic. The GPU node was settled quickly. This subscription can't get dedicated GPU quota, so a multi-region low-priority cluster backing always-on inference is our actual design. For the rest, we went to the numbers.</p>
<h2 id="did-the-metrics-show-anything-that-was-just-switched-on">Did the metrics show anything that was just switched on?</h2>
<p>Instead of answering from gut feeling, we pulled two days of metrics.</p>
<ul>
<li>API Management: 4,741 requests one day, 5,266 the next. Transcript correction, admin analysis and search embeddings all go through the gateway.</li>
<li>AI Search: 1,992 queries, then 148. The first day was high because we were filling an index.</li>
<li>Container Registry: 18–222 image pulls a day. Billing is a tier fee plus storage, so pulls don't add cost.</li>
<li>Front Door: 1,000–6,500 requests a day, covering admin pages, a report page I check daily, and this blog.</li>
</ul>
<p>The only clear outlier was the GPU-side load balancer: a few MB a day, roughly health-probe traffic. My first reaction was "maybe this should go." Then I looked again at what it is for, and quiet turned out to be correct.</p>
<ul>
<li>If the Redis-based routing is unavailable and we fall back to the app's own routing, it still spreads requests across two nodes in the same region. Without it, one node takes everything and queues grow.</li>
<li>If the backend fails to connect directly to the node it picked, the request is retried once through the load balancer as a backup path.</li>
</ul>
<p>The lesson for me: <strong>don't judge a failover service by its everyday traffic</strong>. We wrote its role into our solution doc and kept it.</p>
<h2 id="why-an-api-management-gateway-and-where-did-search-costs-come-from">Why an API Management gateway, and where did search costs come from?</h2>
<p>Honestly, I thought API Management was overkill for a team our size. Putting it in front of Azure OpenAI during the milestone period changed my mind.</p>
<p>Two reasons. First, model keys are no longer scattered across job code and machines; callers only know the gateway key. Second, a daily token cap (1 million tokens) stops runaways. We once had a correction job loop on the same work for hours because of a bug; now that kind of thing stops at the gateway.</p>
<p>If the gateway itself goes down, work stops, so on 5xx, 401 or a dropped connection we retry once against the direct endpoint. A quota rejection (403) stops on purpose. The downsides: the guide says Developer tier isn't meant for production, and provisioning took a long time.</p>
<p>Search uses Cohere embeddings (embed-v-4-0) from Foundry to build vectors for the AI Search index, then reorders query results with the Cohere reranker (rerank v5 pro). Both are sold directly by Azure, so they bill against credits. That is also when we made a rule: no Marketplace serverless deployments, because those don't draw on credits.</p>
<p>We call the embedding model from our own code instead of AI Search's built-in vectorizer link, mainly to keep the billing path certain. The trade-off was cost. Of roughly $6 in Foundry model spend on Nov 19, <strong>reranking and embeddings took more than half</strong>. That came from filling the index for the first time. Once we're back to 10–20 searches a day it should shrink (an estimate).</p>
<h2 id="why-didnt-we-follow-the-cosmos-db-autoscale-advice">Why didn't we follow the Cosmos DB autoscale advice?</h2>
<p>Both the reviewer and Advisor recommended Cosmos DB autoscale. We kept fixed 600 RU/s with 429 retries; the retry design is in <a href="/en/cosmos-db-429-retry-backoff/">Day 3</a>.</p>
<p>The numbers decided it. We see about 70 429s a day, and retries finish all of them. Autoscale bills each hour at that hour's peak, and in the last 72 hours, 66 briefly hit 600. Switching could have doubled or tripled the daily cost (an estimate). The gain would only be "a bit faster during bursts."</p>
<p>Correction: the earlier post's ~$33 a day was a "normal day" estimate excluding one-off jobs. Our recent actual billed average is about $45, which includes new fixed costs like the gateway and one-off usage like the index fill.</p>
<p>One feeling from this stretch: having moved the work I used to conduct from Claude windows on my PC into scheduled Functions, metrics like these are now my only eyes. It's convenient, but because I can't watch it run, "it's probably fine" without a metric makes me uneasy. Next step is metric alerts on Cosmos 429s, gateway 5xx and the log cap.</p>
<p>The checklist we used to find services that are merely switched on:</p>
<ul>
<li>Pull two days of one "unit of work" metric per service (requests, queries, pulls).</li>
<li>Separately check whether the bill is a fixed fee or usage-based.</li>
<li>If traffic is low, ask what the service does during a failure first.</li>
<li>Follow advice only if errors are actually left unresolved today.</li>
</ul>
<h2 id="also-today">Also today</h2>
<ul>
<li>We enabled dead-lettering on two Event Grid subscriptions. Events that fail repeatedly now land in Blob storage instead of silently disappearing, which makes debugging easier.</li>
<li>We asked support one last time about dedicated AML T4 quota for failover. The answer was that new GPU allocations for sponsored subscriptions are hard for now, with Foundry models suggested as the alternative. So GPU work is designed around AML low-priority clusters, Container Apps serverless GPU and Foundry only.</li>
<li>We capped Log Analytics to stay within the free allowance and attached the GPU cluster's node events and utilization logs instead. Along the way we found most of our log volume was one model library repeating the same warning.</li>
</ul>]]></content:encoded></item><item><title>Container Apps job cold start: 8 min to 1.8 with Blob</title><link>https://blog.nest.codes/en/container-apps-job-image-blob-startup/</link><guid>https://blog.nest.codes/en/container-apps-job-image-blob-startup/</guid><pubDate>Wed, 18 Nov 2026 12:00:00 +0000</pubDate><description>A GPU job pulled a huge image from a registry in another region and took 8 minutes to start. A slim base image plus same-region Blob cut it to 1.8.</description><content:encoded><![CDATA[<p>Our GPU job runs in East US, but the container image it needed lived in a registry in Seoul. This post answers a simple question: how do you speed up a Container Apps job that is slow because its registry sits in another region? Our answer wasn't ACR geo-replication. We moved to a small public base image plus same-region Blob Storage, and startup dropped from about 8 minutes to about 1.8.</p>
<h2 id="why-did-advisor-suggest-geo-replication">Why did Advisor suggest geo-replication?</h2>
<p>Today I went through all 70 Azure Advisor recommendations one by one. One of them was geo-replication for Azure Container Registry (ACR). Our speech transcription job is a Container Apps serverless GPU job that starts a few times a day in East US. Every start pulled a multi-GB image across from the Seoul registry.</p>
<p>We already ran into big-image cold starts in <a href="/en/container-apps-serverless-gpu-asr/">Day 2</a>. Back then we only batched runs to cut how often it happened. We never questioned where the image lived. And the minutes spent pulling it are billed as GPU job time.</p>
<p>Following Advisor would have been easy. But geo-replication needs the Premium tier, and each replica costs about as much as another registry (roughly $50 a month at public prices).</p>
<h2 id="replicate-add-a-registry-or-use-blob">Replicate, add a registry, or use Blob?</h2>
<p>We had three options:</p>
<ul>
<li>Replicate ACR to East US: no code changes, but a permanent monthly increase.</li>
<li>Add a Standard ACR in East US: cheaper, but now there are two build-and-push paths.</li>
<li>Shrink the image: use a public base image only, and pull packages, model and code from Blob in the same region.</li>
</ul>
<p>I leaned toward replication at first. Looking again, Advisor had pointed at a symptom, and the cause was our design. If the GPU job runs in East US, its inputs should live in East US too. So we picked option three.</p>
<h2 id="what-does-the-new-setup-look-like">What does the new setup look like?</h2>
<p>I handed the restructuring to a Claude Code subagent and checked the result myself.</p>
<ul>
<li>Image: the Python 3.11 slim mirror on Microsoft Container Registry (MCR). It's fast inside Azure and avoids Docker Hub's anonymous pull limits.</li>
<li>Start command: a few-line bootstrap. It uses the job's system-assigned managed identity (an Azure identity that needs no stored key) to get a token, then fetches a boot script from Blob.</li>
<li>Blob: we only added one container to a storage account that already existed in East US. Same region means no transfer charges.</li>
<li>Permissions: the job identity gets Storage Blob Data Reader on that one container only. No keys in the image or in environment variables.</li>
<li>Packages: one tar bundle of about 7 GB, with the date in the file name for versioning.</li>
</ul>
<pre><code class="language-python"># Concept of the start command (names generalized)
token = get_managed_identity_token(&quot;https://storage.azure.com/&quot;)
boot = http_get(f&quot;{BLOB_URL}/code/boot.py&quot;, bearer=token)
exec(boot)  # boot.py pulls the bundle, model and code, then starts the job
</code></pre>
<p>Three test runs finished and wrote their results correctly. We kept the old image and registry for rollback. ACR stays anyway, since our web container still uses it.</p>
<p>There is a trade-off. When everything was baked into one image, it was obvious what version ran. Now we rely on bundle names and boot logs to trace that. Honestly, this setup turned out cleaner than I expected. Shipping code now means uploading to Blob instead of rebuilding a large image, so deploys got faster too.</p>
<h2 id="one-setting-caught-before-the-first-scheduled-run">One setting caught before the first scheduled run</h2>
<p>In the evening I had a review agent go over the automation once more. It found something urgent. The Functions app that launches the job still had an app setting pointing at the old image. Our code reads that setting before its own default.</p>
<p>Left alone, tomorrow's first scheduled run would have used the old image with the new bootstrap, a combination we never tested. We confirmed the deployed code was the new version, then deleted that single app setting.</p>
<p>That one rattled me a bit. The code was right and the tests passed, yet an app setting was quietly overriding the code. Now that the work runs on Azure instead of in front of me, this kind of thing is invisible. I won't fully relax until tomorrow morning's report email lands.</p>
<p>Correction: the $41 per day in Day 4 was the total bill for 11-16. We now treat about $33 as a normal day. The earlier number wasn't wrong; it used a different basis.</p>
<p>If you're dragging something heavy across regions, ask whether it really needs to be inside the image before you pay for replication.</p>
<h2 id="also-today">Also today</h2>
<ul>
<li>Azure Communication Services Email: alert mail now goes through ACS first and falls back to our previous mail path on failure. We added 4 DNS records for the domain and saw 202 Accepted from inside a Function.</li>
<li>Event Grid: a timer that scanned Blob every 2 minutes became a BlobCreated event trigger; the timer stays as an hourly backup.</li>
<li>Key Vault references: 19 Function app settings now point to Key Vault. The Windows shell mangled <code>;</code> and parentheses in az CLI arguments, so we patched the settings through the ARM REST API instead.</li>
</ul>]]></content:encoded></item><item><title>Cosmos DB for Transcript JSON: One Container, Not Two</title><link>https://blog.nest.codes/en/cosmos-db-transcript-json-documents/</link><guid>https://blog.nest.codes/en/cosmos-db-transcript-json-documents/</guid><pubDate>Tue, 17 Nov 2026 12:00:00 +0000</pubDate><description>How do you query transcripts without parsing files? We kept SRT files in R2 and wrote one JSON doc per transcript into our existing Cosmos DB container.</description><content:encoded><![CDATA[<p>If your subtitle files live only in object storage, how do you look up what was said in one episode without downloading and parsing the file every time? You don't. Today we kept the files in Cloudflare R2 and added one JSON document per transcript to Azure Cosmos DB. We didn't create a new container for it. We split the data by a type field inside a container that was already running.</p>
<h2 id="why-werent-files-enough">Why weren't files enough?</h2>
<p>Our speech transcription pipeline writes SRT files from Container Apps and MAI transcription into Azure Blob. Today we also copied those files to R2, because of the rule from <a href="/en/why-azure-nvidia-inception-credits/">Day 0</a>: data should be readable from more than one cloud.</p>
<p>Once the files were in R2, we could see the lookup problem. Fetching a whole transcript is easy if you know the path. But answering "what was said around minute three of this episode?" means downloading and parsing the file every time. So we decided to keep a queryable copy as documents.</p>
<h2 id="three-options-and-why-we-reused-a-container">Three options, and why we reused a container</h2>
<p>We had three options:</p>
<ul>
<li>A jsonb table in PostgreSQL, which we already run.</li>
<li>A dedicated Cosmos DB container. It's clean, but it carries its own minimum of 400 RU/s (Cosmos DB's throughput unit). That's roughly $23 more per month.</li>
<li>Our existing Cosmos container, which the job queue already uses at a fixed 600 RU/s, with a <code>q</code> field to tell the two kinds of data apart.</li>
</ul>
<p>We judged them on added fixed cost, per-transcript lookup, and how much existing code we could reuse. We picked the third. The queue code already writes to this container, so we could keep the same client and permissions. A document looks like this:</p>
<pre><code class="language-json">{
  &quot;q&quot;: &quot;sub&quot;,
  &quot;w&quot;: &quot;tv:&lt;id&gt;:&lt;season&gt;:&lt;episode&gt;&quot;,
  &quot;source&quot;: &quot;&lt;asr-model&gt;&quot;,
  &quot;r2&quot;: &quot;&lt;r2-key&gt;&quot;,
  &quot;n&quot;: 180,
  &quot;lines&quot;: [[0.0, 2.4, &quot;first line&quot;], [2.4, 5.1, &quot;second line&quot;]]
}
</code></pre>
<p>A lookup is one query: <code>WHERE c.q='sub' AND c.w='...'</code>. Long-form recording transcripts, which are a different kind of data, go into the same container under a different <code>q</code> value. Honestly, PostgreSQL jsonb would probably have worked just as well. We chose Cosmos because the path was already built, not because it performs better.</p>
<h2 id="what-we-had-to-handle-in-return">What we had to handle in return</h2>
<p>First, indexing. By default, Cosmos DB indexes every property. If it indexed the whole <code>lines</code> array, every write would cost a lot more RU. So we added the lookup key <code>w</code> to the index and kept everything else excluded:</p>
<pre><code class="language-json">{
  &quot;includedPaths&quot;: [{ &quot;path&quot;: &quot;/q/?&quot; }, { &quot;path&quot;: &quot;/w/?&quot; }],
  &quot;excludedPaths&quot;: [{ &quot;path&quot;: &quot;/*&quot; }]
}
</code></pre>
<p>In our setup, the data-plane key couldn't change the indexing policy. We made the change through the management plane with the az CLI.</p>
<p>Second, the 2 MB document limit. A very long transcript can go over it. For those, we drop the lines and store only the R2 key.</p>
<p>Third, 429s. The queue and the transcripts now share the same RU budget, so bulk writes can slow the queue down. For the backfill we used two concurrent writers and backed off whenever we got a 429. That's the same pattern as in <a href="/en/cosmos-db-429-retry-backoff/">Day 3</a>. The backfill took about 1 hour 20 minutes, with zero failures.</p>
<p>New transcripts are handled by an Azure Functions timer. Every 2 minutes it scans Blob for files that haven't been copied yet. It uploads each one to R2, records the URL in our metadata database, and writes the Cosmos document. We didn't change a single line of the transcription code in Container Apps. If a Cosmos write fails, the file is already in R2, so we can backfill that document later.</p>
<p>One feeling from today: chaining transcription, storage, and indexing with one timer is really convenient. But I can't see it running every 2 minutes, and that makes me a little nervous. So I added a line for this step to the daily report email.</p>
<h2 id="also-today">Also today</h2>
<ul>
<li>We queried Front Door request counts in a single one-day bucket and got 1 request. Counting again by hour showed thousands per day. Check the aggregation grain before you trust a metric.</li>
<li>Functions Flex Consumption bills for on-time × instance size. A schedule override meant for a single day stayed in place, and that day's execution time came out about 3× normal. We deleted the expired setting.</li>
<li>We tested transcript proofreading with a GPT model on Azure OpenAI. It cost about $0.11 per hour of audio. Our transcription rules require numbers to be written out in Korean, so we had to spell that rule out in the prompt.</li>
</ul>
<p>Here's what we don't know yet. On a heavy transcription day, will the queue sharing the same 600 RU/s fall noticeably behind? If it does, database-level shared throughput might be a better answer than a second container. We haven't measured that yet.</p>]]></content:encoded></item><item><title>Cosmos DB 429 at 1% Average RU: Retry, Don&#x27;t Scale</title><link>https://blog.nest.codes/en/cosmos-db-429-retry-backoff/</link><guid>https://blog.nest.codes/en/cosmos-db-429-retry-backoff/</guid><pubDate>Mon, 16 Nov 2026 12:00:00 +0000</pubDate><description>Cosmos DB threw 429s at under 1% average RU because writes burst within seconds. We fixed it with lower concurrency and backoff, not more RU/s.</description><content:encoded><![CDATA[<p>Our average throughput use was under 1%, yet we hit as many as about 4,000 429s (Too Many Requests) in a single hour. This post answers a question many small teams run into: if Cosmos DB has capacity to spare, why is it throttling you, and should you raise RU/s? Our answer was no. The problem wasn't capacity but writes bunched into a few seconds, and we fixed it by cutting write concurrency and adding retries.</p>
<h2 id="why-429s-at-1-average-usage">Why 429s at 1% average usage?</h2>
<p>We use a single Cosmos DB for NoSQL container as both a work queue and a record store. It runs on manual (fixed) throughput of 600 RU/s. RU/s is the amount of request cost Cosmos will serve per second. Several Azure Functions and transcription jobs share that container.</p>
<p>The problem first showed up in the Functions error logs. The step that writes transcription results as per-line documents kept failing. Each finished transcription upserted hundreds of documents, eight at a time.</p>
<p>The hourly metrics told a split story. Most hours averaged 0.1–0.3% of 600 RU/s. But the moment a transcription finished, Normalized RU Consumption spiked to 100%. The limit is enforced per second, and we had only been looking at hourly averages.</p>
<p>My first read was "if we're getting 429s, we must be maxing out 600 RU/s." That was wrong. Across the day we used less than 1%; only a few seconds of each burst overflowed.</p>
<h2 id="where-were-the-silent-write-failures-hiding">Where were the silent write failures hiding?</h2>
<p>The worse part was that the failures were invisible. The code logged a failed write and moved on. The daily report email showed no warnings at all. The result files and the PostgreSQL records were intact, so only the Cosmos lines were missing.</p>
<p>Over the previous 24 hours, the lines for 18 transcriptions were missing entirely. When I used to drive this from the Claude window on my local PC, a red error jumped out immediately. Since moving it to Functions, the work runs on its own and I only see results by email. It's more comfortable, but this taught me that quiet failures are the scariest kind.</p>
<p>We made two changes:</p>
<ul>
<li>Cut concurrent upserts from 8 to 2.</li>
<li>On a 429, wait 1s, 2s, 4s… up to 60s, and retry up to 12 times.</li>
</ul>
<pre><code class="language-python">for attempt in range(12):
    try:
        container.upsert_item(doc)
        break
    except CosmosHttpResponseError as e:
        if e.status_code != 429:
            raise
        time.sleep(min(60, 2 ** attempt))
</code></pre>
<p>With the fixed code we backfilled roughly 49,000 missing lines. 429s still appeared during the backfill, but the retries absorbed them and zero writes failed. Each line is written under the same ID, so there were no duplicates.</p>
<h2 id="raise-rus-switch-to-autoscale-or-leave-it">Raise RU/s, switch to autoscale, or leave it?</h2>
<p>We had three options:</p>
<ol>
<li>Raise fixed RU/s.</li>
<li>Switch to autoscale, which scales within a maximum hour by hour.</li>
<li>Keep 600 RU/s and absorb bursts with retries.</li>
</ol>
<p>Autoscale bills each hour at the highest level it reached, at 1.5x the fixed rate. It suits workloads that stay busy for hours, but our bursts last seconds, so the gain was small. We also looked at the free tier. It's a pure discount of 1,000 RU/s and 25 GB with no performance difference, which looked attractive. But you can only enable it when creating an account, and only one per subscription, so we'd have had to move the queue to a new account.</p>
<p>Before deciding, we asked Azure support exactly that: "Average usage is under 1% but we see bursts of 429s. Should we raise RU/s?" The gist of the answer: a 429 isn't an outage but a normal rate-limit signal, and if retries make the failures go away, there's no need to raise RU/s. So we went with <strong>option 3: keep it and retry</strong>. The trade-off is that writes can lag by tens of seconds during a burst, which is fine for our workload.</p>
<p>The support request taught us something too. On the Developer support plan, you can't create a case through the Support API; that requires Professional Direct or higher. Listing cases and reading replies does work via the API, so we create cases in the portal and read them via the API. The portal picking the problem type on its own, "Throughput and scaling / Request rate too large", was better than I expected.</p>
<p>Honestly, I first thought Cosmos was overkill for a team our size. Using it as a queue during the milestone period, the metrics surfaced a second-level problem fast enough that we found the cause quickly. Still, the default charts are hourly averages, which makes bursts easy to miss, and that remains annoying. Next we'll recheck 429 counts by hour and confirm real write failures stay at zero.</p>
<p>A short checklist for teams hitting the same thing:</p>
<ul>
<li>Watch the maximum of Normalized RU Consumption, not the hourly average.</li>
<li>For bulk upserts, lower concurrency first.</li>
<li>Add exponential-backoff retries for 429s.</li>
<li>If any code logs failures and moves on, wire it into alerts.</li>
<li>Know up front that the free tier can only be enabled at account creation.</li>
</ul>
<h2 id="also-today">Also today</h2>
<ul>
<li>Correction: In <a href="/en/container-apps-serverless-gpu-asr/">Day 2</a> I estimated serverless GPU cost as GPU + vCPU + RAM. The actual bill showed only the T4 charge (about $0.263/hour); the monthly free grant absorbed vCPU and memory. Early in the month, while the grant lasts, real cost is lower than that estimate.</li>
<li>Using <code>by</code> as an alias in a Cosmos NoSQL query caused a syntax error because it's a reserved word, and one daily job never started. We renamed the alias and redeployed.</li>
<li>We set an Azure ML compute cluster's minimum nodes to 0. The Premium SSD OS disk attached to each node bills under Storage, and it disappears when the node scales down.</li>
</ul>]]></content:encoded></item><item><title>Azure Container Apps Serverless GPU: Real T4 ASR Cost</title><link>https://blog.nest.codes/en/container-apps-serverless-gpu-asr/</link><guid>https://blog.nest.codes/en/container-apps-serverless-gpu-asr/</guid><pubDate>Sun, 15 Nov 2026 12:00:00 +0000</pubDate><description>Serverless T4 on Azure Container Apps looks cheap at $0.26/hr until vCPU and RAM charges land. Halving cores and batching got us 45x realtime ASR.</description><content:encoded><![CDATA[<p>$0.263 an hour. That was the serverless T4 line on the Azure Container Apps price sheet, and my AI coding assistant turned it into "about three cents per hour of audio." This post answers a simple question: what does it actually cost to run an open speech-recognition model on Container Apps serverless GPU? Short answer: the vCPU and RAM charges outweighed the GPU itself, and once we right-sized the job it landed at roughly $0.78 an hour.</p>
<h2 id="why-we-put-a-gpu-on-container-apps">Why we put a GPU on Container Apps</h2>
<p>Our speech transcription currently runs through a managed API, MAI-Transcribe-2. We wanted to transcribe the same audio with an open model as well, so we could compare quality and cost side by side. The models were Qwen3-ASR 1.7B plus the 0.6B forced aligner for timestamps.</p>
<p>Left to ourselves, we would have dropped this onto the Azure ML low-priority cluster we already run. The milestone period (rules in <a href="/en/why-azure-nvidia-inception-credits/">Day 0</a>) gave us a reason to try a GPU we don't have to provision as a VM. Honestly, it's not a service we would have picked first.</p>
<p>Attach a serverless GPU workload profile to a Consumption environment, and a single T4 is allocated only while a Container Apps Job is running. In eastus it attached immediately, with no quota request. For what it's worth, the Korea regions don't offer Container Apps GPUs yet.</p>
<h2 id="it-wasnt-0263-an-hour">It wasn't $0.263 an hour</h2>
<p>The first run was a single audio file of a little over ten minutes. It worked, but most of the wall-clock time was the image pull: 622 seconds to pull an 8.9 GB image with the models baked in, against 66 seconds of actual transcription.</p>
<p>Looking at the numbers, I asked: "This is on-demand. Why is it so cheap?" It wasn't. Serverless GPU bills GPU-seconds plus vCPU-seconds plus RAM GiB-seconds. We had launched at the profile's maximum, 8 vCPU and 56 GiB, which comes to about $1.56 an hour. That's roughly twice an on-demand T4 VM (about $0.75).</p>
<p>Transcription keeps the GPU busy and leaves the CPU mostly idle, so we dropped to 4 vCPU and 16 GiB. Speed didn't change, and the price halved to about $0.78 an hour. The size in a serverless profile's name is only a ceiling. You have to <strong>pick CPU and RAM per job yourself</strong>.</p>
<h2 id="how-much-of-the-gpu-were-we-using">How much of the GPU were we using?</h2>
<p>The next question was whether we were using 100% of the GPU. We hadn't measured, so we didn't know. We made the job log utilization every five seconds and changed three things:</p>
<ul>
<li>Batch size went from 24 to 48.</li>
<li>Voice activity detection (VAD) for the next file now runs on CPU while the GPU works on the current one.</li>
<li>The image shrank from 8.9 GB to 3.8 GB, with models downloaded at startup instead.</li>
</ul>
<p>We reran on a batch of audio files totalling about 66 minutes. After warm-up, GPU utilization was 72–94% per file and 77% on average. Post-warm-up throughput was around 45x realtime, which works out to about $0.017 per hour of audio. That's roughly a sixth of MAI's current promotional rate ($0.10 per hour). On this sample, though, <strong>MAI still produced better transcripts</strong>, especially word spacing.</p>
<p>The remaining bottleneck is startup. Every run pulls the image fresh, which costs about eight minutes. So instead of launching many short runs, we batch once a day. A scheduled Azure Function starts the job daily, and the job stops after 88 minutes, finishing whatever file it's on. In effect, the cost cap is enforced as a time cap. Next up is moving inference to vLLM to squeeze more throughput out of the T4's VRAM.</p>
<h2 id="what-i-think-after-using-it">What I think after using it</h2>
<p>Renting a GPU by the second was honestly better than I expected. No node pools, no driver installs, no shutdown scripts. On the other hand, it isn't cheap. It's on-demand with no eviction risk, so it costs several times what a low-priority T4 does (a little over $0.1 an hour). Cold starts with a large image still hurt.</p>
<p>My verdict: it fits batch GPU work that runs an hour or two a day well. For inference that runs 24/7, I still think VMs or a low-priority cluster win.</p>
<p>This job now runs on its own in Azure, and I see the results in a report email. It's convenient, but not knowing whether it actually ran until the mail arrives still makes me a little nervous.</p>
<p>When you read a serverless GPU price sheet, don't stop at the GPU line. Add GPU, vCPU, and RAM together.</p>
<h2 id="also-today">Also today</h2>
<ul>
<li>MAI-Transcribe-2 isn't supported in eastus2 yet, so we call it in eastus. It doesn't accept m4a, so we switched to MP3 (mono, 16 kHz).</li>
<li>Our earlier Speech batch transcription failed on large m4a files because the metadata (moov atom) sat at the end of the file. Moving it to the front (faststart) fixed it.</li>
<li>We considered moving scheduled orchestration to AKS, but at our size scheduled Functions are enough, so we didn't build it.</li>
</ul>]]></content:encoded></item><item><title>Azure PostgreSQL Migration: Quota Isn&#x27;t SKU Availability</title><link>https://blog.nest.codes/en/azure-postgresql-flexible-server-migration/</link><guid>https://blog.nest.codes/en/azure-postgresql-flexible-server-migration/</guid><pubDate>Sat, 14 Nov 2026 12:00:00 +0000</pubDate><description>Seoul refused our Azure PostgreSQL server despite free quota: SKU availability is separate from quota. Plus three snags moving data off Aurora DSQL.</description><content:encoded><![CDATA[<p>I assumed that if the quota page showed free cores, the server would get created. Today I tried to create an Azure Database for PostgreSQL server in the Seoul region, and that assumption didn't hold. Quota decides how many cores you may use. SKU availability decides whether the region will give your subscription that tier at all. <strong>The two are independent.</strong> Moving the data itself ran into three problems: collation, index layout, and one DSQL-only syntax.</p>
<h2 id="why-we-moved-to-managed-postgresql">Why we moved to managed PostgreSQL</h2>
<p>Our search workload used a Postgres-compatible database on AWS Aurora DSQL. Being serverless was convenient, but its SQL differed from standard Postgres in small ways. We also wanted vector search, and DSQL doesn't support pgvector.</p>
<p>Without the milestone period, I probably would have left it alone. Since we had a reason to move, we picked Azure Database for PostgreSQL Flexible Server. We looked at Azure AI Search as a dedicated vector service, but it was too much for a team our size. One Postgres server handling both relational data and vectors fit better.</p>
<p>We chose Burstable B2s (2 vCores, 4 GB RAM). At list price that's about $2 a day, which is plenty for a database we only query now and then.</p>
<h2 id="three-snags-getting-data-out-of-dsql">Three snags getting data out of DSQL</h2>
<p>My work PC didn't have pg_dump, so Claude Code and I wrote a small script that copies each table with psycopg's COPY. The whole dataset is a few hundred MB, so copying took about ten minutes. The problems only showed up afterwards.</p>
<p>First, indexes. DSQL attaches all the remaining columns to primary keys and indexes with INCLUDE. On standard Postgres, a column holding long text pushed index rows over the size limit. We dropped the INCLUDE part and kept the key columns, so lookups behave the same.</p>
<p>Second, sort order. Every row count matched, but <code>order by</code> returned rows in a different order. The databases had different default collations. We recreated the database with the C collation, copied again, and the order matched exactly.</p>
<p>Third, code. Three scripts used DSQL's <code>CREATE INDEX ASYNC</code>, so we changed them to a plain <code>CREATE INDEX</code>.</p>
<p>pgvector doesn't work right away on Flexible Server. You first add it to the <code>azure.extensions</code> server parameter allowlist.</p>
<pre><code class="language-sql">-- after adding VECTOR and PG_TRGM to the azure.extensions server parameter
CREATE EXTENSION IF NOT EXISTS vector;
CREATE INDEX ON items USING hnsw (embedding vector_cosine_ops);
</code></pre>
<p>We didn't stop at matching row counts. For each table we sorted every row and compared hashes, and found zero differences. Only after that did we delete the old DSQL clusters.</p>
<p>Honestly, getting back to standard Postgres was a relief. Turning on pgvector and pg_trgm (a trigram text-search index) with one allowlist entry was better than I expected.</p>
<h2 id="why-seoul-said-no">Why Seoul said no</h2>
<p>We first put the server in Spain Central, close to the workers reading the database at the time. It was this subscription's first PostgreSQL server, so we had to register the resource provider first. After that, creation went through right away.</p>
<p>Later that afternoon we confirmed that most queries actually come from Asia, so we tried to move the server to Seoul. Korea Central rejected B2s with <code>SkuNotAvailable</code> in availability zones 1, 2, and 3. Zone 3 showed the server as provisioning for a few minutes, then failed anyway.</p>
<p>Korea South returned "location is restricted." It's Seoul's paired region, so it seems to be closed to new subscriptions by default.</p>
<p>We checked quota through the API, and Burstable in Seoul showed 0 of 40 cores used. So there was plenty of quota, but the tier wasn't being offered to us. Microsoft doesn't say why. My guess is that busy regions hold back cheap tiers for some subscription types, but that's an inference, not something we confirmed.</p>
<p>Without Burstable, the smallest option in Seoul is a 2-vCore General Purpose tier at about $6 a day. Paying three times as much for the same job made no sense. We also looked at the preview HorizonDB, but it costs more and has no SLA.</p>
<h2 id="where-it-ended-up">Where it ended up</h2>
<p>We tried the same B2s in Southeast Asia (Singapore), and it was created right away. We gave it the same admin account, read-only account, passwords, and database names as the Spain server. <strong>So after the move, the only change anyone needed was the host address.</strong></p>
<p>The second migration went much faster than the first. We used the same script and the same hash check, and again found zero differences. Then we deleted the Spain server.</p>
<p>There was a trade-off. The web app runs in Korea Central and the database in Singapore, so pages that run many queries take a little over a second. Putting both in one region would be better. This time the tier restriction decided for us.</p>
<p>How it felt: on AWS, picking a region was usually the end of it. On Azure, quota, SKU availability, and region access are separate gates, so you often only find out by trying to create the resource. That part still bothers me. The CLI doesn't help either: some PostgreSQL commands take <code>--name</code> and others take <code>--server-name</code>, and I got it wrong several times today.</p>
<p>There's one risk left. Several clients need to connect, so the database firewall is still wide open. The server accepts only SSL connections, and the read-only account can't write, but this setup is temporary. <strong>Until we narrow who can connect or move to private access, this server is our weakest point.</strong></p>
<h2 id="also-today">Also today</h2>
<ul>
<li>We tested GPU node allocation across regions with Azure ML low-priority compute. The only region where an 8×H100 node actually came up was eastus2. There was no capacity for 8×A100 80GB in any of the five regions we tried. So eastus2 is now our main GPU region.</li>
<li>App Service quota in Southeast Asia was zero for every tier, so the app went to Korea Central. ZIP deploy failed with a 503, so we switched to container deploys. The image is now built inside ACR (<code>az acr build</code>), and the app's managed identity has AcrPull to pull it.</li>
<li>We put Azure Front Door Standard in front of the app. Until the managed certificate reaches the edge, which can take tens of minutes, browsers show a name-mismatch warning. If the domain uses HSTS, the browser won't even let you click through. It's not a misconfiguration, so you just wait.</li>
</ul>]]></content:encoded></item><item><title>Azure Credits via NVIDIA Inception: Why We Moved</title><link>https://blog.nest.codes/en/why-azure-nvidia-inception-credits/</link><guid>https://blog.nest.codes/en/why-azure-nvidia-inception-credits/</guid><pubDate>Fri, 13 Nov 2026 12:00:00 +0000</pubDate><description>Which cloud should run our GPU inference and web workloads? NVIDIA Inception opened an Azure credit path, so we start with an always-on T4 in Azure ML.</description><content:encoded><![CDATA[<p>My work PC had several Claude Code windows open at once. Each one was conducting a single GPU job, and I hopped between them checking results. This post answers why a team working like that decided to move its workloads to Azure. The short version: joining NVIDIA Inception led us to Azure credits, and at the same moment we needed a managed place to keep GPU inference running around the clock.</p>
<p>We are a small team that builds models, runs inference servers, and operates a SaaS product. Our workloads fall into a few broad buckets: media processing, speech transcription, search, web, and GPU inference. Until now almost all of it ran on spot GPUs at another cloud and on that work PC.</p>
<h2 id="how-nvidia-inception-led-us-to-azure">How NVIDIA Inception led us to Azure</h2>
<p>Azure was not where this started. Because we use a lot of GPU time, we first joined NVIDIA Inception, NVIDIA's startup program. While reading through the member benefits, I found an Azure credit offer.</p>
<p>The path went like this. We requested the Azure credit benefit through Inception first. Then we applied to Microsoft for Startups separately. We were told the review itself is done by Microsoft.</p>
<p>Honestly, it was not instant. Identity verification took longer than I expected, and at one point our first credits expired while we waited. Still, the portal showed a starter credit and the next milestones laid out ahead of us.</p>
<p>Around the same time we also applied for startup credits at other clouds, such as AWS Activate. The idea was not to lean on any single provider, but to be able to move compute to wherever credits and capacity are.</p>
<h2 id="why-try-azure-at-all">Why try Azure at all?</h2>
<p>AWS has been our main cloud for a long time. To me it feels like a tool shed that already has everything a business needs. GCP is closer to a necessity for us, mostly because Google sign-in (OAuth) lives there.</p>
<p>What I hoped to get from Azure came down to three things:
- A managed cluster that keeps GPU inference always on. An Azure Machine Learning compute cluster with a minimum of one node brings the node back if it gets taken away.
- Cheap inference GPUs like the T4. At public prices, a 4-vCPU T4 node on low priority (spot) was in the low tens of cents per hour.
- AI services such as Azure OpenAI and Foundry, available in the same subscription without extra plumbing.</p>
<p>I had worries too. The Azure portal and CLI were less familiar to me than AWS. I also did not want credits to quietly lock us into one cloud. So we set one rule up front: keep data and servers in standard shapes, like PostgreSQL, Docker images, and object storage, so they can move later.</p>
<h2 id="what-we-prepared-before-day-one">What we prepared before day one</h2>
<p>First, we read the milestone rules. The gist is to keep using several Azure services, for real, steadily for 60 days. Missing a day restarts the count, so it felt a lot like being handed a hackathon rulebook. Our own rule on top was simple: only attach services that do actual work, and write down what each one is for before turning it on.</p>
<p>Next, I used the Azure CLI to check T4 VM sizes and spot quota in the region closest to our users. Since a T4 is a T4, we realized we could do most experiments on a T4 instance we already had elsewhere, and ship only the finished setup to Azure.</p>
<p>We also sketched the networking. Previously, our web server and GPU server talked over a private network. On Azure, the plan is to put the web tier and the GPU node in different subnets of the same VNet (virtual network). The inference port opens only to the web subnet, and nothing on the GPU node should answer on a public IP.</p>
<p>The migration order is GPU inference, then web, then the database and search, then media processing and speech transcription. We start with what has the biggest payoff and is easiest to roll back. The very first step is one T4 kept always on in Azure ML.</p>
<h2 id="also-today">Also today</h2>
<ul>
<li>I skimmed the Foundry model catalog. Knowing the available models and how their quotas work up front saves confusion later.</li>
<li>I checked whether a newer voice model is billed under Azure Speech. Which service a model rolls up to affects the design more than its name suggests.</li>
<li>Some resource providers need to be registered before first use, so we made a note to check those ahead of time.</li>
</ul>
<p>Recently we got word that the Azure credits through the Inception path were approved. The amount is in line with the program's published figure, a few thousand dollars. For a team our size that covers a few months of real experiments, so we plan to treat it as a budget that informs design decisions, not as free money.</p>
<p>Here is what this journal will cover, and what it deliberately leaves out:
- In: which Azure services we picked and why, how we configured them, what broke and how we fixed it, and rounded costs.
- In: honest pros and cons compared with other clouds and with how we used to do things.
- Out: the specific content and data behind our workloads, account and resource names, and anything about the review process behind the scenes.
- Out: tricks for hitting spending targets. What we are doing is moving real work.</p>]]></content:encoded></item></channel></rss>