# Best way to send files between nodes. Which to choose?

**URL:** <https://erlangforums.com/t/best-way-to-send-files-between-nodes-which-to-choose/5212>\
**Category:** Questions / Help\
**Tags:** erlang, erlang-otp\
**Created:** [November 4, 2025, 4:06pm UTC](https://erlangforums.com/t/best-way-to-send-files-between-nodes-which-to-choose/5212 "2025-11-04T16:06:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexandr](https://erlangforums.com/user_avatar/erlangforums.com/alexandr/32/2162_2.png) [@alexandr](https://erlangforums.com/u/alexandr)\
**Post date:** [November 4, 2025, 4:06pm UTC](https://erlangforums.com/t/best-way-to-send-files-between-nodes-which-to-choose/5212/1 "2025-11-04T16:06:14Z")

</div>

Hello all!

What is the best way to send files between nodes for modern Erlang:

- Shell command + rsync and notify Erlang with erl\_call
- Send process-to-process between nodes in Erlang itself
- Something else

Any examples?

By myself found this example [GitHub - innaky/transfer\_file: Transfer or copy file between erlang nodes.](https://github.com/innaky/transfer_file) but 6 years no activities. Need something very fast.

---

<div class="post-metadata">

**Author:** ![mikpe](https://erlangforums.com/letter_avatar_proxy/v4/letter/m/b487fb/32.png) [@mikpe](https://erlangforums.com/u/mikpe)\
**Post date:** [November 4, 2025, 9:44pm UTC](https://erlangforums.com/t/best-way-to-send-files-between-nodes-which-to-choose/5212/2 "2025-11-04T21:44:14Z")

</div>

“Best” depends on your requirements. Large files vs small files, many all the time or occasional, do the receivers want their contents as values in the VMs or not?

`rsync` and `os:cmd` would be a good start, unless the requirements clearly say otherwise.

---

<div class="post-metadata">

**Author:** ![Wondersye](https://erlangforums.com/letter_avatar_proxy/v4/letter/w/f14d63/32.png) [@Wondersye](https://erlangforums.com/u/Wondersye)\
**Post date:** [November 4, 2025, 10:12pm UTC](https://erlangforums.com/t/best-way-to-send-files-between-nodes-which-to-choose/5212/3 "2025-11-04T22:12:16Z")

</div>

And what about [sendfile](https://www.erlang.org/doc/apps/kernel/file.html#sendfile/2) for point-to-point transfers or, if having a network of nodes, peer-to-peer protocols? (for example apparently several Erlang BitTorrent clients can be found)

---

<div class="post-metadata">

**Author:** ![michalmuskala](https://erlangforums.com/user_avatar/erlangforums.com/michalmuskala/32/247_2.png) [@michalmuskala](https://erlangforums.com/u/michalmuskala)\
**Post date:** [November 5, 2025, 1:49pm UTC](https://erlangforums.com/t/best-way-to-send-files-between-nodes-which-to-choose/5212/4 "2025-11-05T13:49:23Z")

</div>

Just one anecdotal warning - we’ve seen issues on the receiving end of such a file transfer (using `file:sendfile`). At high concurrency and rate of operations we’ve seen the binary allocator struggle with deallocating all the binaries received from `socket`. A stop-gap solution of a simple NIF for receiving and writing to a file with a pool of buffers worked well for us.

---

<div class="post-metadata">

**Author:** ![rlipscombe](https://erlangforums.com/user_avatar/erlangforums.com/rlipscombe/32/459_2.png) [@rlipscombe](https://erlangforums.com/u/rlipscombe)\
**Post date:** [November 6, 2025, 11:30am UTC](https://erlangforums.com/t/best-way-to-send-files-between-nodes-which-to-choose/5212/5 "2025-11-06T11:30:25Z")

</div>

Alternatives:

- Shared filesystem where the file implicitly exists on all nodes?
- Shared S3-like where the file exists elsewhere, but is accessible from all nodes?
- Outbox, inbox pattern: you write to local filesystem, something else picks it up and writes it to the remote filesystem? Remote end polls for newly-arrived files.

Like @mikpe says: “best” depends on your requirements.

---

<div class="post-metadata">

**Author:** ![alexandr](https://erlangforums.com/user_avatar/erlangforums.com/alexandr/32/2162_2.png) [@alexandr](https://erlangforums.com/u/alexandr)\
**Post date:** [November 11, 2025, 5:22am UTC](https://erlangforums.com/t/best-way-to-send-files-between-nodes-which-to-choose/5212/6 "2025-11-11T05:22:03Z")

</div>

My requirements to store large amount of files about 15Mb - 1100Mb. This is fragments from RTSP streaming cameras. The income traffic is +500Mbit/sec, sometimes more than 4Gbit/sec. The rsync looking reliable but slow. Maybe need to rephrase question - what is the fastest way to transfer files between nodes?
