RudderStack Connection Modes: Cloud Mode vs. Device Mode
Detailed technical description of the Cloud and Device Modes supported by RudderStack.
This guide clarifies the two main connection modes in RudderStack - Cloud mode and Device mode. It also describes in detail the differences between these modes.
RudderStack's workflow is quite simple - it receives the event data from a variety of Sources, and routes this data to the Destinations.
RudderStack currently supports over 80 destinations to which you can send your event data. You can find the complete list in our Destinations guides. You can also check our Sources guides to get a list of the sources through which you can send your event data to RudderStack.

Connection Modes in RudderStack

There are two modes through which you can send your event data from your website or mobile app to the desired destinations via RudderStack:
    Cloud Mode
    Device Mode

Cloud Mode

In this mode, the SDK sends the event data directly to RudderStack. RudderStack then transforms this data and routes it to the desired destination. This transformation is done in the RudderStack backend, using RudderStack's Transformer module.

How It Works

Suppose you want to analyze your website users' event data using Amplitude. To do so, you've decided to use RudderStack's JavaScript SDK.
RudderStack defines a fixed event structure. If you track your events in this format, RudderStack will take care of transforming the events as required by Amplitude. You can start by adding a source and an Amplitude destination in the RudderStack dashboard.
Then, add the RudderStack JavaScript SDK snippet into the web page which you wish to track.
The SDK automatically tracks and sends the user events to RudderStack. These events are then transformed by RudderStack and then routed to Amplitude.
The above example uses the JavaScript SDK; the other RudderStack SDKs also work in the same way.
RudderStack Cloud Mode
In the Cloud Mode, you get the flexibility to use transformations to enrich the events, or filter selective events to forward to destinations.
Our Data Warehouse Destinations support only cloud mode.
All the RudderStack server-side SDKs (Java, Python, Node.js, Go, Ruby) support only Cloud Mode. This is because the server-side SDKs operate in the RudderStack backend and cannot load any additional destination-specific SDKs.

Device Mode

This mode lets you send your events to the preferred destinations using the client-specific libraries on your website or mobile app. These libraries allow RudderStack to use the data you collect on your device to call the destination APIs without sending it to the RudderStack first.

How It Works

Suppose you want to send your event data from your source mobile apps to Firebase through RudderStack's mobile SDK (Android, iOS, or Unity, depending on your requirement). You can start by adding a source and a Firebase destination in the RudderStack dashboard.
The RudderStack SDK will download the Firebase SDK, transform the events and will send them to Firebase for analytics.
RudderStack Device Mode
In some cases, you can also use the RudderStack web SDK (JavaScript) to send the events to the destination through the device mode. To do so, enable the Use native SDK to send events option on the RudderStack dashboard as shown:
Device mode integrations will send data to the destinations directly from your client (browser or mobile application).
Device mode does not support the RudderStack Transformations feature.

Which Connection Mode Should I Choose?

    Use Cloud Mode if you wish to transform your events before sending them to the destination.
    If you are planning to work with destinations that record information directly on your users' devices, you should opt for the Device Mode. There is a possibility that these destinations might not function correctly if they are not loaded directly on the device.

How to Check If a Destination Supports Cloud Mode or Device Mode, or Both?

The easiest way to check the connection mode supported by the destination is to go refer to the individual destination's documentation.
We explicitly mention the supported connection modes for every destination in the Getting Started section of each guide. A sample example is as shown:

Cloud + Device Mode Support

Some of our destinations support both Cloud and Device Modes. Some examples are Google Analytics, HubSpot, Intercom, Kissmetrics, Branch, Braze, Customer.io, and Facebook App Events.
You can choose to integrate these destinations with RudderStack via cloud mode or device mode, depending on your requirement.

Contact Us

To learn more about the connection modes supported by RudderStack, feel free to contact us or start a conversation on our Slack channel.
Last modified 11d ago