Learn the difference between cloud mode, device mode, and hybrid mode when sending event data to your destinations.
5 minute read
This guide clarifies and details the differences between the two main RudderStack connection modes - cloud mode and device mode. It also give an overview on hybrid mode, which is currently applicable only to a limited number of destinations.
What are connection modes in RudderStack?
RudderStack’s workflow is simple - it receives the event data from the sources and routes this data to the destinations. The connection modes determine how RudderStack tracks, transforms, and routes this event data.
There are primarily two connection modes through which you can send your event data from your source apps to the desired destinations via RudderStack:
Cloud mode
Device mode
For some selective destinations, RudderStack also supports a hybrid mode connection which routes the event through both the cloud and device modes.
Cloud mode
In this mode, the SDK sends the event data directly to the RudderStack server. 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.
When you send events via cloud mode, you also get the flexibility to use RudderStack Transformations to implement custom logic on the events before forwarding them to the destinations.
How cloud mode works
The SDK sends the event data directly to the RudderStack server (backend).
RudderStack transforms the events into a destination-specific format.
The transformed events are then routed to the destination.
Suppose you want to analyze your website data in Google Analytics. To do so, you can use RudderStack’s JavaScript SDK.
The SDK will automatically track and send the events to RudderStack. RudderStack then transforms this data into the required format and sends it to Google Analytics.
All the RudderStack server-side SDKs support sending events only through cloud mode. This is because the server-side SDKs operate in the RudderStack backend and cannot load any additional destination-specific SDKs.
Device mode
In device mode, RudderStack sends the event data to the destinations directly from your client (web or mobile app).
RudderStack does not support the Live Events functionality in device mode.
The RudderStack SDKs first load the native client 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 servers first.
How device mode works
Suppose you want to send your event data from your mobile app to Firebase via the RudderStack Android SDK (or any other mobile SDK). You can start by adding an Android source and connecting it to the Firebase destination in the RudderStack dashboard.
The RudderStack SDK will first download the Firebase SDK, transform the events natively, and then send them over to Firebase.
For some destinations, you can use the JavaScript SDK to send the events via device mode. To do so, enable the Use native SDK to send events option under the destination-specific connection settings in the RudderStack dashboard:
Hybrid mode
In hybrid mode, RudderStack sends certain event data to the destination directly from your client while routing the remaining events through the RudderStack server.
Hybrid mode is currently available for the following destinations:
A singular connection capturing critical event data automatically generated by the native SDKs.
All the benefits of cloud mode like:
Faster site
Reliable data collection
First-party data capture
FAQ
Which connection mode should I choose?
Use cloud mode if you wish to run a faster site with reliable data collection and first-party data capture.
If you are planning to work with the destinations that record information directly on your users’ devices, choose 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 which connection mode is supported by the destination?
The easiest way to check the connection mode supported by the destination is to go refer to the individual destination’s documentation.
The supported connection modes are mentioned for every destination in the Getting Started section of their respective documentation, as seen below:
Some RudderStack destinations support sending events via both the cloud and device mode, for example:
What are the benefits of using cloud mode to send events to the destination?
In cloud mode, the event data is sent from the sources directly to the RudderStack server. RudderStack takes care of the event transformation and ensuring the format matches the destination’s requirements. Since this transformation happens in the RudderStack server itself, your page size as well as the load times are not affected at all.
Can I use an event forwarding or data plane proxy in the device mode?
Yes, you can use an event forwarding/data plane proxy while sending events to your destinations via device mode. The default vendor API endpoint will still work as expected.
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.