Four flavours of one Diameter agent, and how you replace one without dropping roaming
Seven containers, one base image, and a standby peer that freeDiameter chooses on its own when you stop the primary.
The Diameter routing agents are not a platform. They are one base image built from freeDiameter, plus one directory per flavour (a Dockerfile, a Makefile, the config templates, the deployment metadata). Three flavours face roaming partners on S6a; a fourth faces the IMS core on Cx (application 16777216, a different dictionary). A fifth was prepared for another partner in July 2025 and never merged to main.
Production is seven containers on six hosts across three sites (SITE-A, SITE-B, SITE-C), with one development instance at SITE-E. Each partner-facing flavour runs a primary and a connected standby on different hosts (instance 1 and instance 2). The repository itself predates this work by two years (first commit August 2022, one flavour); the second and third partner flavours, and everything below, were added from late 2024 onward.
It is Docker and ansible, and that is fine
There is no Kubernetes here and no service mesh. Deployment is the service-to-tanker pipeline — an ansible autodeploy playbook renders a docker create command per service from one shared template, with per-host variables supplying the hostnames, peer addresses and realms. Service discovery is the freeDiameter peer table (ConnectPeer entries, rendered from those same variables).
Saying so matters, because the deployment story only makes sense once you know there is no traffic-shifting layer to lean on:
All traffic goes via instance 1 by default, instance 2 is on standby, connected. Hence, we perform staged deployments by replacing the main instance first with an option to quickly fall back to the second instance.
The deployment workflow takes the flavour and the instance number as inputs (both required, both a dropdown), so instance 1 is replaced while instance 2 carries the connection. If the new build misbehaves, you stop it (/etc/init.d/wireless-dra-<flavour> stop) and traffic lands on instance 2 — because freeDiameter scores the remaining peer and routes there, with no load balancer involved. The runbook asks you to coordinate with on-call first, since the restart itself can fire alerts.
The default route nobody expected to need
One partner's agent does not advertise the relay application in its CER. freeDiameter will not select a peer for a realm it has no rule for, so every HSS-originated request had nowhere to go — Cancel-Location above all — while subscriber-originated traffic worked perfectly. The fix was a default route in that flavour's rt_default.conf and a matching peer entry, done for both partner flavours in November 2024.
That is the shape of most DRA work. The routing is declarative; the surprises come from what a peer declines to say about itself during capability exchange.
Limits, not optimisation
In July 2025 the autodeploy template gained two arguments on five containers (three DRAs and two STPs):
--memory=1g \
--memory-reservation=600m
A hard limit of 1 GiB and a soft reservation of 600 MiB (the container is killed at the first, reclaimed toward the second). That is no tuning exercise, and nothing got faster. These are signalling containers sharing a host with other signalling containers, and an unbounded process is only ever somebody else's incident.
Metrics are uniform across flavours on one port (PROMETHEUS_METRICS_PORT=8000, set in the base image), scraped into a single dashboard. The alerting rules live in a separate repository — which is why a DRA change and an alert change are two reviews.
Testing a new build on real traffic
The part worth copying is newer, from September 2026. Enumerated test subscribers in genuine roaming traffic are relayed from the production agents, through a per-flavour development agent, to a development subscriber database:
partner -> prod DRA 1/2 -> dev DRA -> dev HSS
dev HSS CLR/IDR/DSR -> dev DRA -> prod DRA 1/2 -> partner
ENV picks the config. With ENV=dev the agent loads the dev routing and access-control files and peers with the dev database; otherwise it loads the production files and peers with its own dev agent instead. The transforms run on the dev agent only, so a transform change can be exercised on production traffic. The production agent relays those requests untouched apart from Destination-Host (production database host to dev), which is what lets its routing rules select the dev agent at all. Running the transforms on both would undo them.
No test subscriber identities ship in the image. DEV_HSS_IMSIS on the container is the only source: the transform matches on it, and the start script renders the routing rules from the same variable, so the two cannot drift apart. Unset, nothing is diverted and the production agent does not peer with the dev environment at all.
The failure behaviour is deliberate and worth stating plainly. If the dev agent is down, the diverted subscribers fail with DIAMETER_UNABLE_TO_DELIVER (an error, never a fallback). Those subscribers live on the dev database, and both the production database and the partner peers are barred for them. A lab outage therefore cannot push a half-rewritten request into production, and every other subscriber is untouched.
One caveat is recorded without being solved: the hop between the production and development networks is plain TCP with No_TLS, like the other Diameter peers here, and it carries real S6a traffic including authentication vectors. Confirm it is inside the same IPsec as the existing peers before opening a test window.