Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I would like to know what are reasons of latency for a HTTP request to load HTML part of a webpage.

I think about:

  • loading webpage with proxy
  • not having a good web server (apache vs nginx)
  • having a bad configuration of web server
  • having a bad internet connexion (bad ping)

Any other ideas?

share|improve this question
    
Are you really concerned with latency or do you mean response time or overall perceived web performance? Because latency excludes server-side and client-side processing time, and is primarily an issue of network performance. See this page and this page for what these terms mean. –  Lèse majesté Jun 1 '13 at 11:14
add comment

2 Answers

up vote 5 down vote accepted

Here are some areas to consider in general, without going into detail:

  • Physical configuration/server specs:

    • RAM (the more the better)
    • CPU processor speed, and number of cores for multi-core applications
    • Drive speed and physical RAID to increase read/write speed (not software RAID used for mirrors and backups)
      ...

  • OS and server configuration: (This is specific to each web server, but some common ones follow):

    • Number of simultaneous connections
    • KeepAlive & KeepAliveTimeout (naming varies)
    • Caching
    • Memory allocation
    • Load balancing (reducing loads across multiple servers)
      ...

  • Network bandwidth and connection speed:

    • Run comparisons of sites with different web host companies/ISP's by analyzing ping and traceroutes from different locations (e.g., Pingdom Tools)
    • Consider the speed of the network connected to your server, and number of hops to your users
    • Consider if there's redundant Internet connections when bandwidth is exceeded
      ...

  • DNS health and lookup speed: (Often overlooked)

    • Run DNS checks to make sure your site can be reached (many are available online for free)
    • Test DNS response times
      ...

  • Optimize content: (Numerous techniques)

    • Compact HTML, CSS, JS, etc...
    • Compress all data sent to clients (e.g., using gzip)
    • Compress images and other media
      ...

  • Firewall:

    • Prevent scanning and attacks that require your server to work harder

  • Block leaching from other sites and servers:

    • Lock down application and script access to just your users and domains/hosts
    • Ban/blacklist abusive IP's
      ...

  • Exploits & Viruses: (Like desktop computers, servers are vulnerable to viruses and exploits that can slow it down)

    • Add a well-regarded virus scanner and schedule it during off-peak hours (so as not to slow it down during peak hours)
    • Keep an eye out for unknown processes in top, Task Manager, or similar
    • Watch for unknown files and scripts in directories that take up resources

  • Exclude robots and links that shouldn't be indexed
    • Use robots.txt directives
    • Add web server configuration rules and/or a security module
      ...

  • Reduce bot & spider crawl frequency
    • Use crawl-delay directives in sitemaps
    • Use search engine webmaster tools to set the crawl rate for your site (e.g., Google's Webmaster Tools "Configuration" settings)
      ...

This is by no means an exhaustive list, but some key areas to think about regarding website speed and latency issues. Search for answers on this site for more details on each individual area.

share|improve this answer
    
Most of these have no practical impact on latency in 99% of real-life scenarios. The primary causes of latency are network related, e.g. route length (the geographical distance between the endpoints and the number of nodes between them), network congestion, and routing inefficiency. –  Lèse majesté Jun 1 '13 at 11:03
    
All of these can and do impact the speed of an HTTP request, as expanded upon the question's bullet points. But yes, number of hops and congestion are factors too. –  dan Jun 1 '13 at 18:05
add comment

Not having a good web server is pretty broad since you could have a good web server increasing latency for several reasons such as a peice of hardware that has defected such as a hard drive which is increasing seek time.

Also outside influences could be a factor, such as routing issues on networks that you do not have control off, as well as server-side attacks such as a DOS would most certainly increase delays in response time.

Finally bad configuration on the server could be increasing latency for one reason or more.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.