Back to Case Studies
Case Study 08
Dialer Architecture Revamp
Decomposed monolithic NestJS dialer into modular Go services with gateway-based routing and zero-downtime deployments.
Gateway
Architecture
3 Independent
Handlers
Zero-Downtime
Deployment
gRPC
Communication
The Problem
Monolithic NestJS dialer needed to be decomposed into modular Go services for better performance, independent scaling, and zero-downtime deployments.
The Solution
- Designed gateway-based architecture with 2 replicas handling all Twilio webhooks
- Manual, Inbound, and Predictive handlers run as separate stateless processes
- Shared State Service (gRPC), Realtime Service (WebSocket), and Task Queue Service
- Gateway routing table in Redis — stateless, any replica handles any request
- Zero-downtime deployment: deploy new version → health check → update routing → drain old version
- Monorepo structure with cmd/ and internal/ packages
Architecture
/call-system
├── cmd/
│ ├── gateway/main.go
│ ├── manual/main.go
│ ├── inbound/main.go
│ ├── predictive/main.go
│ └── taskqueue/main.go
├── internal/
│ ├── gateway/ (router, health, twiml, fallback)
│ ├── handler/
│ │ ├── base.go (shared logic)
│ │ ├── manual/
│ │ ├── inbound/
│ │ └── predictive/ (distributor, amd, compliance)
│ ├── state/ (Redis-backed call/agent state)
│ ├── realtime/ (WebSocket hub)
│ └── taskqueue/ (async processing) Tech Stack
Golang gRPC Redis PostgreSQL Twilio Docker
Related Case Studies
Ready to start?
Let's build something solid.
We take on a limited number of projects to ensure every engagement gets our full engineering focus.
Start a Project