How one engineer and AI agents rebuilt our email renderer in Go 

One engineer and a team of AI agents rebuilt the renderer behind every Design Studio email in Go. The new version matched the old output across more than half a million real emails and runs 2-9x faster.

Siva Subbiah
Siva Subbiah
Software Engineer
node to go: render times dropping from seconds to milliseconds

Author's note: this post was co-written with Claude.

Design Studio is where Customer.io customers build their emails. Behind every preview, publish, test send and API call sits a renderer. It takes what someone designed in the editor and turns it into the HTML that email clients actually understand. That step runs more than half a million times a day, and the emails it produces go out to inboxes more than a billion times a month. At that scale, every millisecond and every byte the renderer gets wrong reaches a lot of people.

For years, that renderer lived in Node.js. This is the story of how we moved it to Go without anyone noticing, except that everything got faster.

The renderer that couldn't scale

The old renderer had a hard ceiling. Every render ran inside one shared JavaScript engine, so renders waited in line behind each other. That design kept customers' components safely sandboxed and worked well when Design Studio was smaller, but our customers outgrew it. Adding more servers didn't help much: throughput topped out around 32 renders a second.

Customers felt it in the slow moments:

  • A publish in 40 languages took more than 5 seconds, because each language waited for the one before it.
  • Checking an email for unpublished changes could take over 10 seconds.

One afternoon in July, a marketer at one of our larger customers went to publish an email for an automation launching the next day. The same email had published fine that morning. This time, Publish returned an error, and our support team escalated it as a launch blocker. A few weeks later, another customer told us the whole product felt slow. The slowness was in Design Studio, where a routine check for unpublished changes kept running into our 30-second timeout.

There was a second reason to move. The rest of Customer.io runs on Go, and Design Studio's backend had grown up on a separate Node.js stack. Every Node.js piece meant different deploys, different monitoring and a different set of things to know. Rendering was the largest and most critical piece left.

Where we landed

Rendering now runs in Go, next to the services that need it. Each render runs on its own, so capacity grows with hardware instead of queueing.

Render time

Node.js

Go

Faster by

Typical render (p50)

0.29s

0.14s

2x

Slowest 5% (p95)

1.41s

0.44s

3x

Slowest 1% (p99)

5.15s

0.80s

6x

In our EU region, the slowest 1% of renders went from 7.8 seconds to 0.84 seconds, about 9x faster. The slow cases improved most, and those are the ones customers notice.

Once rendering was ours in Go, we could make it smarter too. A workspace can have hundreds of reusable components, and the old renderer loaded all of them for every email. Now each email loads only the components it uses. For our largest workspaces, that cut render time by another 63%.

Since the switch, we've had no capacity incidents and no complaints from customers.

The hard part: change nothing

Rewriting a renderer is the easy half. The hard half is proving that it produces exactly the same email.

Email is unforgiving. A missing space or a reordered attribute can break a layout in one email client and not another. Customers had built thousands of emails on the old renderer, so our bar was simple: the new one must produce byte-for-byte identical output before it serves a single customer.

We met that bar in three stages:

  1. We rendered every real Design Studio email through both renderers and compared the bytes. That was more than half a million emails across our US and EU regions. The first run found about 3,500 differences, and we fixed every one.
  2. We ran both renderers side by side on live traffic, comparing every result, until the mismatches dropped to zero.
  3. We moved customers over gradually, starting with our own workspaces.

How AI changed the math

This started in July as a side quest

One of our engineers wanted to know whether the renderer could move to Go at all. Early results showed renders 2–4x faster, and in September the side quest became a full-time project.

Without AI agents, we estimate this would have taken two or three engineers six to nine months. It took one engineer about four months, with help from teammates on reviews and the final stretch. Four habits made the difference.

The old code became the spec

Nobody had written down every quirk of the old renderer, and some quirks had become features customers relied on. So the agents didn't guess what Node.js should do. They ran the real Node.js code on real inputs, captured its exact output, and turned each output into a Go test. The new renderer had to match the old one, quirks included. We ended up with nearly 400 tests, each pinned to what the old system actually did.

Agents chased the differences

Each of those 3,500 differences needed someone to find the email, narrow it to the smallest input that showed the problem, work out which step disagreed, and fix it. That loop is tedious for people and well suited to agents. One engineer could direct several investigations at once and spend their own time on the judgment calls: is this difference a bug, or a quirk we should keep?

A second agent reviewed the first

Every change went through an AI review before a person looked at it, and a deeper review for anything risky. The deep reviewer had to prove its findings by running code, not just reading it. Those reviews caught real bugs, including a test that would have passed even if the code it guarded broke.

Agents watched the rollout

As we moved customers over, agents checked dashboards and logs every hour, compared speeds with the day before, and flagged anything unusual. They fixed review comments on pull requests while the engineer slept. Rollouts are long and boring until the moment they aren't, and the agents never got bored.

What it cost, and what didn't work

All of this ran on Claude Code, and the AI bill for the whole project came to a few thousand dollars. Most of that wasn't new work: an AI model rereads the whole conversation every time it replies, and our main working session ran for months. That's our first lesson. Start a fresh session for each piece of work and keep the handoff in notes, not in one endless conversation.

Other things didn't go smoothly either:

  • Agents can be confidently wrong. An agent once told us one dashboard panel covered another when it didn't. Reviews caught it, but it was a reminder that agents can drive while people still own correctness.
  • Scope grew. The first full comparison turned up more differences than we expected, which added a couple of weeks.
  • Our checker lied to us. For a while, a batch of "differences" turned out to be bugs in the comparison tool, not the renderer. The tool had its own outdated copy of one piece of logic. Now we test the checker before we trust its verdict.
  • Shrinking a bug can create a new one. Agents are good at cutting a failing email down to the smallest input that still fails. Once, the cut-down version failed for a different reason than the original. We now confirm every root cause against the original email before we fix anything.

What we'd tell other teams

Pick a migration where the old system can serve as the answer key. When every question of "what should this do?" has a ground truth you can run, agents become remarkably effective. They can test thousands of cases, explain each difference, and propose a fix you can check.

Then keep the humans where the judgment is: deciding which differences matter, when to roll forward, and when something just feels off.

If this is the kind of engineering you want to do, we're hiring.