Score:0

High Time to First Byte (TTFB) on file load

mv flag

It takes about 3 seconds for my application (.NET Core) to load a 5 MB pdf file from the server in the local network. More than 2 seconds (78%) is the Time to First Byte (TTFB).

enter image description here

Is this normal behaviour? Is there a way to improve the TTFB?

Ubuntu 18.04, NGINX.

I can add any configuration file content on the basis of request.

ru flag
This isn't an NGINX issue, this is a backend application issue. Speed of download depends on the application, the system load, and other things, but it's not going to be the NGINX side (most likely) that's your bottleneck, but rather your backend application. If your config is to simply proxy_pass to your .NET Core app, then all the bottleneck is on your .NET Core application.
Doug Smythies avatar
gn flag
You asked [the exact same question](https://askubuntu.com/questions/1356690/reduce-file-upload-latency) yesterday, and should have just edited it to add the graph and bump it.
ru flag
Also, DO NOT repost your question just because the 'old' one got no attnetion - edit that post specifically.
Leeloo avatar
mv flag
@DougSmythies I deleted that question, because it was related to the SFTP. I've tested it and no problem revealed.
Leeloo avatar
mv flag
@ThomasWard Thank you for the notice, I will take it into account. Regarding the bottleneck, may be there is something to do with the server responsiveness?
ru flag
@Leeloo ultimately, after reviewing the other question, that question is still *identical* to the TTFB problem here.
ru flag
@Leeloo without access to your system to track resource usage, runtime operations of your app independently of NGINX (directly interfaced for example), etc. there's limited ways we can ID things. We need you to ID your disk I/O usage, your CPU usage, RAM usage, and directly test your application without NGINX in line to determine if the application is, in fact, at fault and is bottlenecked by system resources.
Leeloo avatar
mv flag
@ThomasWard I could copy here the needed information if you could support.
ru flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/128382/discussion-between-thomas-ward-and-leeloo).
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.