---
title: Transports
slug: v4-4/MZEMT9IuC3xFpARHUgaHq
docTags: 
createdAt: 2023-08-03T21:20:52.928Z
---

Ditto’s peer-to-peer network architecture utilizes the following diverse set of communication transport technologies and communication channels to achieve seamless, offline-first connections between devices:* [Bluetooth Low Energy](./#bluetooth-low-energy)
* [Apple Wireless Direct Link](./#apple-wireless-direct-link)
* [Wi-Fi Aware](./#wi-fi-aware)
* [Local Area Network](./#local-area-network)
* [WebSockets](./#websockets)For instructions on how to enable system-wide configurations, see any of the following:* [Network Deployment](docId:1ao6QxsuCiUElFQyOxnD7)&#x20;
* [Configuring Transports](docId\:q3jYdBWOO-__rkSjdQKG0)
* [Capturing Small Peer Information](docId\:BpgnsUfysOHqityvKQiVe)
* [Installing Bluetooth on Linux](docId\:Ry-XD4yLzmfjXs_a9uEtY)# Bluetooth Low EnergyDitto utilizes both traditional Wi-Fi and Bluetooth Low Energy (LE) to maintain a continuous mesh network of Transmission Control Protocol (TCP) connections.Bluetooth LE technology forms low-powered and high-distance connections between devices, making it highly performant in offline scenarios when replicating small amounts of data. :::hint{type="info"}
In the event of a Wi-Fi network disruption, such as a router getting disconnected, Ditto does not automatically switch transports to establish an independent Bluetooth LE connection as a fallback.&#x20;

Instead, Ditto actively works to maintain the previously established Wi-Fi and Bluetooth LE connections.&#x20;
:::## PerformanceThe following distances and bandwidth limitations and capacities are approximations and vary depending on the Bluetooth® firmware installed in the end-user environment. :::hint{type="warning"}
**Syncing large documents can significantly impact network performance:**

Caution is advised when handling large binary data, such as a high-resolution image or video exceeding 50 megapixels; a deeply embedded document; or a very large document.

Instead of storing files exceeding 250kb directly within a document object, carefully consider using `ATTACHMENT` . For more information, see [Attachment Objects](docId\:rb3wd2jhEnojPw8XUIRFy).
::::::hint{type="info"}
Most devices manufactured during or after 2017 are equipped with Bluetooth LE version 5.0. 
:::| **Bandwidth Capacity**                         | **Discoverability Range** | **Distance Durability**                                      |
| ---------------------------------------------- | ------------------------- | ------------------------------------------------------------ |
| 20-kilobyte (KB) maximum per 1-second interval | 30- to 60-meter maximum   | - For v.4.0, 80-meter maximum
- For v.5.0, 130-meter maximum |## LimitationsBluetooth LE performance declines in the following scenarios: - There are physical obstructions, radio signal attenuation, radio frequency congestion, upon other environment challenges.

- Replicating large amounts of binary data, such as high-resolution image files or large document objects.&#x20;:::hint{type="info"}
When replicating large amount of data, use an [Attachment](docId\:OnYzDX8asJ26IhB-DUfq5) type to encode the data instead of a [document](docId\:FXfiuIK0OjdZ4JNlja-75).&#x20;
:::# Peer-to-Peer Wi-FiThe bandwidth capacity and distance limitation of peer-to-peer Wi-Fi connections depend on the end-user environment, as different devices and platforms support varying Wi-Fi technologies. The following table provides an overview of the Wi-Fi technologies Ditto supports, organized by platform:| **Platform** | **Ditto-Supported Technology**    |
| ------------ | --------------------------------- |
| Apple        | Apple Wireless Direct Link (AWDL) |
| Android      | Wi-Fi Aware                       |## Apple Wireless Direct LinkUnlike Bluetooth LE, which enables peers to establish cross-platform connections between devices, the Apple Wireless Direct Link (AWDL) transport type can only be utilized to sync data between Apple devices. Peers within an end-user environment of the Apple platform can use AWDL for point-to-point communication, enabling extremely fast, high-bandwidth sync for iOS and macOS devices. This makes it highly performant when replicating large amounts of data such as high-resolution videos and images or files. ### PerformanceAWDL-enabled mesh communication between Apple-based peers has significantly higher bandwidth compared to Bluetooth LE, allowing for low-latency, high-speed data transfers.| **Bandwidth Capacity**                                             | **Discoverability Range** | **Distance Durability** |
| ------------------------------------------------------------------ | ------------------------- | ----------------------- |
| * 5 GHz frequency range
* 1-Gigabyte maximum per 8-second interval | 30-to 60-meter maximum    | 35-meter maximum        |### LimitationsWith an average maximum range of 35 meters from point-to-point, AWDL allows for shorter distances of communication compared to Bluetooth LE, which can be sustained for distances up to 130 meters. ## Wi-Fi AwareWi-Fi Aware technology is a new open standard that you can use to establish a mesh network connection between devices running on the Windows or Android platform. ### PerformanceWi-Fi Aware, similar to AWDL for the Apple platform, offers significantly higher bandwidth compared to Bluetooth LE, allowing for low latency, high-speed data transfers between Android or Windows devices\::::hint{type="info"}
The following specifications are approximations; the type of device and platform as well as its network configurations ultimately determine range and performance.
:::| **Bandwidth Capacity**                                             | **Discoverability Range** | **Distance Durability**   |
| ------------------------------------------------------------------ | ------------------------- | ------------------------- |
| - 2.4- to 5-GHz frequency range
- 1 Gigabyte per 8-second interval | 100- to 300-meter maximum | 100- to 300-meter maximum |### LimitationsWi-Fi Aware connections have a limited range of shorter distances of communication compared to Bluetooth LE, which can be sustained for distances up to 130 meters. # Local Area NetworkWhen devices are connected over the same Wi-Fi access point or through other means like an Ethernet cable, they can take advantage of a local area network (*LAN*), if available, to communicate directly with each other without requiring internet access. A LAN is an interconnected network made up of devices that are physically near each other, such as a home, enterprise, or college campus.:::hint{type="warning"}
To ensure that Ditto’s discovery protocol is working effectively, it is important to disable the Client Isolation Mode feature on the Wi-Fi router or access point that you are using for the LAN. For instructions, see the official documentation provided by the manufacturer.

Note that the exact name of the feature may vary depending on the manufacturer and the specific model of Wi-Fi router or access point; however, the term “isolation” is commonly included in the feature name.
:::## PerformanceIn general, Local Area Network connections offer significantly higher bandwidth capacities compared to Bluetooth LE, allowing for low latency, high-speed data transfers\::::hint{type="info"}
The following specifications are approximations; the quality of the network infrastructure, as well as the network configurations and amount of network traffic ultimately determine range and performance.
::::::hint{type="info"}
Disabled by default, if you want devices located within the same LAN to find and identify each other automatically, manually enable IP multicasting entitlement for each device. For more information, see [Optimizations](./#optimizations), as follows.
:::| **Bandwidth Capacity**                                                | **Discoverability Range** | **Distance Durability** |
| --------------------------------------------------------------------- | ------------------------- | ----------------------- |
| Traditional LANs: 1- to 10-Mbps maximum; higher for fiber-optic LANs  | 200-meter maximum         | 200-meter maximum       |## LimitationsThe following are common conditions that contribute to a decline in LAN performance:| **Factor**                                     | **Description**                                                                                                                                                                                                                                                                              |   |
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |
| Network congestion                             | When there is a high volume of network traffic, in which multiple devices utilize the LAN at the same time, data transfer speeds and response times lag.                                                                                                                                     |   |
| Distance to the router or access point         | When devices are physically located far away from the router or access point, connections become unreliable or even unavailable altogether.                                                                                                                                                  |   |
| Network security and privacy                   | Network infrastructure enabled with various security controls, such as the Client Isolation Mode feature, may directly or indirectly affect performance. For more information, see [Security and Privacy: Client Isolation Mode](./#security-and-privacy-client-isolation-mode), as follows. |   |
| iOS direct connections with desktop-based apps | By default, iOS devices require the IP multicast entitlement to establish direct connections with desktop platforms, such as Windows. For more information, see [iOS-to-Desktop Connections](./#ios-to-desktop-connections), as follows.                                                     |   |## OptimizationsThere are various strategies you can implement in your app to improve the overall responsiveness of your local area network (LAN), minimize bandwidth consumption, and enhance the reliability of your peer-to-peer LAN connections. This section provides an overview of the different optimization strategies you can use to make the most out of your LAN setup. ### Optional Discovery Protocol: IP Multicasting&#x20;Ditto optionally offers an optimized discovery protocol that utilizes the User Datagram Protocol (UDP) and employs internet protocol (*IP*) *multicasting*. IP Multicasting is a method of reducing traffic on the LAN and optimizing performance of automatic device discovery. Disabled by default, if you want devices located within the same LAN to find and identify each other automatically, manually enable IP multicasting entitlement. :::hint{type="info"}
Before iOS devices can establish a direct connection with desktop platforms over LAN, the end user must grant permissions. For more information, see iOS-to-Desktop LAN Connections.
:::### Security and Privacy: Client Isolation ModeIf network infrastructure is configured with *Client Isolation Mode* enabled, devices are unable to discover each other and form a LAN connection. Client Isolation Mode is a network security and privacy feature offered by most Wi-Fi routers and access points that prevents devices on the same Wi-Fi network from communicating directly with one another. :::hint{type="warning"}
To ensure that Ditto’s discovery protocol is working effectively, it is important to disable the Client Isolation Mode feature on the Wi-Fi router or access point that you are using for the LAN. For instructions, see the official documentation provided by the manufacturer.

Note that the exact name of the feature may vary depending on the manufacturer and the specific model of the Wi-Fi router or access point; however, the term “isolation” is commonly included in the feature name.
:::### iOS-to-Desktop ConnectionsApple requires iOS device end users to grant permissions before a LAN connection with desktop-based devices can be established, such as an iOS device connecting directly with a desktop app running on the Windows operating system.:::hint{type="info"}
By default, iOS devices can connect with other mobile devices of any platform. For example, an iOS device can connect directly with an Android device over LAN.
:::If you want your iOS app to connect to desktop-based apps over LAN, request the multicast entitlement directly from Apple, and then, once received, add the multicast entitlement to your iOS app. For instructions, see the official Apple documentation > Entitlements > [com.apple.developer.network.multicast](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_networking_multicast).# WebSocketsSmall Peers connect with the Big Peer by way of *WebSocket&#x20;*&#x63;onnections. A *WebSocket&#x20;*&#x69;s a full-duplex communication protocol that enables a *long-lived* connection between Small Peers and the Big Peer over a Transmission Control Protocol (TCP):* Communication is referred to as *full-duplex* when the client and server can communicate in a bidirectional, back-and-forth manner allowing for low-latency data exchange.&#x20;

* A connection is referred to as *long-lived* when, once established, it remains open for an extended period of time.&#x20;

* Known as the playground token, Small Peers use this JSON Web Token (JWT) to authenticate with the Big Peer; as long as your playground token is active, your connection persists. For more information, see *Discover Basics&#x20;*> [Getting Your Credentials](docId\:JQjYL9gbvsgI9vlW3Ywvc).
Following are the most notable attributes of the WebSocket transport protocol and their connections:* Unlike other transports used for peer-to-peer communication, the WebSocket does not come with built-in automatic device discovery capabilities and requires manual configuration before a WebSocket connection between devices can be established.

* WebSocket connections can be made over a Transmission Control Protocol (TCP) or Local Area Network (LAN). Since the TCP transport layer rests on top of the internet protocol (IP), WebSocket connections established over TCP require an internet connection; however, LAN-enabled WebSocket connections do not.

* Supported on most devices, regardless of model and platform, the WebSocket communication protocol is one of the most commonly available transport protocols for real-time communication.
