The Architecture and Technologies backed Stringee - a system serving 40 million users
1. Stringee - Communication APIs
for Voice, Video, Chat, SMS and Customer Service Software
Dau Ngoc Huy
Founder & CEO
huy@stringee.com
ARCHITECTURE & TECHNOLOGY
2. #1 Overview
Stringee is a Communication Platform
which provides:
✓ APIs for Voice, Video, Chat, SMS and
Contact Center
✓ Customer service software
About us
11. 1. Stringee Server: Run Stringee's main functions:
• Authenticate
• Process call scenarios by processing SCCO (record call, play file, connect app-to-app/app-to-phone/..., record
voicemail)
• Run chat functions (chat 1-1, chat group)
• Write CDR/reporting
• Send events to event_url
• …
2. Push Server: Wakes apps up to receive calls
3. Daemon Server: Run periodic tasks: Block accounts after trial expired, send emails, task remind,…
4. Charging Server: Realtime billing, monitor limits, block/stop calls due to invalid account balance
5. Media Server: Communicate with Telcos, process transcoding media,…
6. api.stringee.com: Receive REST API requests from developers to run: stop call, transfer call, download recorded file,...
7. ICE Server: Connect client-apps using STUN/TURN protocol, for client-apps to make App-to-App calls(get public IP, NAT
traversal)
16. 1. ICC Server:
• Process IVR tree: Play messages in nodes accordingly, connect to Queue,…
• Process Queues, find available Agent to receive calls
• Bring callers back to Queue when assigned Agent does not pick up the call
• …
2. icc-api.stringee.com:
• Allow developers creating IVR trees/nodes/keypresses..., Queue,… through REST APIs
• Empty cache on ICC Server
• …
18. #4 HA/LB
High Availability
• The design has no dead spots, all modules run at least on 2 different physical nodes
• The modules have a PING mechanism allow them to Ping each other, ensuring that
when one node dies, the call will not be distributes to dead node
Load balancing
• Modules are designed to expand horizontally easily
• Adding/deleting nodes does not require system restart
We designed our system to be an Active-Active Cluster for High Availability
19. Client connect
Stringee Server
node_1
Stringee Server
node_2
Stringee Server
node_3
DNS Server
Client
A DNS query n1.stringee.com
n1.stringee.com=6.6.6.1
n1.stringee.com=6.6.6.1
n2.stringee.com=6.6.6.2
Try connect and authenticate
Response
{list_servers: ["n1.stringee.com:6789", "n2.stringee.com:6789"]}
20. Client connect to failed node
Stringee Server
node_1
Stringee Server
node_2
Stringee Server
node_3
DNS Server
Client
A DNS query n1.stringee.com
n1.stringee.com=6.6.6.1
n1.stringee.com=6.6.6.1
n2.stringee.com=6.6.6.2
Try connect and authenticate
{list_servers: ["n1.stringee.com:6789", "n2.stringee.com:6789"]}
X
A DNS query n2.stringee.com
n2.stringee.com=6.6.6.2
Try connect and authenticate
24. Stringee Server <==> Charging Server
Stringee Server
node_1
Stringee Server
node_2
Charging Server
node_1
Charging Server
node_2
Physical server 1 Physical server 2
Ping Stringee Servers
Ping Concurrent Calls
Ping Charging Servers
25. #4 HA/LB
Same configuration for other server pairs
• Stringee Server <> Push Server
• Stringee Server <> Media Server
• Stringee Server <> ICC Server
26. REST & HTTP Servers
HAProxy
node_1
api.stringee.com
node_1
Physical server 1 Physical server 2
api.stringee.com
node_2
HAProxy
node_2
keepalived
node_1
Developer Server
VIP IP: 6.6.6.3 keepalived
node_2
DNS Server
api.stringee.com = 6.6.6.3