GitHubContribute in GitHub: Edit online

copyright: years: 2018, 2020 lastupdated: "2023-02-12"


High availability architecture for SMS Gateway

A highly available SMS Gateway environment requires the following components running in a Kubernetes cluster:

  • SMS Gateway, running as a stateless container
  • A Redis or XSLD distributed session cache container to store session state

Session state, such as the SMS Gateway context and other data, is stored and retrieved from the session cache by the SMS Gateway during the flow of a single SMS session. The session cache replicates data across multiple nodes in a cluster, making it highly reliable.

Important: As of Version 1.0.6.0, the XSLD caching server is deprecated in favor of the Redis caching server.

Minimum highly available architecture

Using Kubernetes, the minimum viable high availability architecture consists of two worker nodes in a Kubernetes cluster. Each node in the cluster contains the following pods:

  • An SMS Gateway Pod that runs as a container and is exposed through a NodePort service
  • A Redis or XSLD caching Pod that runs in a -network: host mode, where the caching container listens directly on the node's physical network interface

You can additionally configure an external HTTP load balancer to spray inbound requests across the SMS Gateway service's node port on each of the worker nodes.

Requests come in from the SMS provider and SMS agent through an optional HTTP load balancer. The  Kubernetes network proxy shares requests across the Pods in the SMS Gateway service. The SMS Gateway Pods can send session state to the caching pods on either node.

When an SMS Gateway Pod fails, requests continue to be sent to the other working Pod. Because state is maintained in the distributed session cache, all session state continues to be accessible. Kubernetes also handles self-healing of the cluster by automatically restarting the failed Pod.

The Redis or XSLD Pods in the cluster manage replicas of the session data so that when a Pod failure occurs, the backup of the data is promoted to primary and continues to be made available to the SMS Gateway Pods.