Smart Sending Infrastructure & Sharding Flow
Understand the core mechanics, queues, and logic routines running on our servers when processing this module.
System Execution Pipeline
Below is the step-by-step sequence of events executed by our background workers.
Campaign Triggered
A campaign starts and requests a batch of jobs from the database.
Queue Injection
Recipient jobs are pushed to BullMQ with individual randomized delay timestamps (jitter).
Account Rotation
Workers query Redis for the next active sending account, skipping accounts in cool-down.
Relay Connection
Credentials are decrypted in-memory, and Nodemailer establishes an encrypted TLS session to relay the email.
Feedback Loop
If the provider reports throttling (421/429), the account is flagged in Redis to cool down for 60 minutes.
Developer & Architect Notes
Technical Architecture
This module operates as a stateless service hosted across horizontally scalable server nodes. Distributed state coordinates through highly optimized Redis transactions to ensure consistency without deadlocks.
Edge Fail-Safe Rules
Critical protocols (like connection failure retries, cool-down timers, and data limits) are verified before outbound dispatches. Failures degrade gracefully, prioritizing list health and preventing blacklisting.