In shared web hosting sometimes hundreds of virtual hosts operate on the same web server at a single ip address.
In what specific ways does the sharing of an ip address, rather than the sharing of other resources, affect performance?
In shared web hosting sometimes hundreds of virtual hosts operate on the same web server at a single ip address.
In what specific ways does the sharing of an ip address, rather than the sharing of other resources, affect performance?
Apache handles virtual hosts quite efficiently by using a hash table. The documentation says:
During initialization a list for each IP address is generated and inserted into an hash table. If the IP address is used in a NameVirtualHost directive the list contains all name-based vhosts for the given IP address. If there are no vhosts defined for that address the NameVirtualHost directive is ignored and an error is logged. For an IP-based vhost the list in the hash table is empty.
Due to a fast hashing function the overhead of hashing an IP address during a request is minimal and almost not existent. Additionally the table is optimized for IP addresses which vary in the last octet.
I've seen Apache servers with over 1000 virtual hosts, and performance was not noticeably worse than an Apache server with 10 virtual hosts.
The only way this affects performance is the total requests on the server will be higher as well as the lookup in the vhost file to match the url.
To determine how many virtual hosts there are operating at a single ip you cannot doe a reverse DNS but IP lookup. You can also do one online at : http://www.yougetsignal.com/tools/web-sites-on-web-server/