Skip to content

ADR: Blue-green on a $13 plan, measured and held

ADR: Blue-green on a $13 plan, measured and held

Status: accepted, 2026-10-07 (1.0.3.96), and what it accepts is holding. The rolls were measured first, the cheapest fix shipped on its own in 1.0.3.89 (the container answers before it loads the catalogue), and the second copy of each site that blue-green needs was not created: on Steve's word, "1 for now", and on the plan's memory, which has no room for it. This record keeps what was measured, what each option costs, and what would bring it back.

In plain words

Every deploy of this site takes it offline for a few minutes. The usual cure is blue-green deployment: two copies of the site, the new version started on the idle copy, and visitors moved across only once it answers. On Azure that is usually deployment slots, which need the Standard tier at about $56 a month more than this site's plan. This record measured where the minutes go before buying anything, shipped the one fix that costs nothing, and found that the rest of the minutes belong to the platform swapping the container on its single instance, which only a second copy running beside the first removes. That second copy does not fit in the plan's memory, so it waits.

What that is worth: a visitor's slow minutes after a deploy shrank from as much as two minutes to a few seconds, a developer can see why the offline stretch is still there and what removing it would cost, and the organization was not sold a tier to fix a stretch it could measure first.

Context

Steve, 7 October: "When a deployment happens all of the api end points are frozen for 30 sec." Both sites run on one Linux B1 plan, one core and 1.75 GB, about $13 a month (ADR: One plan, two sites).

Before any code (read only). The three rolls Application Insights held in full, 1.0.3.84, 1.0.3.85 and 1.0.3.87, read from 20 minutes before each roll to 20 after; times are seconds from the start of the deploy's roll step.

Phase of a roll 1.0.3.84 1.0.3.85 1.0.3.87
Settings, then the image, written +6 to +19 +6 to +19 +6 to +19
Old container answers normally to about +110 to about +150 to about +150
Old container slows: reads of 1 to 26 s, some never answered from about +120 from +155 from +162
Last request the old container answers about +200 +225 +268
New containers log "Now listening", both sites within 2 s +412 +437 +437
Nothing answers at the origin 1 to 3.5 minutes about 3.5 minutes about 3 minutes
New containers' first 150 s: median read, worst read 172 ms, 18 s 342 ms, 112 s 246 ms, 64 s

Three things that reading settled. Writing the app settings did not restart the live site: they were written at +6 s and the old container served normally for two minutes after. The roll does not overlap the containers: on one instance the old container stopped answering minutes before the new one listened. And the new container listened late because it loaded a hundred thousand vehicles first, on the core both sites share.

Decision

Listen first, load after (1.0.3.89, $0). The host answers at once and loads the catalogue beside the server; every API read waits for the load without holding a thread, and /readyz says not ready until the catalogue is in (ADR: The ports learn to wait).

// The default store's bids and catalogue load beside the server, not before
// it. The server listens at once, so a roll's new container answers the
// platform's probes and serves the page's files in seconds. Every API read
// waits for the catalogue, and waits without holding a thread, because the
// pipeline awaits the warm before any /api endpoint runs (Warmth, Stores.cs).
// /readyz says not ready until the catalogue is in, so the deploy and a
// blue-green swap wait for the same thing a visitor would.
//
// The bids replay first. It is a few rows against a hundred thousand
// vehicles, so it is done long before the catalogue, and an API read let
// through by the catalogue's warm finds every bid already in place: no
// visitor sees a sold vehicle offered, or their own bids missing, in the
// first minutes after a roll.
//
// A dataset that cannot be loaded still ends the process, loudly, rather
// than serving a site with no catalogue: the failure is logged and the host
// is stopped, so the platform restarts it and says so. A host already
// stopping, as a test's host does when it is disposed mid-load, is left to stop.
_ = Task.Run(async () =>
{
    try
    {
        // The host's stopping token, not the start token: these two run beside the
        // listening server and for minutes after StartAsync has returned, and they are
        // the callers that START the shared replay and the shared warm-up, so what they
        // lend is what the store, the background fill and the words backfill all see. A
        // container being replaced now stops loading instead of filling a store it is
        // about to be shut down for (ADR: The ports learn to wait, the addendum on the
        // token).
        var stopping = lifetime.ApplicationStopping;
        await backends.Default.Startup.Time("bids", backends.Default.Bids.LoadAsync, stopping);
        await backends.Default.Startup.Time("catalogue", backends.Default.Inventory.WarmAsync, stopping);
        backends.Default.Startup.Ready();
    }
    catch (Exception ex) when (!lifetime.ApplicationStopping.IsCancellationRequested)
    {
        logger.LogCritical(ex, "The {Store} store could not be loaded; stopping, so the platform restarts the container", backends.Default.Name);
        lifetime.StopApplication();
    }
}, CancellationToken.None);

