Any service can go down because of a hardware failure or a software bug. This document explains the engineering design and the deployment model that makes RudderStack highly available despite any failures or bugs.
We leverage Kubernetes and auto-scaling groups to handle hardware failures and stay highly available.
To recover from node failures, we recommend provisioning the nodes with an auto-scaling group.
This is how a standard RudderStack production deployment looks like:
If the node hosting RudderStack goes down, Kubernetes will automatically schedule it on another available node. If you have an auto-scaling group and Kubernetes is not able to schedule RudderStack, a new node is created and RudderStack is scheduled.
This is equivalent to the standard High Availability setup where an infrastructure team creates an extra backup node to switch the master using a heartbeat mechanism.
There could be instances of data center failures, where a complete availability zone can go down. If you want RudderStack to be resilient to such failures, your Kubernetes cluster should span multiple availability zones.
RudderStack can switch between different running modes to stay resilient in case of software failures.
If RudderStack is not available, our web and mobile SDKs cache the events on the customer device and retry till they are delivered to the RudderStack server.
RudderStack supports three running modes - normal, degraded and maintenance.
In the normal mode, RudderStack receives events and forwards them to the destinations as usual.
If RudderStack keeps crashing while processing the events, it enters the degraded mode after a threshold number of restarts is reached.
In the degraded mode, RudderStack receives events and stores them. It will not forward to destinations.
If RudderStack keeps crashing in the degraded mode, after a threshold number of restarts, it enters the maintenance mode.
In the maintenance mode, RudderStack switches the database and receives events in a new database. All your events are completely safe.
RudderStack has an in-built alerting service that will raise an alert when the server enters
maintenance mode. The alerting service supports integrations with PagerDuty and VictorOps. You can configure this to be alerted when an unexpected issue occurs with the RudderStack server.
Please refer to our alerting guide to know more about the various configuring alerts in RudderStack.
There may arise a scenario where the RudderStack service is down because of an unexpected issue, and is not reachable for the SDKs. In such a situation, the web and the mobile SDKs will then cache the events in the local storage. The pending events will be retried with a backoff and delivered once the service is available again.
Even during an unexpected downtime, all your events are safe and will be delivered to your destinations without fail.