Subscribe free
Morning Merge Architecture · Tuesday, November 24, 20264 min read

Agoda draws module walls inside its monolith

Also: Cloudflare gates DNS releases, CloudFront HTTP/2 to origins, audited ZDR

Today is about boundaries a machine can check: in the build, in production and at the edge. Agoda's is the one to copy first.

The main thing

A fuchsia drafting compass, scaffold tower and gate dividing a large isometric block into separate walled rooms

Agoda put module walls inside its monolith instead of rewriting it. InfoQ reports that Agoda added a modular monolith framework to BAPI, its post-booking API for cancellations, booking amendments, refunds and customer communications. Agoda says median code review time fell 64% for changes built on it.

The history will sound familiar. Agoda pulled BAPI out of its aging core monolith in 2019 with a largely line-by-line migration, a tactical trade it says the business needed at the time. Merge requests more than quadrupled between 2022 and 2025, and some files passed 4,000 lines.

Instead of a rewrite, the framework, called Platform, organizes code by business domain (cancellations, rebooking, payments) rather than by technical layer. Each component keeps its own application, service, repository and model layers behind defined interfaces.

A Data Mapper keeps database entities and API payloads out of business logic, and typed builders put object construction in one place you can find.

The enforcement is ArchUnit. Agoda writes its boundaries as tests in CI, for example that repository-specific models can only be used by their own repository, so a violation fails the build.

One engineer said the pipeline catches "structural drift on every pull request before a human reviewer ever sees it." That's the likely source of the review gain: reviewers stop policing imports.

The Q2 2026 numbers: median review completion of 1.08 hours for framework-backed changes against 3.02 hours for legacy ones, and 10.34 hours against 15.77 to the first substantive feedback.

Between June and August, framework-backed changes also used 29% fewer AI prompts per 100 changed lines, though median prompts per merge request were close (20 vs. 22). Agoda calls the AI findings directional.

Read the comparison with one caveat: it sets new code against legacy code, so some of the gap may be the code's age rather than the walls. The mechanism still holds up.

What to do: if slow reviews are pushing you toward splitting a monolith into services, try this first.

Pick one domain, write its boundary as an ArchUnit test (Spring Modulith does module verification for Spring Boot), and make it the default for new modules. Like Agoda, migrate old code only when a feature already touches it.

Proving it in production

A fuchsia compass measuring out to a ring of relay towers while a fuchsia barrier holds back a crate

Cloudflare probes DNS the way customers hit it, and lets the results gate releases. In one rollout of the service that publishes DNS records to Cloudflare's edge, a scheduling bug left some record changes unpublished for hours. The service stayed up and healthy, but new hostnames were slow to resolve and certificates couldn't be issued.

Cloudflare's answer was to extend Flamingo, its end-to-end framework that already runs hundreds of millions of tests a day against the edge. Tests use a small setup-request-response DSL, so a failure points at the system, not at the test code.

Cloudflare generalized the request into an action, which made a DNS query one more module. It says propagation measurements now decide whether a release goes ahead or gets rolled back.

The lesson travels. If your system can be up and wrong at the same time, probe the outcome customers see, from where they see it, and wire that to rollback.

CodeDeploy can now hold off Auto Scaling during in-place deploys. Scaling activity could terminate or replace an EC2 instance mid-update and fail the deployment. CodeDeploy can now suspend any mix of Terminate, AZRebalance, InstanceRefresh and ScheduledActions for a deployment group or a single deployment, and resumes them when the deploy succeeds, fails or is stopped.

If you wrote scripts for this, set it on the deployment group instead; existing pipelines pick it up.

At the edge

A fuchsia compass and scaffold gathering many thin cables from a relay station into one braided cable to a building

CloudFront now uses HTTP/2 to talk to your origin. Until now, CloudFront reached custom and VPC origins over HTTP/1.1, one request at a time per connection. A burst, such as an AI agent making many tool calls at once in AWS's example, meant more origin connections and more TLS handshakes.

Now requests share connections, at no extra cost. If the origin doesn't support HTTP/2, CloudFront falls back to HTTP/1.1. Fewer connections means more requests riding each one, so check your origin's per-connection limits before the next spike.

Global Accelerator keeps client IPs through TLS-terminating NLBs. Before, you couldn't add an NLB with a TLS listener to an accelerator with client IP preservation on, so you chose between terminating TLS at layer 4 and seeing the real client address.

Now you get both, with no extra configuration or charge, in commercial Regions other than GovCloud and China. That fixes rate limits, geo-blocking and allowlists for non-HTTP TCP and static-IP workloads.

Vercel's AI Gateway now audits zero data retention claims. On Sunday we covered OpenRouter dropping providers that weren't honoring their data policies. Vercel's response: a provider gets the Audited ZDR label only after an independent security firm tests its claims.

The gateway also runs canary audits that send prompts containing unique URLs through the normal inference path, each URL privately mapped to one provider, model and run, to detect prompt content read outside that path. A canary can catch a leak, but silence doesn't prove there isn't one.

Put the audit status on your data flow diagram, next to the provider list.

Write the boundary down where a machine checks it: in CI, in a production probe or in an audit.

← All Morning Merge Architecture issues

Get this in your inbox every morning.

Free. Five minutes. Unsubscribe in one click.

Subscribe free →