Live from api/TheYard.Api/Shared/Hosted/CatalogueWarm.cs, region listen-first, read from this build at 99df7a8.

Readiness on every store, for whatever swaps next. /readyz?stores=all answers 200 only once every store the host runs has its catalogue in (ADR: The order of the request pipeline). It is the read a roll waits on before it moves a visitor, whether that roll is a second copy, a slot, or a second instance.

No second copy yet. The green apps, the color-aware roll and the edge function that flips between colors were written and not merged.

Every roll since, read the same way

A probe on Steve's machine reads each site's origin (/, /healthz, /api/version, /api/facets) and domain (/api/version) every two seconds through each roll (scripts/probe-roll.py). Its 30 seconds is a limit on each wait on the socket, not on the read, so a read whose answer arrives in pieces can run past it. The roll of 1.0.3.95 logged good answers of 41.8 to 45.8 s; three other rolls logged failed reads of 40 to 57 s. Application Insights stops recording at its daily cap in the afternoon, so these numbers come from the probe, a different instrument from the table above.

Two columns, read the same way on every row. The first is the longest stretch in which an address got no good answer, from the shortest of the ten addresses to the longest. The second is the slowest good read that was sent after that site's API had answered under the new version, for the Azure SQL site then the Azure Cosmos DB site: the reads sent before it are queued through the swap and answered together the moment the container listens, so each of them reads as the 26 to 30 s it waited and says nothing about the new container. The logs are greenlane-probe-103NN.log.

Roll What changed No good answer, longest Slowest good read after the API answered
1.0.3.89 listening first 158 to 186 s 7.1 s and 7.1 s
1.0.3.92 the request pipeline reordered 153 to 168 s 4.5 s and 3.6 s
1.0.3.93 the runtime reading 131 to 157 s 4.1 s and 6.0 s
1.0.3.94 compiled ahead of time 148 to 185 s 6.8 s and 5.8 s
1.0.3.95 the records index read from the records 119 to 156 s 23.4 s and 2.4 s
1.0.3.96 this record, and the probe 271 to 314 s 10.1 s and 5.1 s
1.0.3.97 the template keeps the telemetry link 151 to 227 s 8.0 s and 8.2 s

The stretch with no answer has held at two to five minutes through every change inside the container, /healthz included, which answers the moment the process listens and reads no store. Those minutes are App Service stopping the old container, pulling the new image and starting it on its one instance. The 23.4 s on the Azure SQL site at 1.0.3.95 is one stall eight and a half minutes after the start: every address of that site, /healthz included, answered nothing for 23 s and then answered together, while the Azure Cosmos DB container beside it answered throughout; what paused it was not measured.

What it costs, against what it replaces

Option Added a month Stretch with no answer Why it is or is not taken
In-place roll, listening first (since 1.0.3.89) $0 two to five minutes taken
A second copy of each site on this plan, stopped until a roll $0 none, if it fits the plan reads 92 per cent of its memory used at the median over ten days; two more containers do not fit
The plan moved to B2, two cores and 3.5 GB, with the second copy about $13 none room for both copies; held until Steve asks for it
A second B1 plan for the copy during rolls about $13 none the same cost, and the new copy's load stays off the live core
Standard tier with deployment slots about $56 none four times the added cost for the same overlap

What would bring it back

