ARCHITECTURE CASE STUDY · ANONYMISED

Event pipeline for business automations

I replaced a set of separate integrations with one queue-based platform. Failed jobs retry automatically, and each automation has a runbook for the team that supports it.

MY ROLE
Architect and lead developer
SCOPE
15 automations · 4 processes
STACK
Node.js, Redis queues, MySQL on Azure, Nginx, GitHub Actions
STATUS
In production
RESULT
About $5,000 a month saved

The problem

Each department needed its own automations: an alert when a job changed, a task when an appointment moved, an email when someone booked time off. Each one was built as a direct link between two systems.

With 15 of them, it was hard to tell what happened when a system went down, whether an event ran twice, or which script sent an email.

The design

Events go into a queue first. A worker then runs the automation.

no webhook: polledevery eventhealth
Pollerscheduled jobs
Source systemsfield-service · HR
Receivervalidate · log · ack
Queuesone per department
Workerruns automations
Servicesfield-service · email
Event logMySQL on Azure
Watchdogalerts on failure
  1. Source systemsfield-service · HR
    • Poller · scheduled jobs
  2. Receivervalidate · log · ack
    • Event log · MySQL on Azure
  3. Queuesone per department
  4. Workerruns automations
    • Watchdog · alerts on failure
  5. Servicesfield-service · email

Key decisions

  1. Queue first, then process

    The receiver and poller only add jobs to a queue. Failed jobs can retry, and one failing automation doesn't stop the others.

  2. Duplicate checks

    Each event has an ID and is logged once. If the same event arrives again, it's skipped. No email is sent twice.

  3. Separate test and production

    Each event is marked as test or production. Each environment rejects the other's events before anything is saved.

  4. Few dependencies

    The platform uses eight runtime dependencies. Each one is used in a single module.

Outcome

  • 15 automations now run on one platform. Together they save about $5,000 a month.
  • Automated tests and a security audit run on every pull request.
  • Each automation has a runbook, and the team has an on-call guide.

WHAT I'M LEARNING

How it could look on Azure

How each part could map to Azure services, based on what I'm studying.

Current setup and the Azure service it could map to
TodayOn Azure
Redis-backed queuesAzure Service Bus queues
Worker and poller processes on a VMAzure Functions or Container Apps
Custom watchdog processAzure Monitor + Application Insights alerts
Secrets in environment filesKey Vault with managed identity
Hand-provisioned serversBicep templates in the same repo