FreeSWITCH
SIP and WebRTC
Load Balancing and High Availability in Real World
Giovanni Maruzzelli gmaruzz@OpenTelecom.IT
FreeSWITCH SIP and WebRTC Load Balancing and High Availability in - - PowerPoint PPT Presentation
FreeSWITCH SIP and WebRTC Load Balancing and High Availability in Real World Giovanni Maruzzelli gmaruzz@OpenTelecom.IT FOSDEM 2017 - Bruxelles gmaruzz@OpenTelecom.IT High Availability: Double It ALL LAN Switch and Cabling FreeSWITCH
FreeSWITCH
SIP and WebRTC
Load Balancing and High Availability in Real World
Giovanni Maruzzelli gmaruzz@OpenTelecom.ITHigh Availability: Double It ALL
Two Single FreeSWITCHes
M e d i a S i g n a l i n g FreeSWITCH FreeSWITCHTwo Single FreeSWITCHes
Two Single FreeSWITCHes
Two Single FreeSWITCHes
M e d i a S i g n a l i n g FreeSWITCH FreeSWITCHMany FreeSWITCHes
SIP
Many FreeSWITCHes
File R E P L I C A T I O N DB File DB Signaling Signaling Media SIP Proxy Media Media Proxy SIP Proxy Media Proxy K E E P A L I V E D U D P – T C PVERTO
Many FreeSWITCHes
File R E P L I C A T I O N DB File DB K E E P A L I V E D Signaling Signaling Media IPtables IPtables Media Client Side Users Partitioning U D P – T C PMany FreeSWITCHes
SIP and NAT
SIP
Load Balancing and Proxies
Signaling Signaling Media SIP Proxy Media Media Proxy SIP Proxy Media Proxy K E E P A L I V E D U D P – T C PWhere to put the SIP Registrar
SIP Call Distribution: DISPATCHER & LOAD BALANCER
requests to multiple boxes using “static” algorithms (eg: round robin or weighted) or “dynamic” algorithms (that take care of actual number of active calls on each machine)
destinations, retry on failed destination, disable the failed box from list, and re- enable it when is back in order
SIP
Load Balancing and Proxies
Signaling Signaling Media SIP Proxy Media Media Proxy SIP Proxy Media Proxy K E E P A L I V E DSIP NAT & Media Relaying
NATs that cannot directly sends packets to each other. In those cases ONLY way for them to communicate is via the mediation
if you're load balancing servers that are not directly reachable from clients
SIP Media Relaying
SIP
Load Balancing and Proxies
Signaling Signaling Media SIP Proxy Media Media Proxy SIP Proxy Media Proxy K E E P A L I V E DVERTO and NAT
VERTO
Load Balancing and Proxies
K E E P A L I V E D Signaling Signaling Media IPtables IPtables Media Client Side Users Partitioning UDP – TCP - WEBRTC U D P – T C PVERTO User Partitioning
VERTO Client IP PORT
VERTO Server IP PORT
VERTO
Load Balancing and Proxies
K E E P A L I V E D Signaling Signaling Media IPtables IPtables Media Client Side Users Partitioning U D P – T C PVERTO Call Distribution:
RTP IP, IPTables & IP Rangesto LB address in verto.conf.xml
range of RTP ports set in switch.conf.xml
from LB to the correct FreeSWITCH
automatically reconnect to the new instance
VERTO RTP IP
VERTO IPTables
VERTO RTP Range
VERTO
Load Balancing and Proxies
K E E P A L I V E D Signaling Signaling Media IPtables IPtables Media Client Side Users Partitioning UDP – TCP - WEBRTC U D P – T C PKeepalived
FreeSWITCHes' Farm
FreeSWITCHes' Farm
keep state and persistance about SIP registrations, call states, etc
files in a local directory
mod_sofia, all the FS guts will reside in a remote PostgreSQL, shared by many FSes
FreeSWITCHes' Farm
FreeSWITCHes' Farm DSN
FreeSWITCHes' Farm
put an HAProxy
HAProxy
between PGSQL servers, and failover when needed
FreeSWITCHes' Farm
PERSISTENCE:
GlusterFS & PostgreSQL BDR
File R E P L I C A T I O N DB File DB HAProxy Gluster clientautomatically synched in realtime on all servers and all clients
in realtime to another server
GlusterFS
PostgreSQL BDR
PERSISTENCE:
GlusterFS & PostgreSQL BDR
File R E P L I C A T I O N DB File DB HAProxy Gluster clientSpecial Cases
Special Cases
Special Cases (Multi Tenancy)
FreeSWITCHes' Farm Partitioned
FreeSWITCH 01 FreeSWITCH 02 FreeSWITCH 03 FreeSWITCH 04 K E E P A L I V E Dwww.packtpub.com
www.packtpub.com
Thank You
QUESTIONS ?
Giovanni Maruzzelli gmaruzz@OpenTelecom.IT