Steve asking for zero-downtime deploys at about $13 a month, or the plan's memory falling far enough that two more containers fit. The code that was written is kept on its own branch and is not described here as if it shipped; this record links only what is on the main branch.

Addendum, 2026-10-08 (1.0.3.98): the table read again against its logs

Every number in this record was read again against the probe logs. Two things were wrong and are corrected above rather than left standing. The probe was described as giving up on a read at 30 seconds; its 30 seconds is a socket timeout on each wait, and the logs hold good answers of 41.8 to 45.8 s. The slowest-answer column had mixed two readings: the 1.0.3.89 row gave the slowest read sent after the new container's API had answered, while the rows after it gave the probe's own summary figure, which is the longest a read queued through the swap waited and comes out near 30 s on every roll. The column now gives the first reading on every row, and the rolls of 1.0.3.95 to 1.0.3.97 are added. The stretch with no answer stays the platform's, and the rolls since 1.0.3.94 are read in ADR: Compiled before it ships, the addendum on the four rolls.

Where it sits

Outside the rings: the deploy and the plan. One change reached the host, listening before the catalogue is loaded, in the API ring's startup, and it changed no port. Single responsibility: the host says when it is ready, and the roll, whichever one ships, decides when to move a visitor.

Addendum, 2026-10-20 (1.0.3.188): listening first, from a hosted service

From 1.0.3.188 the listen-first warm is Hosted/CatalogueWarm.cs rather than a region of Composition/Startup.cs, which is gone (ADR: The onion cut into vertical slices, rule 2). It starts the load when the host starts and returns at once; what the deploy and a swap wait on, /readyz, is unchanged.

Files

Addendum, 2026-10-21 (1.0.4.24): the plan and the copy, now

The record's plan is a B1 and a second plan for the copy is weighed above. Since 8 October the plan is a B2, which the rendering service runs on beside the API (ADR: A rendering service beside the API); no second copy runs during rolls; and since 19 October one web app serves both sites and The Shed (ADR: One web app for every .NET process), so the thirty-second freeze this record measured is one app's swap.

Addendum, 2026-11-16 (1.0.5.51): two rolls read in seconds, and the words that describe them

What stopped being true: that a roll takes the site offline for minutes. The same probe read two rolls in November from WickedAwsome, every two seconds on ten addresses for 25 minutes: 1.0.5.19 on 11 November and 1.0.5.42 on 12 November. On every address the longest stretch with no good answer was 2 to 4 seconds, where 2 is the probe's own interval and 4 is one read that got no good answer; the slowest good read after the new version answered was 1.2 and 1.8 seconds at 1.0.5.19 and 4.2 and 4.1 seconds at 1.0.5.42 (the Performance page, "What a deploy costs a visitor", has both rows and the log names). What is still true: no second copy runs during a roll, so the site is not blue-green and a roll is not one with no downtime. Until this version the first screen said the site "rolled blue and green, with no downtime", beside the button that opens this record; it now says it rolled in place by the pipeline, behind one gate, and a test holds the first screen and the review stops to never saying blue-green, "blue and green", "no downtime" or "zero downtime" while this record says the second copy was not created. Whether the first screen may name the few seconds is the owner's call and is not taken here.

Enforced by

Not machine-checked. Held by review.

Store

The Yard, home

Steven StoutStaff .NET engineerRemote

Production .NET that stays up. Built with AI, measured on every version.

Steven Stout

Hi, I'm Steve. I build the systems that make delivery boring in the best way, then coach people inside them.

  • 200+

    production releases, none took the platform down

    Conway Investment Research, 2019 to 2024. Sole engineer for the first three years on a live financial advisory platform.

    See how
  • 50%

    shorter release cycle

    Storee Construction, 2024 to 2026. Four ASP.NET applications onto one .NET 10 platform on Azure, with a four-person team I hired and mentored.

    See how

01Verified

Steven Stout

A real person, and the work is mine.

  • Identity

    Checked by LinkedIn, not by me.

    LinkedIn verified my government ID.

  • Running system

    You are looking at it.

    Version 1.0.5.273 is live. Nothing ships unless it passes the automated gates first.

