Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

closed as not constructive by HopelessN00b, mdpc, Jenny D, petrus, Dave M Mar 29 '13 at 16:22

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

up vote 1 down vote accepted

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/

share|improve this answer
1  
Pease note there's no definitive way to know what websites are on a server (without access to the server itself). The above website has built a database over a long time by basically going through domain names and looking at their IP address. Their results are not 100% accurate and likely are missing domains for a server or include domains that have since moved or ceased working. –  USD Matt Mar 28 '13 at 21:44

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.

share|improve this answer

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