Score:0

Reduce server TTFB

eg flag

I have an application which uploads and reads files from another VPS (i.e. file server, Ubuntu 18.04). These servers are in the same network. The application (.NET core) uses SFTP protocol (SSH.net) for files reading/writing.

For a 5 Mb file it takes 3 seconds to load a file, more than 2 seconds of which is the TTFB (80% of total time).

Is there a way to reduce the TTFB and accelerate file transfer/load?

djdomi avatar
za flag
Please tell us more what you have to use this special usage case, and why it must be sftp instead of a other protocol like nfs or similar with less overhead?
John Mahowald avatar
cn flag
What is the time to upload or download a similar sized file with an sftp client external to your application? In other words, is it ssh to the remote that is slow to the first byte, or your application?
Score:0
cz flag

Setting up an ssh connection takes quite a bit of time. Two seconds isn't unreasonable. If you mean to transfer multiple files during a session, whatever that means for your application, you should leave the connection open between file transfers and reuse it to avoid this delay. Our sister site Stack Overflow can help you if you get stuck with fixing your application.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.