Shomla - Architecture of a Real Time WebRTC Voice Chat Platform Powered by Go

Shomla - Architecture of a Real Time WebRTC Voice Chat Platform Powered by Go

Shomla is a cross-platform, 1-on-1 voice chat service that runs directly in the browser with minimal latency and no native app installation required. At the core of the platform is a high-performance signaling server written in Go (Golang) that manages WebSocket sessions and smart matchmaking queues, paired with a hybrid WebRTC infrastructure (P2P + a distributed pool of TURN servers) featuring dynamic authentication. The frontend is built as a Zero-Framework PWA, offloading heavy logic to Web Workers to ensure instant UI responsiveness even on budget mobile devices.

  1. Live Production: shomla.com
  2. Tech Stack: Go (Gorilla WebSockets, Fiber, Chi), PHP 8, SQLite, WebRTC, Hybrid TURN/STUN (REST API Ephemeral Auth), Vanilla JS, Web Workers, PWA.

Engineering & Product Challenges

When building a browser-based live communication platform, developers face four major challenges:

  1. NAT Traversal: Up to 20–25% of users on mobile networks and corporate Wi-Fi are behind symmetric NATs or strict firewalls where a direct P2P connection is impossible.
  2. Matchmaking Race Conditions: When thousands of users simultaneously search for a partner, switch rooms, or drop connections, the signaling server must instantly rebuild pairs without leaving dead sessions behind.
  3. Media Traffic Costs: Relaying audio through TURN servers without protection against scraping and key leaks quickly drains the infrastructure budget.
  4. Onboarding Friction: Forcing a user to download an app from the App Store or Google Play just for a quick voice call reduces initial conversion rates severalfold.

Key Architectural Decisions in Shomla

System ComponentShomla ImplementationBusiness & Product Impact
Signaling & Session CoordinationCustom Go server built on Gorilla WebSockets and Fiber / Chi routersSupports thousands of concurrent full-duplex connections with a minimal RAM footprint and sub-millisecond routing of SDP/ICE candidates
Network Connectivity & NAT TraversalHybrid STUN/TURN setup combining self-hosted nodes and external APIs with dynamic ephemeral token generation (TURN REST API)Reliable audio channel establishment across complex mobile networks and full protection of TURN relays from unauthorized traffic abuse
Smart Matchmaking EngineIn-memory State Machine in Go with filtering by language, interests, gender, and format (1-on-1)Instant matching with relevant partners without database locks or orphaned "ghost" rooms upon connection drops
Client Architecture (Frontend)Vanilla JavaScript (Zero-Framework), PWA, and network/background processing offloaded to Web WorkersZero third-party UI bundle overhead, a smooth interface free of main-thread (UI thread) freezes, and a native-like experience on iOS, Android, and Desktop
Data Storage & ModerationLocal persistence via SQLite, behavioral triggers, voice activity detection (VAD), and automated moderation toolsHigh-speed profile and session reads/writes without external DBMS network latency, maintaining a safe environment inside the chat

Building a Real Time Voice/Video Platform or AI Voice Agent?

I help startups and enterprises architect and launch low-latency real-time communication systems:

End-to-end WebRTC platform development (voice/video rooms, EdTech, telehealth, live streaming).

High-concurrency Go signaling servers, custom matchmaking engines, and hybrid TURN/STUN infrastructure.

Real time AI Voice Agent orchestration (WebRTC audio streaming, Voice Activity Detection, LLM & TTS integration).