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.
There are two modes through which you can send your event data from your website or mobile app to the desired destinations via RudderStack:
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.
The SDK automatically tracks and sends the user events to RudderStack. These events are then transformed by RudderStack and then routed to Amplitude.
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.
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.
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.
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:
You can choose to integrate these destinations with RudderStack via cloud mode or device mode, depending on your requirement.