Peer-to-peer (P2P) file transfer in a browser sounds like magic: you open a web page, share a link, and a multi-gigabyte file travels to another device with no upload step. The technology behind it is WebRTC, the same standard that powers video calls in the browser. This article explains what actually happens, in plain language, including the parts that marketing pages often leave out.
Cloud transfer versus P2P transfer
| Cloud transfer | P2P transfer | |
|---|---|---|
| Where the file goes | Sender, then server, then receiver | Sender, then receiver |
| Stored copy | Yes, until it expires or is deleted | No |
| Receiver can download later | Yes | No, both must be online together |
| Size limit | Set by the service's plan | Set by your browser, disk space and patience |
| Speed | Upload once, download once | One trip, limited by sender's upload speed |
Step 1: Signaling, or how two browsers find each other
Two browsers cannot connect out of nowhere. Each one first contacts a small signaling server and receives an ID. When you share a FileVeda link, that ID is in the link. The receiver's browser uses it to ask the signaling server, "please introduce me to this peer." The signaling server passes a few short connection messages between the two browsers. It never sees the file.
Step 2: STUN, or working out a route
Most devices sit behind a router and do not know their own public address. A STUN server answers one simple question: "what address do you see me coming from?" With that answer, the two browsers can try to open a direct path to each other. On home networks and mobile data this works most of the time.
Step 3: TURN, the fallback relay
Some networks, especially corporate and campus ones, block direct connections. For those cases WebRTC can fall back to a TURN relay, which forwards the data packets between the two devices. This is important to state honestly: when a relay is used, the data does pass through a third machine. However, the packets are still encrypted between the two browsers, and the relay only forwards them. It does not store the file and cannot read it.
Step 4: Encryption is built in
WebRTC does not allow unencrypted data channels. Every connection is protected with DTLS, and the keys are negotiated between the two browsers themselves. This is not a feature a website can switch off, which is one reason WebRTC is a sensible base for private file transfer.
Step 5: Chunking and backpressure
A browser cannot push a 5 GB file into a connection in one piece. FileVeda reads the file in 64 KB chunks and sends them one after another. If the network is slower than the disk, the sender pauses until the outgoing buffer drains. This is called backpressure, and it is what keeps the tab from running out of memory during a long transfer.
Step 6: Receiving large files without filling RAM
On the receiving side, small files are assembled in memory and offered as a download. Large files are handled differently. On desktop browsers that support it, such as Chrome and Edge, the receiver picks a save location and the file is written straight to disk as it arrives. On other modern browsers the data is streamed into the browser's private storage instead. Either way, a large video does not need to fit in memory.
The real limits
- Both people must be online together. There is no "send now, download tomorrow."
- If either tab closes, the transfer stops. Keep the device awake for long transfers.
- The sender's upload speed is the ceiling. A 10 Mbps upload moves roughly 4.5 GB per hour at best.
- The receiver needs free disk space for the whole file.
When to use which
Use P2P when the file is private, large, or needed right now by someone who is online. Use cloud storage when the receiver needs to fetch the file later, or when many people need the same file. If you want to try P2P, open the FileVeda home page, add a file and share the link or QR code. If the file needs preparing first, see how to convert and share in one flow.