---
description: Detailed technical description of RudderStack's High Availability feature
---

# High Availability

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.

## Hardware Failures

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:

![](https://876606571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lq5Ea6fHVg3dSxMCgyQ%2Fuploads%2Fgit-blob-2836251af5fb5b55ec097f22d5a0105cbd2068d4%2Frudderstack2x_-7-.png?alt=media)

### Deploying RudderStack in a Single Availability Zone

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.

![](https://876606571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lq5Ea6fHVg3dSxMCgyQ%2Fuploads%2Fgit-blob-78c953e2d89c1672f19300e9c57bf44cee07bbb5%2Frudderstack2x_-9-.png?alt=media) Single Availability Zone

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.

### Deploying RudderStack in Multiple Availability Zones

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.

![](https://876606571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lq5Ea6fHVg3dSxMCgyQ%2Fuploads%2Fgit-blob-932368a65e3d8e9cc7def91fc4873dcaa7704699%2Frudderstack2x_-11-.png?alt=media) Multiple Availability Zones

## Software Failures

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 Server Running Modes

RudderStack supports two running modes - **normal and degraded**

#### Normal Mode

In the normal mode, RudderStack receives events and forwards them to the destinations as usual. ![](https://876606571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lq5Ea6fHVg3dSxMCgyQ%2Fuploads%2Fgit-blob-3c72d28df1040c9d0fe348d21cf48fff03c8ed62%2Frudderstack2x_-12-.png?alt=media) Normal Mode

#### Degraded Mode

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.

![](https://876606571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lq5Ea6fHVg3dSxMCgyQ%2Fuploads%2Fgit-blob-0fc6bdda454029b6bd0cdb00e8aeabea1ec6ead8%2Frudderstack2x_-13-%20\(1\)%20\(1\)%20\(1\)%20\(1\)%20\(1\)%20\(1\)%20\(1\).png?alt=media) Degraded Mode

In this mode, all your events are completely safe and will be sent to destination maintaining the order.

If RudderStack crashes in degraded mode, we request you to send us the crash reports to identify and fix the issue.

## Alerting in RudderStack

RudderStack has an in-built alerting service that will raise an alert when the server enters `degraded` 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](https://rudderstack.com/docs/user-guides/administrators-guide/alerting) to know more about the various configuring alerts in RudderStack.

## Client SDK Caching

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. ![](https://876606571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lq5Ea6fHVg3dSxMCgyQ%2Fuploads%2Fgit-blob-e4284ca38955bb33e0527f654eb9f698ac72405d%2Frudderstack2x_-6-.png?alt=media) Downtime Scenario

## Contact Us

If you want to know more about the RudderStack High Availability feature, please feel free to [contact us](mailto:%20docs@rudderstack.com). You can also [request a demo](https://rudderstack.com/request-a-demo/) to see RudderStack in action.