That's who I am. Here's how I work.

02Strengths

Ten strengths, each with the proof beside it. The numbers match my resume and LinkedIn, and the live ones are read from this site as you look.

  • 01

    Keeps production alive

    200+ releases on a live financial platform, and none took it down. Sole engineer for the first three years.

    See the Conway work

  • 02

    Simplifies messy systems

    Four ASP.NET applications onto one .NET 10 platform on Azure, and a release cycle 50% shorter.

    See the Storee work

  • 03

    Marries dev and infrastructure

    Blue-green releases at Storee that flipped in about 5 seconds with nobody signed out, and Azure Front Door at two employers.

    See this site's cloud

  • 04

    Designs data that holds up

    White-label clients on one shared database, the isolation built into the data, and no cross-client issues.

    See the Conway work

  • 05

    Keeps AI-written code honest

    15 quality numbers that may only improve: 273 releases in a row with none worse.

    See the quality numbers

  • 06

    Resourceful

    $30,000+ cut from Azure and vendor spend at Conway. This site's Azure bill is public, resource by resource.

    See the bill

  • 07

    Builds people up

    Hired and mentored a four-person team. 13 colleagues recommend me by name.

    Read the recommendations

  • 08

    Takes ideas to production

    This site: designed, built and run solo, with 352 versions measured through one gate.

    How it was built

  • 09

    Writes clearly

    Posts on real engineering problems, in plain words.

    Read the blog

  • 10

    Owns decisions

    153 decision records, each with its tradeoff and the call I made.

    See the decision records

Built with AI. Gated so quality never slides.

Steven Stout’s showcase: a used-vehicle auction on .NET and React, built and run by one engineer, live on Azure, with its decisions written down.

No quality number has gotten worse at any release since 1.0.5.1 on 10 November: 273 releases in a row.

One engineer, an AI agent and a gate that checks 15 quality numbers on every release. 352 versions measured, with every result public, the worst days included.

82 releases in the last 7 days, each through the same gate.

Async methods with no CancellationToken, may only fall

11091.0.3.1391.0.5.2731.0.4.115, the ratchet
Every number, on the Quality page

TheYard, right nowLive

Answering in

unread

02505007501,000

server time at p95, the usual five minutes of the last day.

Azure this month

unread

the bill, by resource, read from Azure. The Admin tab shows every line.

Since the last roll

unread

 

rolled in place by the pipeline, behind one gate.

People who have visited

unread

30 days agotoday

Scanners, my own tools' and my own reads left out.

03Start here

04Where teams are heading

How I see engineering with AI, and the setup on this site that backs it.

AI-augmented teams · Architecture and ownership

AI writes more of the code. Someone still has to own what ships.

Teams are going to be heavily AI-augmented. That moves the senior job toward architecture and technical ownership: deciding what to build in pieces small enough to verify, and owning what ships.

  • Task tracking will get automated too. Judgment stays human: seeing a design fail at scale before it does.
  • On this site the AI's first design held the whole catalogue in memory. I caught it when the App Service plan hit 82 per cent and moved the work to the store.

What the AI wrote, what I decided

07Tech stack

  •    
  •    
  •    

Read from the build, never typed by hand

What TheYard runs on

What we use, where it runs, its AWS twin, the version as built, and the file that proves it.

Cloud patterns, not one vendor: every Azure piece in this stack has a named AWS twin. Mapped, not yet run on AWS.

  • .NET 1114 projects
  • React 19.3TypeScript 7.0
  • Azure9 Bicep files
  • 11GitHub Actions workflows
The whole stack, with the file that proves each line

The last release the gate stopped was 1.0.5.258 on 2 December, at its browser 1 of 2 job.

08How it is built

09How it is run

10Who and why

Next step

11What has to work, where is it today, and what does success look like?

Book 20 minutes opens an email to me with those three questions in it, and I answer with a time.

Book 20 minutes

Your email app should have opened with this message. If it did not, copy it and send it from any mailbox.

Or message me on LinkedIn