What causes more than 200 ms of waiting for a response to HTTP?

Firebug not only shows the time it takes for individual requests, but also breaks them into phases. Most of the time spent getting small files (~ 20 KB) is spent waiting for a response (at least according to Firebug).

In stackoverflow, for example, waiting for a response to / takes 255 ms, transmits 42 ms. On other sites, I saw figures such as: a 200 ms wait response and 1 ms transmission. What causes the expectation?

Web sites usually consist of many files: html document, css, js, some images. Take any of the demos here, the dojox gfx demos , most of the time is spent migrating tiny js files. This whole model seems very inefficient to me.

+3
source share
5 answers

Before you get an answer, the following should happen:

  • Your package moves wild networks to the server.
  • The server should process the request and find out which website, virtual directory, regardless of what it belongs to.
  • The web server should pull the file from disk. If it is a dynamic file, it should run it through the interpreter / execution / independent mechanism (often the file must be completely processed before the server even starts responding).
  • The server should start the response, and this packet should cross the intertrons back to the client.

If you specified 50 ms as ping time, a 200 ms response time would leave 150 ms for the server to do all of it ... not blindingly fast, but respectable.

+3
source

( , ..) ( ping)

+2

"" ( ) - , ping, - , 50-100 , , , , , ..

: .

+1

200ms Nagle. , TCP 200 , , . , -. HTTP- , , , , , , naglging .

, , 200 .

+1

DNS? DNS,

0

Source: https://habr.com/ru/post/1714866/


All Articles