π± The Push Notification Problem
Every modern app needs to send push notifications. Whether itβs a rideβhailing service alerting a driver of a new trip, a fintech app confirming a payment, or a messaging app delivering a chat message β notifications are critical.
The industry standard is Firebase Cloud Messaging (FCM) from Google. Itβs easy to set up, works across platforms, and is free for moderate usage. But as your app grows, FCMβs limitations become painful:
- Data privacy β Google sees who youβre messaging and when.
- Cost β At scale, FCM can cost $50β100 per million notifications.
- Latency β 200β2000ms is common, especially for crossβplatform messages.
- Lockβin β Your entire notification infrastructure is tied to Googleβs ecosystem.
- No direct Android connection β FCM goes through Google Play Services, which doesnβt work on devices without Google (e.g., in China).
And on iOS, FCM is just a wrapper around Appleβs APNs, adding another hop and more latency.
What if you could have full control over your notification infrastructure? What if you could deploy your own push server, connect directly to devices, and achieve subβ10ms latency β all while keeping your data private and reducing costs by 70%?
Thatβs exactly what we built with Namma Push.
π What Is Namma Push?
Namma Push is an openβsource, selfβhosted push notification platform written entirely in Rust. It replaces FCM and APNs with a unified, highβperformance system that you run on your own infrastructure.
Key capabilities:
- Direct gRPC/QUIC connections to mobile, web, desktop, and IoT devices β no thirdβparty intermediary.
- Subβ50ms P99 latency for active clients (often subβ10ms).
- WhatsAppβstyle wakeβup β optional FCM/APNs messages to wake apps that are killed, while the actual notification content stays private.
- Horizontal scalability β from 10,000 to millions of concurrent connections using Redis Cluster.
- One Rust core β shared code for all client SDKs (iOS, Android, Web, Desktop, IoT).
- Full observability β Prometheus, Grafana, Jaeger, Loki included.
- Multiβtenant β host many applications on a single cluster with isolated rate limits and API keys.
- Costβefficient β selfβhosted, pay only for your own infrastructure (70%+ savings compared to FCM).
ποΈ Architecture Overview
Namma Push is designed as a cloudβnative, horizontally scalable system. Hereβs a highβlevel view:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Producer Applications β
β (gRPC / REST with API Key) β
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Namma Push Gateway (Rust / tonic) β
β β’ gRPC server (port 50051) β
β β’ QUIC/HTTP3 (port 50052) β
β β’ REST Admin API (port 9090) β
β β’ Tenant validation, rate limiting, consistent hashing β
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Redis Cluster (Shared State) β
β β’ Priority streams (CRITICAL / HIGH / NORMAL / LOW) β
β β’ Dead Letter Queue (DLQ) β’ WakeβUp Queue β
β β’ Presence store (active connections) β
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Delivery Orchestrator (Rust Workers) β
β β’ Perβshard readers β
β β’ Client presence check β
β β’ Platformβspecific delivery (APNs, WebPush, MQTT) β
β β’ Exponential backoff retries β
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββΌββββββββββββββββββββββββββ
βΌ βΌ βΌ
βββββββββββββ βββββββββββββ βββββββββββββ
β iOS SDK β β Android β β Web SDK β
β (Swift + β β (Kotlin + β β (WASM/JS) β
β Rust) β β Rust) β β β
βββββββββββββ βββββββββββββ βββββββββββββ
π The Magic: One Rust Core for All Platforms
The heart of Namma Push is a single Rust library that handles:
- gRPC/QUIC connections with automatic reconnection
- Local storage of pending notifications (SQLite on mobile, IndexedDB on web)
- Message queuing and delivery
- Heartbeat management
This core is then wrapped for each platform:
- Android: JNI bindings + Kotlin foreground service
- iOS / macOS: Cβbridge + Swift (APNs token registration)
-
Web: WebAssembly (
wasm-bindgen) + JavaScript service worker - Desktop: Native Rust (Tauri) or Electron
-
IoT:
no_stdRust with MQTT or CoAP
Benefits of this approach:
- Code reuse β the same networking and logic works everywhere.
- Performance β Rustβs zeroβcost abstractions and memory safety.
- Portability β the core runs on servers, browsers, and microcontrollers.
π± Android: GoogleβFree Forever
One of the most exciting aspects of Namma Push is its Android implementation β it works completely without Google Play Services or FCM.
How It Works
- The Android SDK contains a foreground service with
START_STICKYflag. - This service maintains a persistent gRPC/QUIC connection to your Namma Push server.
- When the app is in the background or even swiped away, the service continues running (Android shows a persistent notification, which can be hidden on Android 14+).
- An
AlarmManagerhealth check restarts the service if itβs killed by aggressive battery optimisations. - Notifications are delivered instantly over the gRPC connection.
No FCM, no Google Play Services required. Works on any Android device, even in China.
If you want an extra layer of reliability, you can optionally enable FCM as a wakeβup helper β but itβs not needed for most use cases.
π± iOS: Leveraging APNs Without Sacrificing Privacy
iOS is more restrictive: Apple does not allow longβrunning background services. To wake an app that is killed, you must use APNs. But we use APNs only as a wakeβup channel β not to deliver the actual notification.
- The iOS SDK registers for remote notifications and sends the device token to your Namma Push server.
- When your server detects that the client is offline, it sends a silent APNs push (
content-available: 1) with no userβvisible payload. - The device receives this push, wakes the app (if allowed), and the app reconnects via gRPC to fetch pending notifications.
- All notification content stays on your server β Apple never sees the title, body, or data.
This gives you the reliability of APNs for wakeβup while keeping your data private.
π Web Push: Native, No FCM Required
For web browsers, Namma Push uses the W3C Web Push Protocol with VAPID authentication β the same technology used by Chrome, Firefox, Edge, and Safari. No FCM, no external service.
- The server generates its own VAPID keys.
- The Web SDK (Rust compiled to WebAssembly) subscribes to push using those keys.
- Notifications are sent directly from your server to the browserβs push service.
This is fully selfβcontained and respects user privacy.
π§ Smart Delivery & Offline Handling
Namma Push is not just a dumb relay β itβs intelligent about delivery.
- Priority queues β CRITICAL, HIGH, NORMAL, LOW. Critical notifications bypass queues for immediate delivery.
- Dead Letter Queue (DLQ) β Failed deliveries are stored with exponential backoff retries (1s, 2s, 4s, β¦). After 5 failures, they stay in the DLQ for manual inspection.
- Wakeβup queues β Offline clients get a pending notification queue that is replayed as soon as they reconnect.
- Local caching β SDKs store notifications locally (SQLite on mobile, IndexedDB on web) so they survive disconnections.
This ensures atβleastβonce delivery with minimal data loss.
π Performance & Scale
We built Namma Push to handle millions of devices. Here are the numbers from our benchmarks:
| Metric | Single Node | Cluster (3 gateways + 6 Redis shards) |
|---|---|---|
| Concurrent connections | 10,000 | 500,000+ |
| Throughput (TPS) | 1,000 | 50,000+ |
| P99 latency (online client) | <50ms | <50ms |
| P99 latency (wakeβup via FCM/APNs) | β | <2s |
| Availability | β | 99.99% (multiβAZ) |
Horizontal scaling is trivial β just add more gateways and Redis shards.
π οΈ Observability Out of the Box
We believe in βyou build it, you run itβ. Namma Push includes a full observability stack:
- Prometheus metrics: active connections, delivery latency, queue sizes, error rates, perβtenant usage.
- Grafana dashboards preβbuilt for operations and business metrics.
- OpenTelemetry + Jaeger for distributed tracing.
- Loki for log aggregation.
All components are open source and run alongside your Namma Push deployment.
π Security & Compliance
Because you host it yourself, you control the security:
- TLS 1.3 for all external endpoints.
- mTLS for internal service communication.
- API keys (JWT) for backend authentication.
- RBAC for admin UI (viewer, operator, admin).
- Audit logs of all admin actions.
- Designed to support GDPR (right to erasure), HIPAA (audit trails), and PCIβDSS (segmentation).
No third party sees your notification metadata unless you explicitly choose to use FCM/APNs as optional fallbacks.
πΈ Cost Comparison
Letβs run some numbers. Suppose you send 100 million notifications per month:
- FCM (or similar managed service): $5,000β10,000 per month (or βfreeβ but with quotas and limited analytics).
- Namma Push selfβhosted on AWS (3 gateways + 6 Redis shards): ~$4,800 per month including all infrastructure.
- Savings: $200β5,200 per month, or $2,400β62,400 per year.
And thatβs without counting the value of having your own data, lower latency, and no lockβin.
π Roadmap & Getting Involved
Namma Push is currently in active development, following a 16βweek roadmap to a stable v1.0 release:
- Phase 1 (Weeks 1β5): Core engine β gRPC, Redis streams, basic delivery.
- Phase 2 (Weeks 6β10): Production features β FCM/APNs fallback, DLQ, Redis cluster, QUIC.
- Phase 3 (Weeks 11β14): Observability β Grafana, Jaeger, load testing, security hardening.
- Phase 4 (Weeks 15β16): UI & documentation β Vue.js admin UI, deployment guides, SDK examples.
Weβre building this in the open. The code is on GitHub (coming soon), and we welcome contributions. Whether youβre a Rust developer, a mobile engineer, or just curious, thereβs a place for you.
π― Why Namma Push Matters
Push notifications are the lifeblood of modern apps, yet weβve been dependent on a handful of proprietary services. Namma Push changes that. It gives you:
- Full control β your infrastructure, your data.
- Superior performance β subβ50ms latency, no thirdβparty hops.
- Lower costs β selfβhosted, pay only for what you use.
- Privacy by design β no one sees your usersβ data.
- Open source β inspect, modify, and contribute.
We believe every organisation deserves a notification platform that respects its sovereignty. Namma Push is our answer.
π Try It Yourself
You can run Namma Push today (preβrelease) with Docker:
docker run -d -p 50051:50051 -p 9090:9090 nammayatri/namma-push:latest
Then visit http://localhost:9090 to create your first tenant and get an API key. Integrate our SDKs (coming soon) and start sending notifications.
Together, we can make Namma Push the goβto choice for developers who value control, privacy, and performance.
Namma Push β open source, selfβhosted, and ready for the world. π
Top comments (0)