New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
TroubleshootingUpdated 26 Oct 2026

Load Testing Your Email Pipeline: Safe Methods, Sinks, Metrics and Capacity Planning Before a Big Send

How to load test email sending without harming reputation: using sandboxes and sinks, measuring queue depth and latency, simulating bounces and webhooks, capacity planning for peak events, and a test plan.

HM
Written by Hannah Mitchell
Product Manager, Onboarding
Reviewed by Tomasz Kowalski
  • Published20 Aug 2025
  • Read time6 min
  • Length1,181 words
Share this guide

Email systems fail under load in ways that functional tests never reveal. A password-reset flow that works for ten users a minute can stall at ten thousand; a queue that drains comfortably overnight can lag for hours during a flash sale; a webhook endpoint that handles ordinary traffic can collapse when a campaign's bounces arrive together. The temptation is to test by sending real mail to real addresses, which is exactly the wrong thing to do: it damages reputation, annoys recipients and may violate your provider's terms. This guide explains how to load test an email pipeline safely, using sandboxes, sinks and simulated events, which measurements to take, how to find bottlenecks in your own application and in the path to the provider, and how to turn the results into a capacity plan and a go or no-go decision before a high-volume event. See also peak season planning and staging and sandbox testing.

NeverNever load test by mailing real or invented addresses at a mailbox provider
UseA mail sink, sandbox mode or provider test addresses that accept and discard
MeasureThroughput, queue depth, end-to-end latency, error rates and resource use
OutcomeA documented capacity figure with headroom, and alerts tuned to it

What you are testing

ComponentTypical limitsWhat to observe
Application and job queueWorker count, database locks, template rendering timeJobs per second, queue depth, retry storms
Template and personalizationCPU for rendering, data lookups per messageRender time per message at scale
Connection to the providerConcurrent connections, messages per connection, API rate limits. See connection poolingConnection errors, 4xx throttling responses, latency
Provider acceptancePer-account sending limits and queue policiesAcceptance rate, time to accept
Webhook receiverRequest rate, database writes, signature checks. See webhooks vs pollingResponse times, failures, backlog
Downstream systemsCRM, analytics, suppression syncLag and error counts
Outbound to recipientsThrottling by receiving providers. See throttlingDeferral rates; cannot be load tested without real delivery

The last row is the one you cannot test safely: receiving servers decide how fast they accept your mail based on reputation, and that is measured only on real campaigns. Test your own half of the pipeline thoroughly, then ramp real sends gradually. See warm-up.

Safe test targets

  • A mail sink. A server that accepts mail on SMTP and discards it or stores it for inspection. Tools such as MailHog, Mailpit, Smtp4dev or a simple Postfix sink with a catch-all route do this. Run it in your own network.
  • Provider sandbox mode. Many sending platforms offer a mode that validates and queues requests without delivery. Check your provider's documentation and limits.
  • Provider-supplied test addresses that simulate delivery, bounce and complaint outcomes. Use only those documented for the purpose.
  • Your own domain with a test MX that points to the sink. Keep it clearly separate from production domains and do not send to third-party addresses.
  • Mocked provider endpoints in your application, which let you test your code at much higher rates than any real provider would accept.

Never use made-up addresses at real domains, and never "test" with purchased or old lists. Bounces and spam traps from such tests harm your domain and IP reputation. See spam traps.

Designing the test

  1. Define the goal as a number: for example "send 500,000 messages within 30 minutes with the 95th-percentile queue-to-accept time under 60 seconds".
  2. Model realistic traffic: message sizes with typical templates and attachments, personalization variables, a mix of transactional and campaign sends and recipients spread across domains.
  3. Ramp in steps: 10, 25, 50, 100 per cent of the target, then 150 per cent for headroom. Hold each step long enough for queues to reach a steady state.
  4. Inject failures: slow responses, 4xx throttling, connection resets and provider timeouts. Observe retries and backoff. See rate limits and backoff.
  5. Simulate events: replay realistic volumes of delivery, bounce, complaint, open and click events to your webhook receiver, including bursts and duplicates.
  6. Run long enough to expose memory growth, connection leaks and database bloat: at least an hour for key steps, and an overnight soak for important systems.
  7. Capture everything: metrics, logs and traces with timestamps, so you can find the first bottleneck.

Metrics to record

MetricWhy it mattersWarning sign
Enqueue rate and dequeue rateShows whether workers keep upQueue depth rises steadily
Queue-to-accept latency (p50, p95, p99)What users experience for time-sensitive mailp99 grows far above p50
Provider response codesThrottling and errorsRising 4xx or 5xx rates
Connection count and reuseEfficiency of poolingMany short connections
Worker CPU and memoryResource limitsSaturation or growth over time
Database load and lock waitsFrequent bottleneck for status updatesSlow queries, deadlocks
Webhook response time and backlogEvent pipeline healthTimeouts and retries
Error and retry countsHidden amplificationRetries multiplying load
Duplicate sendsCorrectness under retryAny duplicate. See idempotency patterns

Typical bottlenecks

  • Database writes for every message status, which can be batched or moved to a queue.
  • Template rendering that fetches data per message; pre-load or cache shared data.
  • Opening a new connection per message; reuse connections or use the API in batches.
  • Retry storms: failures trigger immediate retries that add load. Use exponential backoff with jitter.
  • Priority inversion: a large campaign delaying password resets. Use separate queues and priorities for transactional mail. See separate streams.
  • Webhook bursts arriving with the campaign's bounces, overwhelming a synchronous handler.
  • Single points of failure, such as one worker pool or one provider region.

Tools and approaches

Generic load tools such as k6, Locust or JMeter can generate the application-level traffic that triggers sends, while a mail sink records what arrives. For SMTP-level tests, scripts using a mail library can open many connections and submit messages to the sink. Use realistic message bodies, because very small test messages hide the cost of rendering and encoding. Run tests from the same network position as production if possible, since latency to the provider affects throughput. Record the exact configuration of each run, including worker counts and connection limits, so that results are comparable and repeatable when you test again after changes.

From results to a capacity plan

Record the highest rate sustained with acceptable latency, then apply headroom: plan to operate at no more than about 60 to 70 per cent of that figure at the expected peak. Write down the scaling levers (more workers, more connections, higher provider limits), the time each takes and who can pull them. Ask your provider in advance to raise sending limits for the event, and confirm reputation and warm-up status for any new IPs. Prepare a rollback and a degraded mode, such as delaying low-priority campaigns to protect transactional mail. See reliable sending queues.

Readiness checklist for a big send

  1. Authentication, reputation and suppression lists checked. See deliverability checklist.
  2. Load test results documented, with the bottleneck fixes deployed.
  3. Dashboards and alerts for queue depth, latency, errors, bounces and complaints. See delivery monitoring.
  4. Staged ramp-up plan with stop conditions, such as a bounce or complaint threshold.
  5. On-call staff and escalation contacts, including the provider's support.
  6. Communication plan if delivery is delayed.
  7. Post-send review to compare predictions with results.

Load testing an email pipeline is mostly about everything that happens before mail leaves your control. Test that half hard and safely, ramp the real sending carefully, and the day of the big send becomes a routine operation.

Plan for peak volume Talk to us about capacity, limits and warm-up.

Explore the SMTP relay

References and further reading

Frequently asked questions

Can I load test by sending to real addresses?

No. It harms reputation and may breach terms. Use a sink, sandbox or documented test addresses.

What should I measure in an email load test?

Queue depth, queue-to-accept latency, provider response codes, resource use and webhook backlog.

How much headroom should I plan?

Operate at about 60 to 70 per cent of the proven maximum at expected peak.

Can I test receiving-provider throttling?

Not safely. It depends on reputation and appears only in real sends, so ramp real campaigns gradually.

How do I protect transactional mail during a campaign?

Use separate queues, priorities or streams so campaign load cannot delay password resets and receipts.

Topics#load testing#capacity#queues#sandbox#monitoring
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales