Virtual Hosting vs. dedicated servers
Virtual hosting a hosting for multiple domain names on a single server or pool of servers. It allows one server to share its resources such as memory and processor cycles, without requiring all services provided to use the same hostname. Web servers, but the principles carry over to other internet services.
Shared web hosting prices are lower than a dedicated web server as many customers can be hosted on a single server. It is also very common for a single entity to use multiple names on the same machine so that the names can reflect services offered rather than, where those services are hosted.
There are two main types of virtual hosting:
i) Name based and
ii) IP based – Name-based virtual hosting uses the hostname presented by the client.
IP-based virtual hosting. It uses a separate IP address for each hostname, and it can be performed with any protocol but requires a dedicated IP address per domain name served. Port-based virtual hosting is also possible in principle but is rarely used in practice because it is unfriendly to users. It saves IP addresses and the associated administrative overhead but the protocol served must supply the host name at an appropriate point.
Name-based virtual hosts to use multiple host names for the same IP address. The biggest issue with a name based virtual hosting is that it ‘s hard to host multiple secure websites running SSL/T LS.
The SSL/TLS handshake takes place before the expected hostname sent to the server, the server doesn't know which certificate to present in the handshake. It is possible for a single certificate to cover multiple names either through the “subject name” field or wild cards but the practical application of this approach is limited by administrative considerations and by the matching rules for wildcards.
Furthermore, if the Domain Name System (DNS) is not properly functioning, it ‘s hard to access a virtually-hosted website even if the IP address is known. Since the web server relies on the web browser client telling it what server name to use, the server will respond with a default website often, not the site the user expects. IP-based.
The web server configured with multiple physical network interfaces, virtual network interfaces on the same physical interface or multiple IP addresses on one interface. The web server can either open separate listening sockets for each IP address.
It can listen on all interfaces with a single-socket and obtain the address the TCP connection was received on after accepting the connection. Either way, it can use the IP address to determine which website to serve.The downside of this approach is the server needs a different IP address for every site. It increases administrative overhead and contributes to IPv4 address exhaustion.
Virtual web hosting often used on a large scale in companies whose business model is to provide low-cost website hosting for customers.
The vast majority of customer websites worldwide are hosted on shared servers, using virtual hosting technology. Many businesses utilize virtual servers for internal purposes, where there is a technological or administrative reason to operate several separate websites, such as a customer extranet website, and intranets for a different department.