Setting Routing Hints
This article includes concepts and step-by-step instructions for modeling, configuring, and managing routing hints within your app.
When using the Big Peer optional cloud deployment and managing large document collections, you can group peers with similar data access patterns by assigning specific labels, known as routing hints.
Represented as an unsigned integer with 32 bits (uint32), a routing hint is a value you define at the device level that the Big Peer references to optimize connections with peers consuming the same datasets.
In a scenario where several restaurants operate on the same Big Peer cloud instance and devices within each restaurant share the same cloud data, assigning a single routing hint across peers within each restaurant optimizes individual peer connections with the Big Peer.
To set a routing hint in your app, from the top-most scope before starting the sync process:
Instantiate a TransportConfig object:
Set the routingHint on the configobject:
Using the TransportConfig object, specify the configuration settings for your Ditto instance: