Familiarize yourself with RudderStack’s horizontal scaling approach.
2 minute read
RudderStack makes it easier for you to add more nodes to your Kubernetes cluster, to process the events in a timely and effective manner. This guide shows you how to effectively configure your Helm charts to trigger a horizontal scale up/down, based on the version of RudderStack you are using.
RudderStack Open-source Version
Each RudderStack node consists of a backend pod and a PostgreSQL pod. In case a RudderStack cluster is not able to process the events, it is advisable to add more more nodes to it. By changing the backendReplicaCount in the Helm configuration, you can trigger horizontal scale up/down. If you set this value to any positive number, helm charts will create as many RudderStack nodes.
There are, however, a couple of challenges in scaling up or down this way.
Event Ordering
In a single-node cluster, all events are routed to the same RudderStack node. This guarantees the ordering of all events it has received for a given user. In case of a multi-node cluster, since the events of a same user can go to different nodes, the event ordering is not guaranteed by the cluster.
Event Ordering While Scaling Up from 1 Node to 2 Nodes
Scale Down
If you scale down, all pending events in the terminated node will not be delivered to the destination. You will need to make sure that all events in a node are drained before terminating it.
Scaling Down from 2 Nodes to 1 Node
To understand how RudderStack handles hardware failures and guarantees High Availability, please go through our High Availability guide.
RudderStack Enterprise Version
The Enterprise version of RudderStack makes horizontal scaling seamless, while maintaining the event ordering and guaranteeing the delivery of all events.
Event Ordering
RudderStack Enterprise has a proxy service that implements a routing algorithm. It forwards a given set of user events to the same RudderStack node every time. Each node then guarantees the event ordering while delivering to the specified destinations. This proxy service is highly available and scalable.
Event Ordering in RudderStack Enterprise
Scale Down
RudderStack Enterprise includes a separate process named Jobs DB Migrator. This process is responsible for moving all pending events from the existing nodes to the new nodes after scaling up or down. It makes sure all events are migrated to the new nodes and the event ordering is maintained during and after the migration process.
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.