Most applications start by sending emails directly from request handlers. As channels and volumes grow, that approach breaks: slow providers delay pages, failures are lost, users are spammed, and nobody knows what was delivered. A small, dedicated notification service fixes all of this and can be shared by every application you run.
Architecture
apps ─▶ notify API ─▶ queue ─▶ router (preferences, templates)
├─▶ email worker ─▶ email provider
├─▶ sms worker ─▶ SMS provider
├─▶ whatsapp worker ─▶ WhatsApp provider
└─▶ push worker ─▶ FCM / APNs
providers ─▶ delivery webhooks ─▶ status updates
Applications describe the event; the service decides who, how and when.
Queues and Workers
Accept requests quickly, store them, and process in workers (see our workers guide). Separate queues per channel and priority keep urgent messages (OTPs, password resets) from waiting behind bulk campaigns. Workers must be idempotent: a retry must not send a second OTP or a duplicate invoice email.
Templates and Localisation
- Store templates per notification type, channel and language.
- Keep SMS short and plain; email can be rich; WhatsApp follows approved template formats.
- Version templates and preview them with sample data before release.
- Escape variables to prevent injection into HTML emails.
User Preferences and Consent
Respect channel preferences, unsubscribes and quiet hours. Transactional messages (OTPs, receipts) and marketing messages follow different rules; keep consent records and honour opt-outs immediately. Over-notifying drives users to block your messages entirely.
Indian Channel Rules
- SMS: commercial SMS in India requires registered sender IDs and DLT-registered content templates; messages that do not match a registered template can be blocked. Work with your SMS provider on registration.
- WhatsApp: business-initiated messages use the WhatsApp Business Platform through approved providers, with pre-approved templates and user opt-in.
- Email: authenticate your sending domain with SPF, DKIM and DMARC.
Rate Limits and Throttling
Providers limit requests per second and sometimes per recipient. Throttle workers to stay within limits (token buckets in Redis work well), spread bulk sends over time, and back off when providers return rate-limit errors.
Retries and Fallbacks
- Retry transient errors with exponential backoff; do not retry permanent failures (invalid number, unsubscribed).
- Optionally fall back to another channel for critical messages, for example email after a failed SMS.
- Expire time-sensitive messages: an OTP delivered after it expires is useless.
Delivery Tracking
Providers report delivered, failed, bounced, opened or read through webhooks. Process them reliably (see our webhook guide), update message status, suppress addresses that hard-bounce, and show delivery history to support staff when customers say "I never got it".
Monitoring
Track queue depth per channel, send rates, provider errors, delivery rates and latency from event to delivery. Alert when OTP delivery slows or a provider's error rate jumps, and keep a secondary provider ready for critical channels.
Sizing
| Volume | Suggested plan |
|---|---|
| Up to hundreds of thousands of notifications per day | 2 vCores / 8 GB |
| Millions per day, many channels | 4 vCores / 16 GB with more workers |
Providers do the heavy lifting; your service mostly waits on network calls, so workers can use async I/O or higher concurrency.
Common Mistakes
- Sending from request handlers, so slow providers slow your app.
- One queue for everything, so OTPs wait behind campaigns.
- Retrying permanent failures and annoying users.
- Ignoring DLT and WhatsApp template rules, leading to blocked messages.
In Short
Queue everything, route by preferences, send per channel within provider limits, retry wisely, track delivery and follow the rules for each channel.
Example: An E-commerce Platform
An online store sends order confirmations by email and WhatsApp, OTPs by SMS, and shipping updates through push notifications. Its notification service runs on a 2 vCore / 8 GB VPS with Redis queues: a high-priority queue for OTPs and password resets, a normal queue for order updates and a low-priority queue for campaigns. Each channel worker uses a token bucket matched to the provider's limit. When the primary SMS provider had an outage during a sale, the service switched OTPs to a secondary provider automatically, and support staff could see the delivery history of every message when customers called.
In-App Notifications
In-app notifications (the bell icon in your web or mobile app) need no external provider. Store them in the database per user with a read flag, deliver new ones in real time over WebSockets or server-sent events, and let users mark them read. They are a good default for low-urgency updates that do not justify an email or SMS, which reduces costs and notification fatigue.
Next Steps
List every notification your applications send today, decide the channel and priority for each, register SMS and WhatsApp templates, and move sending behind a single queued API one notification type at a time.
Data Model
Keep a record for every notification: the event, recipient, channel, template version, provider message ID, status history and timestamps. This history answers support questions, powers analytics, and lets you prove that a required message was sent. Apply retention so old records are archived or deleted, and avoid storing full message bodies containing OTPs or personal data longer than needed.
In-App Notifications
In-app notifications are stored in your database and shown in a bell or inbox in your application. Deliver them in real time over WebSockets or server-sent events, mark them read per user, and paginate the inbox. They cost nothing per message, so they are a good default for low-priority updates, with email or push reserved for things users must not miss.
Example: An E-Commerce Platform
An online store sends order confirmations by email and WhatsApp, delivery updates by SMS and push, and OTPs by SMS. A notification service on a 2 vCore / 8 GB VPS runs separate Redis-backed queues for OTPs, transactional messages and campaigns. OTP workers have the highest priority and messages expire after five minutes; campaign workers are throttled to stay within provider limits; and delivery webhooks update a status table that support staff check when a customer calls.
Testing
Use sandbox modes or test numbers from providers, render every template with sample data in CI, and route staging traffic to safe test inboxes so real customers never receive test messages.
SkyRainCloud Plans for This Workload
Notification services spend most time waiting on providers, so they need modest CPU: 2 vCores / 8 GB handles large daily volumes. Scale workers per channel as volume grows.
AMD EPYC 7C13 VPS
Dedicated KVM vCores on AMD EPYC 7C13 (up to 3.70 GHz) with DDR4 ECC memory, NVMe SSD and an unmetered 1 Gbps port.
| Plan | vCores | RAM | Storage | Network | Price | Good for | Buy |
|---|---|---|---|---|---|---|---|
| VPS 1 — AMD | 2 | 8 GB DDR4 ECC | 40 GB NVMe SSD | 1 Gbps, unmetered | ₹649/month | Websites, small APIs, bots, staging and VPN servers | Order |
| VPS 2 — AMD | 4 | 16 GB DDR4 ECC | 80 GB NVMe SSD | 1 Gbps, unmetered | ₹1,299/month | WooCommerce, Node.js/Python backends, Docker Compose stacks, CI runners | Order |
| VPS 3 — AMD | 8 | 32 GB DDR4 ECC | 150 GB NVMe SSD | 1 Gbps, unmetered | ₹2,499/month | Production databases, high-traffic sites, multi-container apps | Order |
| VPS 4 — AMD | 16 | 64 GB DDR4 ECC | 250 GB NVMe SSD | 1 Gbps, unmetered | ₹4,899/month | Large production workloads, SaaS platforms, analytics, in-memory caches | Order |
Intel Xeon Platinum 8269CY VPS
KVM VPS on Intel Xeon Platinum 8269CY (up to 3.80 GHz Turbo) with DDR4 ECC memory, NVMe SSD, full root access and an unmetered 1 Gbps port.
| Plan | vCores | RAM | Storage | Network | Price | Good for | Buy |
|---|---|---|---|---|---|---|---|
| VPS 1 — Intel | 2 | 8 GB DDR4 ECC | 40 GB NVMe SSD | 1 Gbps, unmetered | ₹649/month | Business websites, small apps, scheduled jobs and bots | Order |
| VPS 2 — Intel | 4 | 16 GB DDR4 ECC | 80 GB NVMe SSD | 1 Gbps, unmetered | ₹1,169/month | Business software, mid-size databases, several sites on one server | Check stock |
| VPS 3 — Intel | 8 | 32 GB DDR4 ECC | 150 GB NVMe SSD | 1 Gbps, unmetered | ₹2,249/month | ERP/CRM stacks, heavier databases, multiple production apps | Check stock |
| VPS 4 — Intel | 16 | 64 GB DDR4 ECC | 250 GB NVMe SSD | 1 Gbps, unmetered | ₹4,299/month | High-memory workloads and consolidated production servers | Check stock |
Prices are monthly in INR as listed on the SkyRainCloud store (verified 2026-11-14). Stock and final pricing are shown on the product page at checkout.