System Overview
Niruddha is a distributed system that performs DNS resolution across Indian ISP nameservers at scale, processing over 100 crore responses across 28 crore domains to date.
Core Infrastructure
- Message QueueApache Kafka
- DatabasePostgreSQL
- Cache LayerRedis
- DNS ResolutionZDNS
Web Application
- FrameworkNext.js 15
- UI LibraryReact 19
- Local StorageSQLite
- VirtualizationTanStack Virtual
The worker fleet is the core component of data collection. Each worker:
Workers operate independently with no shared state beyond Kafka offsets, allowing horizontal scaling. Resolution rate is throttled per-worker to stay within resolver capacity.
PostgreSQL (Primary Storage)
Over 100 crore DNS response records stored with compound indexes optimised for index-only scans. Batch inserts achieve ~20,000 records/second.
HDD-backed storage; direct queries take 30-60 seconds due to table size.
Redis (Distributed Cache)
Filtered domains cached in Redis with 1-hour TTL. Web requests read from Redis first, reducing response time from 30+ seconds to ~50ms.
SQLite (Local Mirror)
Filtered domains mirrored to local SQLite for low-latency search and filtering. Used as fallback when Redis is unavailable.