3 ms·
That's interesting, but #1 seems like a bug in your shared hosting service. 20 seconds for a single request isn't even usable, and an unoptimized Django config
by chubot 9y ago
That's interesting, but #1 seems like a bug in your shared hosting service. 20 seconds for a single request isn't even usable, and an unoptimized Django config doesn't start anywhere near that slow.
A $5 Linode and stock Django should be able to get you the 500-1000ms.
Also, I'm not sure how you're measuring 250 us, but I doubt it's meaningful number, because in practice either of these two numbers will be greater than that:
1) The network latency to send as single packet from the user to your server. This is usually more like 10 ms, or 40x what you're quoting.
Great link I saw on lobste.rs -- a website in a SINGLE PACKET:
https://github.com/diracdeltas/FastestWebsiteEver https://github.com/diracdeltas/FastestWebsiteEver
2) The time it takes the browser to render the page (e.g. loaded from the memory of a local server). Static HTML might render in 250 microseconds, but I doubt that anything with JavaScript or even CSS will.
In other words, I highly doubt you have 250 us end-user latency; it's basically impossible with the web and "normal conditions". You can choose to measure it in some weird way, but it doesn't reflect what your users are experiencing.
EDIT: I guess if you throw out the connection time, 250 us possible. But I don't think it's meaningful to throw out the connection time -- you at least have to average it over many requests.
- thephyber 9y ago#2 suggests that "response time" is more like "Time to First Byte" (TTFB).
- chubot 9y agoYeah, but I'm not sure why that's a meaningful metric. The user doesn't really care when the first byte is delivered -- they care when they can interact with the page (which is often less than when all bytes are delivered.)
- mozumder 9y agoIt was on a cheap Bluehost account. These shared hosts usually don't receive a lot of traffic, and often went to sleep which takes 20 seconds to wake up. The system wasn't scalable at all and we had occasional days of high-traffic when it mattered that would cause the site to remain fully inaccessible. I'm measuring response times at the server, with no network latencies. My optimization process involved reducing TTFB at first and then complete full page generation in later steps.
- chubot 9y agoOK understood, thanks for sharing your experience!