Outbound email engine at 400,000 sends a day, built on RabbitMQ and Redis

Abhinav Aditya
Published

0
  • Project creator

Commercial work at HireQuotient, a B2B recruiting platform. I built the outbound email engine from the first commit and still own it. It dispatches over 400,000 emails a day and handled more than 1.5 million in its busiest week.

This is the piece of work I point at when someone asks whether I can build something that survives real load.

The problem

Sending a lot of email is easy. Sending a lot of email that reaches inboxes is not. Providers rate limit per mailbox, reputation is per sender, and a naive queue that fans out as fast as it can will get an entire domain blocked inside a day.

How it works

Queue architecture. A horizontally scalable RabbitMQ and Redis system. Workers pull from provider specific queues, so a slow or degraded provider backs up its own queue instead of the whole system. Retries and dead lettering are built in rather than bolted on.

Sender pool rotation. Sends are distributed across a rotating pool of connected mailboxes with per mailbox pacing, which is what keeps deliverability intact at this volume.

Multi provider. Gmail, Outlook, SendGrid and raw SMTP or IMAP, each behind OAuth 2.0 connection flows, all behind one interface so adding a provider does not mean touching the send path.

Observability. Grafana, Prometheus and Sentry, because at this volume you find out about a problem from a dashboard, not from a customer.

Related work on the same platform

  • A multi agent GenAI pipeline on async FastAPI: three cooperating stages named Gatekeeper, Generator and Critic that score relevance and personalise outreach, replacing what had been manual lead sourcing.
  • A conversational recruiter copilot on LLM tool calling, exposing more than six natural language actions.
  • More than six ATS and data provider integrations behind a single abstraction layer, each with OAuth 2.0 and two way sync.
  • Infrastructure: Docker across five services, ECS and ECR provisioning with Terraform and Ansible, and a branch locked CI/CD pipeline in GitHub Actions that blocks unauthorised production deploys across the org.

Stack

Python, FastAPI, Node.js, Celery, RabbitMQ, Redis, AWS SQS, MongoDB, Docker, AWS ECS and ECR, Terraform, Ansible, GitHub Actions, OAuth 2.0, Grafana, Prometheus, Sentry