-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FTP: Enable SFTP connector to issue more than one unconfirmed read request #2567
Conversation
At least one pull request committer is not linked to a user. See https://help.github.com/en/articles/why-are-my-commits-linked-to-the-wrong-user#commits-are-not-linked-to-any-user |
I believe I was added to the Workday CCLA to allow me to contribute this fix, please confirm. |
It would be great if this fix could be released with a minor version bump of Alpakka V2. |
Hi @conorgriffin, Thank you for your contribution! We really value the time you've taken to put this together. Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement: |
Closed and reopened to trigger the CLA validator task |
Would a snapshot do? We've been progressing toward a |
It's not that big a deal, I could always use a locally built patch of v2.0.2 if needed. I wasn't sure of the level of inertia around a minor release. |
We produce timestamped snapshots every successful master build, so you could reference that in lieu of the next milestone release. |
What's the expected timeframe for the next milestone release? |
We don't have a date planned, but I think we could release |
This is my first PR. Should I solicit feedback somewhere or should I just wait for people to get to it in time? |
I have it on my backlog to review. I'll probably get to it next Tuesday, unless someone else does first. |
Thanks, have a great weekend 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find. Is sftp
doing something similar to speed up transfers? I wonder if this should be the default way of retrieving files if we can come up with a reasonable default. Is there a catch?
We should add a few lines to the FTP docs page too.
if you mean command-line From the man pages
I'm not aware of a catch doing parallel reads like this by default, with the exception of some additional memory usage. In testing I've done with |
Thanks @conorgriffin. Ok, let's keep the current state for now and let users discover this feature if they need it. Once you add a mention in the docs I think this PR will be ready. Maybe you could suggest the defaults found in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, a few docs suggestions.
Co-authored-by: Sean Glover <[email protected]>
Thanks, suggestions merged and last build was green so 🤞 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
You should be able to use this in your build by adding the Akka snapshots artifact repo and referencing |
Fixes: #2557
This change allows the SFTP connector to send multiple parallel read requests to an SFTP server, significantly improving throughput.
A new API has been added to
SftpSettings
-withMaxUnconfirmedReads(value: Int)
. When this value is >=2 it will result in the SFTP client sending the corresponding number of read requests to the server without waiting synchronously on an ACK for each one. This significantly improves performance and is particularly important for connections with higher latency.The timings below show the time taken in milliseconds to download a 1GB file at various latencies between an Alpakka SFTP client and an openssh SFTP server.