Balancing traffic to Galera Cluster with HAProxy

We described here Galera Cluster with its features, which allows you to create a multi-master active-active database cluster with synchronous data replication, enabling read and write operations on all the cluster nodes.

Configuring SSL encryption on Galera Cluster

To secure at all communications between nodes in a Galera Cluster, as well as client and servers running MySQL inside the cluster, you need to enable three degrees of security:

Setting up rtpengine with Kamailio for transcoding

In my previous posts, you will have discovered the power of rtpengine, from the installation procedure to the configuration for using it with kamailio. Here we will go further into the functionality of rtpengine, using it as an audio transcoder, i.e. to adapt the audio streams generated by two RTP endpoints that use different audio codecs.

Activate a Galera Arbitrator node in a Galera Cluster

In the previous posts Galera Cluster for MySQL and Automating the startup of Galera Cluster we focused on installing the Galera cluster on 2 nodes and starting it automatically using a script job in the crontab. Here I want to talk about the Galera Arbitrator module.

Automate the startup of Galera Cluster on 2 nodes after a reboot

In the post Galera Cluster for MySQL we saw how to install, configure and start a Galera cluster with MySQL on 2 nodes, and we also focused on the importance of the node startup procedure. A critical condition could occur as each node looks for a primary to connect to on startup. In case of restarting the single server, there would be no problems activating the automatic start of mysqld via systemctl, but in case of a complete restart of the infrastructure on one of the servers it is mandatory to proceed with bootstrapping the cluster.

Galera Cluster for MySQL, 2 nodes setup

Galera Cluster is a synchronous multi-master cluster for MySQL/MariaDB. It allows you to create an active-active multi-master topology with synchronous data replication, supporting read and write operations on all nodes in the cluster.

Redis in HA with Sentinel

Redis (REmote DIctionary Server) is a high-performance, open-source, non-relational in-memory database that can be used as a store of key-value data structures. It can obviously be used as a single instance, therefore installed on a single server, or configured in High Reliability. There are two ways to have a HA-type Redis architecture, activate a Redis Cluster having at least 6 nodes available (3 Master + 3 Slave), or use Sentinel having 3 nodes available with Sentinel installed on, in addition to the Master and Slave nodes of Redis.

Kamailio Balancing capability

The “dispatcher” module provides support for several traffic balancing and dispatching algorithms.
In this tutorial we will see how to configure Kamailio to balance traffic to different destinations based on their availability, illustrating round-robin modes and priorities. Kamailio is able to monitor the status of the target endpoints through the use of SIP OPTIONS or other messages like INFO.

Configuring Kamailio with rtpengine to relay RTP traffic behind NAT

In a test environment, so in a fully controlled environment I would say, usually all the elements involved in a VoIP call are on the same subnet and this means that the RTP media streams flow directly between the caller and the called party. However, this never happens in the real world, where instead the scenario is much more complex and both SIP signaling messages and media streams must traverse firewalls and NATs.
In general we can think of a scenario like the one shown in the following figure, where the caller is outside our infrastructure and the called party is on a local network behind a SIP Proxy, which is behind a firewall.

Kamailio installation and configuration

Kamailio is an Open Source SIP Server released under the GPLv2+ license, able of handling thousands of call setups per second, fully supporting the SIP protocol defined in IETF RFC 3261, including the various annexes and addons. The main use of Kamailio is as a SIP Proxy for routing SIP messages, but several additional features are also supported and described on the official website at the link https://www.kamailio.org/w/. On the official documentation you will find the details of the various modules supported by the system, here instead we will briefly see how to install and configure Kamailio for handling SIP calls.