Kahibaro
Discord Login Register

17.3 Web Hosting

Overview

Web hosting is the service that makes websites available on the internet. When you type a domain name into a browser, behind the scenes you are reaching a web server that stores the site’s files and delivers them to you over HTTP or HTTPS. This chapter focuses on how hosting works as a service, what kinds of hosting exist, and what is important from a networking point of view.

Web hosting always involves three basic elements: a server that runs web software, storage for the site’s files and data, and network connectivity so users can reach the server via an IP address and a domain name. Other chapters cover DNS, HTTP, HTTPS, and reverse proxies, so here we concentrate on how hosting providers organize and deliver websites.

Basic Architecture of Web Hosting

A typical hosted website has a simple path from user to server. A user’s browser resolves the domain name to an IP address, connects to that address on TCP port 80 for HTTP or 443 for HTTPS, and sends requests. The hosting server listens on those ports and responds with HTML, images, scripts, and other content.

From a hosting perspective, the core components are:

ComponentRole in hosting
Web server softwareListens for HTTP/HTTPS requests and serves content
Application runtimeRuns dynamic code such as PHP, Python, or Node.js
Database serverStores structured data such as users, posts, and products
Local or network storageHolds static files such as HTML, CSS, images
Network stackProvides IP address, ports, and routing to the internet

In many simple hosting setups, all of these components run on a single physical or virtual server that has one public IP address. In more advanced setups, web servers, databases, and storage systems can live on separate machines, but from the perspective of a user it still appears as a single website at a single domain.

Shared Hosting

Shared hosting is the entry level tier that many small websites use. A hosting provider runs a single physical server or a large virtual machine and places many customer websites on it. All these sites share the same CPU, memory, disk, and network interface.

Technically, shared hosting uses one or more IP addresses and then distinguishes different customer sites by their domain names. The web server software can host multiple “virtual hosts” and decide which site to serve based on the Host header in the HTTP request. Several domains can therefore point to the same IP address, and the web server routes each request to the right site.

Resources such as bandwidth and CPU time are not dedicated to any one site. When traffic to one site on the shared server spikes, it can affect the others. Shared hosting also implies that many customers often share the same public IP, which can matter for reputation based systems or security policies.

Virtual Private Servers (VPS)

Virtual Private Servers represent a step up in isolation. Instead of placing many user accounts on one operating system, the provider slices a physical server into multiple virtual machines using a hypervisor. Each customer gets a VPS that looks like a separate server, with its own operating system, its own process space, and usually its own IP address.

From a networking perspective, a VPS behaves like any other server on the internet. It has one or more IP addresses, network interfaces presented by the hypervisor, and its own firewall rules. The hosting provider controls the physical network but the customer controls the software stack from the operating system up.

VPS hosting is often used when a site needs custom software, non standard ports, or more predictable resources than shared hosting can provide. Because each VPS can have dedicated CPU and memory allocations, heavy traffic on one VPS does not directly consume the resources of another, even if they live on the same physical machine.

Dedicated Servers

Dedicated servers go further by assigning an entire physical machine to a single customer. There is no hypervisor layer shared with other tenants, and no other customers’ workloads on that hardware.

On the network, a dedicated server may have several physical interfaces and a block of public IPv4 or IPv6 addresses assigned to it. The customer can use these addresses for different sites, services, or even internal routing. Bandwidth limits are defined by the provider’s uplinks and the plan, but within those limits the full performance of the server’s network card is available to that one customer.

Dedicated hosting is common for large, high traffic sites or for specialized workloads that require strict performance, security controls, or compliance. From the perspective of the wider internet, a dedicated server is simply another endpoint, but inside the data center it is connected to top of rack switches and upstream routers as part of a larger hosting network.

Managed vs Unmanaged Hosting

Hosting can be described not only by how resources are allocated, but also by who operates which layers of the stack.

In unmanaged hosting, the provider is responsible for the physical infrastructure and basic connectivity. The customer installs and configures the operating system, web server, application frameworks, security settings, and monitoring. The network side that the customer sees is under their control, including firewall rules and service ports, subject to the provider’s policies.

