Add an rsync plugin for faster result uploads#4739
Merged
Conversation
The existing scp plugin walks files one at a time over a single SFTP channel, which is the worst case for a result directory of thousands of small files — each one waits a full round-trip before the next starts. Shelling out to rsync over ssh pipelines the wire protocol and reuses the channel, so the same upload finishes in a small fraction of the time on a typical Linux host. This is exposed as a new plugin (--rsync.host / --rsync.username / --rsync.privateKey / --rsync.destinationPath / etc.) sitting next to scp, s3 and gcs, so users on the existing scp plugin keep their exact behaviour and pick rsync only when they explicitly opt in. Password authentication works through sshpass when present; passphrase-protected keys need ssh-agent loaded ahead of time. The plugin shells out to the system rsync and ssh binaries, which is fine for the Linux runtime where sitespeed.io is mostly deployed. Co-authored-by: Claude noreply@anthropic.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The existing scp plugin walks files one at a time over a single SFTP
channel, which is the worst case for a result directory of thousands
of small files — each one waits a full round-trip before the next
starts. Shelling out to rsync over ssh pipelines the wire protocol
and reuses the channel, so the same upload finishes in a small
fraction of the time on a typical Linux host.
This is exposed as a new plugin (--rsync.host / --rsync.username /
--rsync.privateKey / --rsync.destinationPath / etc.) sitting next
to scp, s3 and gcs, so users on the existing scp plugin keep their
exact behaviour and pick rsync only when they explicitly opt in.
Password authentication works through sshpass when present;
passphrase-protected keys need ssh-agent loaded ahead of time. The
plugin shells out to the system rsync and ssh binaries, which is
fine for the Linux runtime where sitespeed.io is mostly deployed.
Co-authored-by: Claude noreply@anthropic.com