Back to projects
Varta
High-concurrency chat architectureBuilt for horizontal scale using Redis pub/sub, Kafka streams, and PostgreSQL. Handles thousands of concurrent connections with sub-50ms latency.
Tech Stack
Node.jsRedisKafkaPostgreSQLWebSocket
Overview
Architecture Overview

Features
- Users can crud private or public groups.
- Room owners can invite other users to their private rooms.
- Users can send and receive messages in real time.
- End to End encrypted messages
Technology Stack
- Multiple EC2 instances to support a stateless architecture.
- Redis Pub/Sub for instant real-time message delivery across multiple EC2 instances.
- Kafka for handling database-level message creation and event streaming.
- Task workers for managing background jobs with RabbitMq such as push notifications, email services, and database updates.
- PostgreSQL as the ultimate source of truth.
- Caching layer for blazing-fast API responses and optimized database queries.
- Rate limiter to safeguard APIs and server resources.
- Centralized logging for improved monitoring and debugging of the entire application.