In managed hosting, the provider handles more of the software stack. They may maintain the operating system, patch the web server, configure databases, and tune performance. The customer focuses on their application and content. Network related tasks such as SSL certificate installation, basic DDoS protection, and configuration of standard ports are often included.

The boundary between managed and unmanaged services affects how much direct access a customer has to low level network settings. For example, some managed plans hide the raw firewall and only expose simplified controls through a user interface.

Domains, IPs, and Virtual Hosts

Hosting a site always involves binding a human friendly domain name to a network reachable service. Although DNS is covered in detail elsewhere, it is important here to see how hosting providers link domains, IPs, and web server configuration.

A hosting server has at least one IP address. In simple cases, a domain’s DNS A or AAAA record points directly to that IP. The web server receives all incoming traffic to that address and then uses its configuration to decide which site to serve. This is virtual hosting.

There are two main styles of virtual hosting. One style uses multiple IP addresses and assigns one IP to each site. Another style uses name based virtual hosting so many domains share one IP. In the second style, the HTTP Host header tells the server which site the user wants. For encrypted HTTPS traffic, modern hosting often uses Server Name Indication, which lets the server pick the right certificate for each domain even when multiple domains share a single IP.

In a typical low cost plan, a provider might create a control panel entry, which sets up a new virtual host, points that virtual host to a directory of files, and then instructs customers to point their domain’s DNS records to the provider’s IP. From a networking point of view, all these domains converge on the same server and IP, which then separate traffic by name.

Static vs Dynamic Hosting

Not all hosted sites behave the same way. Some sites serve only pre built files, others build content for each request. This difference affects how the hosting environment uses network and compute resources.

Static hosting serves files from storage without running application code per request. When a user requests a page, the server reads the matching file and sends it. Static sites can be hosted extremely efficiently because the server can cache content and does not need to connect to databases frequently. Some providers store static content in object storage systems and front it with HTTP gateways, but to users this still appears as a normal website.

Dynamic hosting supports languages and frameworks that generate pages on the fly. A single URL can produce different responses based on user input, database contents, or external APIs. Each request may involve multiple internal network calls between the web tier and database or cache servers. This increases the importance of internal network performance and latency within the hosting environment.

Even though both models deliver content over HTTP or HTTPS, static hosting is simpler at the network layer and easier to scale horizontally, while dynamic hosting may require careful coordination between web servers, databases, and application runtimes.

Scaling and High Availability

As websites grow, a single server is often not enough. Hosting providers then introduce load balancing, replication, and redundancy to keep services available and responsive.

A common pattern is to place multiple web servers behind a load balancer. The load balancer listens on a public IP and forwards incoming TCP connections to one of several backend servers. To the outside world, there is still one IP and one domain name. Inside the hosting network, traffic is distributed across many machines. Some load balancers operate at layer 4 with simple TCP or UDP balancing. Others inspect HTTP headers and paths at layer 7 to make smarter routing decisions.

Data storage is also replicated for high availability. Databases might run in primary and secondary configurations, where a primary instance handles writes and replicates data to one or more secondary instances. If the primary fails, a secondary is promoted. This failover can be coordinated by cluster management software and must be supported by the hosting network routing so that applications always know which database endpoint to contact.

The hosting network itself is usually built with redundant switches, multiple uplinks, and automatic routing failover. In practice this means that even if a device or path fails, the site remains reachable at the same IP address, although there may be a brief reconvergence period while routes update.

Important: A highly available hosting setup keeps a single stable public identity, such as a domain name and IP address, while hiding multiple redundant servers and paths behind it. Users always connect to the same visible endpoint, even though the hosting platform can shift traffic internally for performance and resilience.

CDN Integration

Many hosting environments use Content Delivery Networks, or CDNs, to improve performance for global users. A CDN is a distributed system of caching servers located in many geographic regions. Static content such as images, scripts, and style sheets is copied to these edge locations.

When a user requests content, DNS or HTTP based routing directs them to a nearby CDN node instead of all the way back to the origin hosting server. This reduces latency and offloads bandwidth from the origin. The origin remains the authoritative source, and the CDN fetches updates when content changes or cache entries expire.

From the hosting provider’s viewpoint, the origin server needs to be configured to trust requests from the CDN and often sees fewer direct client connections. The majority of traffic comes from a smaller number of CDN IP addresses. This changes how firewalls, rate limits, and logging are interpreted, since one CDN IP may represent thousands of end users.

Security and Access Control in Hosting

Web hosting providers must balance easy access for legitimate users with protection against misuse. Several measures are often integrated directly into the hosting service.

At the network edge, providers deploy filters to block common attacks or malformed traffic before it reaches customer servers. Basic DDoS mitigation may be included, with specialized services available for larger deployments. Hosting firewalls control which ports are reachable from the internet, usually allowing HTTP and HTTPS, and blocking management ports or database ports from public access.

On the server side, hosting platforms isolate customer environments so that one tenant cannot easily inspect or interfere with another. Shared hosting relies on strong operating system level separation between user accounts. VPS and dedicated servers rely on hypervisor isolation or the complete absence of other tenants.

Access for administration typically uses secure protocols. Console and file transfer methods are often restricted to authenticated users or specific IP ranges. In a hosting context, network access to management interfaces is as important as access to web content, since compromise of either can lead to site takeover.

Important: In a hosted environment, never expose internal or management services directly to the public internet unless they are strictly necessary and properly secured. Limit network access to administrative ports and trust only encrypted, authenticated connections.

Logs, Metrics, and Monitoring

For web hosting to be reliable, providers and customers must observe what is happening on their servers. Network aware monitoring is a core part of this.

Access logs record each incoming HTTP request, including client IP, requested URL, status code, and response size. These logs are useful for troubleshooting errors, measuring traffic, and detecting suspicious patterns such as repeated login attempts. Error logs record server side failures and are essential when diagnosing configuration or application issues.

Hosting providers often collect metrics such as request rates, bandwidth usage, connection counts, and latency. These statistics can trigger alerts if a server becomes overloaded or unresponsive. From a networking perspective, spikes in error rates or timeouts often indicate connectivity problems, routing issues, or exhaustion of network level resources like sockets.

Many hosting control panels expose bandwidth graphs over time, which help customers understand usage patterns and plan for upgrades or CDN integration. Internally, providers use these measurements to allocate capacity and engineer their networks for growth.

Cloud Based Web Hosting

Cloud platforms extend traditional web hosting ideas into more flexible and dynamic models. Instead of renting a fixed server, customers often consume compute instances, containers, or fully managed application services.

A simple cloud hosting setup uses a virtual machine instance with a public IP and a security group that defines which ports are open. From the outside, this behaves like a VPS. However, the customer can quickly add or remove instances, change instance sizes, or attach new network interfaces.

More advanced cloud offerings provide services that remove the need to manage individual servers. For example, managed web application platforms accept application code and automatically create and scale instances behind load balancers. The platform manages network routing between load balancers, instances, and databases. Customers see configuration options such as allowed ports, DNS integration, and SSL certificates, but do not know or care which exact virtual machine serves any particular request.

Cloud hosting integrates tightly with other network services such as cloud based DNS, managed databases, and private virtual networks. These topics are covered in more detail in dedicated chapters, but at a high level they form a unified environment where hosting, storage, and networking can all be defined as code and adjusted rapidly.

Summary

Web hosting is the practical service layer that turns a domain name and web content into a live site on the internet. It ranges from simple shared environments to complex multi tier architectures with load balancing and global CDNs. The core networking concepts are consistent: users reach a site through an IP address and port, traffic is routed through hosting infrastructure, and providers use isolation, monitoring, and scaling techniques to keep sites fast and available.

Views: 38

Comments

Please login to add a comment.

Don't have an account? Register now!