QUICK FACTS
Created Jan 0001
Status Verified Sarcastic
Type Existential Dread
web servers, website, improving it, march 2009, junkyard, web server, computer, software, hardware, http

Web Server

“Honestly, the sheer volume of information you’ve thrown at me is… impressive. And tedious. But fine. You want the Wikipedia article on web servers rewritten,...”

Contents
  • 1. Overview
  • 2. Etymology
  • 3. Cultural Impact

Honestly, the sheer volume of information you’ve thrown at me is… impressive. And tedious. But fine. You want the Wikipedia article on web servers rewritten, expanded, and dripping with my particular brand of weary disdain? Consider it done. Just try not to expect enthusiasm.


Computer software that distributes web pages

This article, frankly, requires more than a few footnotes to lend it any credibility. It’s a mess of unsourced claims, like a poorly constructed website held together by digital chewing gum. If you’re serious about understanding this, perhaps you should try improving it yourself. Or don’t. It’s not my problem, but it will be your problem if it’s challenged and removed. And for the love of whatever passes for deities these days, find some reliable sources. This isn’t a playground for speculation. March 2009 is a long time ago, and frankly, I’ve seen better organized data in a junkyard .

The Machine and the Protocol

Look, a web server is fundamentally a piece of computer software , usually running on dedicated hardware , that’s designed to do one thing: listen. It listens for requests, typically over HTTP or its slightly less vulnerable cousin, HTTPS . Think of it as a very patient, very literal-minded butler. A user agent , which is usually your web browser or some tireless web crawler , sashays up and asks for something – a web page , an image, a perfectly crafted insult. The server, if it’s functioning correctly, responds. It either hands over the requested resource or, more often than not, it throws back an error message . Occasionally, if you’ve configured it to be particularly obliging – or foolish – it might even store something you’ve sent it. Don’t say I didn’t warn you.

The actual physical manifestation of this server can range from the absurdly small, like the embedded web server in your ADSL modem that’s probably struggling to configure itself, to the monstrously large. We’re talking about server farms with thousands of interconnected machines, all humming with the desperate energy of trying to serve the insatiable appetite of high-traffic websites . A single Dell PowerEdge in a rack mount setup might suffice for some, but for the truly popular, it’s a coordinated effort.

The content it serves can be either static – just a pre-existing file sitting there, waiting to be delivered – or dynamic . Dynamic content is generated on the fly, usually by some other program the server is reluctantly talking to. Static content is faster, easier to cache , and less likely to spontaneously combust. Dynamic content, on the other hand, is where the real applications live, but it’s also a lot more… involved.

And it’s not just about serving pretty pictures to humans anymore. Technologies like REST and SOAP , built on the back of HTTP, along with extensions like WebDAV , have turned these once-simple page-distributors into conduits for all sorts of computer-to-computer communication . It’s a brave new world, and frankly, it’s exhausting.

History: The Dawn of the Digital Dustbin

The history of web servers is, predictably, a tangled mess, overlapping with the history of the web browser , the history of the World Wide Web , and the granddaddy of them all, the history of the Internet . It’s a narrative of progress, yes, but also a testament to how quickly things become obsolete.

Initial WWW Project (1989–1991): A Vague, Exciting Proposal

It all started, as most things do, with a proposal. In March 1989, Sir Tim Berners-Lee , then employed by CERN , dared to suggest that scientists might benefit from an easier way to exchange information. His idea, a hypertext system, was initially met with comments that ranged from “vague” to “exciting.” By October 1990, he’d refined it, brought Robert Cailliau onboard, and finally, finally, it was approved.

Between late 1990 and early 1991, Berners-Lee and his team hammered out the foundational pieces. They wrote libraries and three programs that ran on NeXTSTEP OS – a rather niche operating system even then, running on NeXT workstations. Among these creations were:

These early browsers were clunky, retrieving pages written in a primitive form of HTML using a nascent protocol called HTTP 0.9 . In August 1991, Berners-Lee announced the WWW technology to the world, encouraging scientists to adopt it. The programs, along with their source code , were made available. While not formally licensed, CERN was surprisingly relaxed about it, allowing people to tinker and build upon their work. Berners-Lee, bless his optimistic heart, actively promoted its use and encouraged porting to other operating systems .

Fast and Wild Development (1991–1995): The Wild West of the Web

By December 1991, the web had stretched its digital limbs beyond Europe, with the first server installed at SLAC in the U.S.A. This was a crucial step, enabling communication across continents, however slow and unreliable it might have been.

The CERN web server continued its development, but the real action was happening elsewhere. Thanks to the open nature of the source code and the public specifications of HTTP , other implementations began to sprout. In April 1993, CERN made a pivotal move, placing its core web software – the client, the server, the code library – into the public domain . This was less a legal necessity and more a gesture of goodwill, freeing developers from any lingering concerns about derivative works.

By early 1994, NCSA httpd had emerged as a significant player. Running on various Unix systems, it introduced the ability to serve dynamically generated content via the CGI interface. Coupled with NCSA’s Mosaic browser, which could handle HTML FORMs for sending data, this hinted at the web’s potential for more than just static page delivery.

The number of active websites, a metric as unreliable as a politician’s promise, began its inexorable climb:

  • 1991: A mere handful, probably less than 100.
  • 1993: Around 130, still quaintly small.
  • 1995: A staggering 23,500. Quaint was officially over.

The second half of 1994 saw a shift. NCSA httpd’s development stagnated, prompting a group of enthusiasts – webmasters and professionals – to start patching and collecting improvements. This collective effort, built on the public domain source code, culminated in the birth of the Apache HTTP server project in early 1995.

Meanwhile, commercial ventures were emerging. In late 1994, Netsite arrived, a precursor to products that would pass through Netscape , Sun Microsystems , and eventually land with Oracle Corporation . Then, in mid-1995, Microsoft entered the fray with IIS for Windows NT , marking the arrival of a major player that would influence both client and server sides of the web. By the end of 1995, the original CERN and NCSA servers began their decline, outpaced by the faster development cycles and richer feature sets of their successors.

Explosive Growth and Competition (1996–2014): The Arms Race

The web exploded. By the end of 1996, over fifty different web server programs were available. Many were fleeting, but the landscape was rapidly evolving.

The formalization of HTTP/1.0 (1996) and HTTP/1.1 (1997, 1999) in RFCs forced servers to adapt. The introduction of persistent connections meant servers had to handle more simultaneous connections, pushing the boundaries of scalability.

From 1996 to 1999, commercial giants like Netscape Enterprise Server and Microsoft’s IIS battled it out, while on the open-source front, Apache HTTP Server solidified its dominance, lauded for its reliability and feature set. A notable, though less prevalent, contender was Zeus , known for its blistering speed and scalability until its eventual discontinuation.

Apache reigned supreme from mid-1996 until late 2015, when it was gradually overtaken by IIS and then, more decisively, by Nginx . IIS, after its initial surge, saw its market share dwindle considerably compared to Apache.

The numbers tell a story of relentless expansion:

  • 1996: Around 250,000 active sites.
  • 1998: Approaching 2.5 million.
  • 2000: Over 10 million.

Apache, bless its heart, attempted to keep pace by introducing performance enhancements like the event MPM and new caching mechanisms around 2005–2006. However, these were often experimental and slow to be adopted, leaving it vulnerable to faster, more agile competitors. The early 2000s saw the rise of other open-source servers like Lighttpd , Nginx , and commercial alternatives such as LiteSpeed , all vying for market share.

A significant shift occurred around 2007–2008. Browsers, in their quest to render increasingly bloated web pages faster, increased their default limit on persistent connections per host from two to four, six, or even eight. This effectively tripled the number of connections servers had to manage simultaneously. This trend, unsurprisingly, fueled the adoption of reverse proxies in front of existing servers and gave a significant boost to newer servers that could handle massive concurrency without demanding excessive hardware.

New Challenges (2015 and later years): The Protocol Wars Continue

The introduction of HTTP/2 in 2015 presented a new hurdle. Implementing this complex protocol was no small feat, and many smaller servers, those with less than 1-2% market share, faced a dilemma: invest heavily in supporting it or risk obsolescence. The reasons for hesitation were varied:

  • Backward Compatibility: HTTP/1.x would likely be supported for a long time, so immediate compatibility wasn’t a showstopper.
  • Complexity: Implementing HTTP/2 was a monumental task, fraught with potential bugs and requiring significant development and testing resources.
  • Future-Proofing: Support could always be added later if the need truly justified the effort.

The major players, however, rushed to implement HTTP/2. Their existing support for SPDY provided a head start, and the pressure from webmasters eager for faster load times and reduced connection counts was immense.

This dynamic repeated itself with the emergence of HTTP/3 drafts around 2020–2021, showcasing the continuous evolution of web protocols and the ongoing race to adapt.

Technical Overview: The Inner Workings of a Digital Butler

Let’s peel back the curtain, shall we? This technical overview is a mere glimpse, a rough sketch of what a web server might do. It’s not exhaustive, because frankly, that would require more caffeine than I’m willing to consume.

A web server operates within the client–server model , meticulously implementing one or more versions of the HTTP protocol, often including its encrypted counterpart, HTTPS . Its complexity and efficiency are a delicate dance, influenced by:

  • Features: What bells and whistles does it have?
  • Tasks: What jobs is it expected to perform?
  • Performance Goals: How fast does it need to be? How many requests can it juggle?
  • Architecture: What underlying design principles guide its operation?
  • Target Environment: Is it a tiny embedded system or a behemoth handling global traffic?

Common Features: The Server’s Toolkit

Most web servers, despite their differences, offer a core set of functionalities:

  • Static content serving : The bread and butter. Delivering files as they are.
  • HTTP Support: Speaking the language of the web, in its various dialects (HTTP/1.0, HTTP/1.1, HTTP/2 , HTTP/3 ).
  • Logging : Keeping records of requests and responses. Essential for tracking down problems, or simply for morbid statistical curiosity.

Beyond the basics, you find:

  • Dynamic content serving : The ability to generate content on the fly. More complex, more powerful.
  • Virtual hosting : One IP address , multiple domain names . Efficient, but can get messy.
  • Authorization: Controlling who gets to see what. A fundamental security measure.
  • Content Cache: Storing frequently accessed data to speed things up. A crucial performance booster.
  • Large file support : Handling files bigger than 2 GB. Necessary in this age of massive data.
  • Bandwidth throttling : Limiting response speeds. Useful for managing resources, less so for user patience.
  • Rewrite engine : Mapping user-friendly clean URLs to their actual, often less elegant, counterparts.
  • Custom error pages : Making error messages slightly less soul-crushing. A small mercy.

Common Tasks: The Server’s Daily Grind

When a web server is awake and operational, it’s a busy entity:

  • It initializes, reads its configuration files , and starts listening for incoming connections.
  • It adapts its behavior based on its settings and current conditions.
  • It manages client connections , accepting new ones and gracefully (or not so gracefully) closing old ones.
  • It receives and meticulously reads client requests , verifying their syntax and parsing HTTP headers .
  • It performs URL normalization to standardize requests and mitigate security risks.
  • It engages in URL mapping to determine what resource the request actually refers to.
  • It translates URL paths into actual file system locations, a process that can be straightforward or involve complex logic for dynamic content .
  • It executes or refuses the requested HTTP method, potentially checking authorizations and handling redirects .
  • For static requests, it locates and reads the requested file or serves a directory index if configured.
  • For dynamic requests, it initiates the execution of external programs or internal modules, managing their communication and processing their output.
  • It constructs and sends the appropriate HTTP response , adding necessary headers .
  • It diligently logs all this activity, often to log files for later analysis.
  • It might also generate statistics, handle custom tasks , and generally keep the digital world turning.

Read Request Message: Deciphering the Plea

A web server must be able to ingest, interpret, and validate an incoming HTTP request message. This involves dissecting the HTTP headers and extracting crucial information. Once decoded, this data dictates how the server proceeds, often involving a gauntlet of security checks .

URL Normalization: Tidying Up the Mess

Web servers typically perform URL normalization to clean up the often-messy URLs sent by clients. This ensures a consistent path, reduces security vulnerabilities (like attempts to navigate outside the website’s root directory), and makes logs more readable. It’s about standardizing the request, removing extraneous elements like “.” and “..”, and ensuring paths are properly formed.

URL Mapping: The Detective Work

URL mapping is where the server figures out what the client actually wants. Is it a direct file request? A command to list a directory? Or a request for dynamically generated content? This process can involve complex rules, configurations, and the invocation of external programs or internal modules. The URL might not always correspond to a physical file; it could be a virtual pointer to a piece of application logic.

URL Path Translation to File System: Finding the File

This is the process of converting a URL path into a concrete location on the server’s file system . The server uses the host part of the URL to determine the website’s root directory and then appends the requested path. This could lead to a simple file , a directory requiring listing, or the path to an executable script.

  • Static File Request: http://www.example.com/path/file.html translates to /home/www/www.example.com/path/file.html on the server. The server then reads and sends the file, or an error if it’s missing.
  • Directory Request: http://www.example.com/directory1/directory2/ might lead to /home/www/www.example.com/directory1/directory2/. If no index file is found, the server might generate a directory listing, or return an error.
  • Dynamic Program Request: http://www.example.com/cgi-bin/forum.php?action=view points to an executable script. The server runs /home/www/www.example.com/cgi-bin/forum.php, passing the query parameters, and then relays the program’s output back to the client.

Manage Request Message: The Decision Tree

Once a request is understood, the server must act. This involves a cascade of decisions:

  • Is the request malformed? Send an error.
  • Does it use an unsupported method? Respond accordingly.
  • Does the URL require authentication? Prompt for credentials or deny access.
  • Does the URL map to a redirection? Issue the redirect.
  • Is it a dynamic resource? Call the appropriate handler.
  • Is it a static resource? Serve the file.
  • If none of the above apply or an error occurs, return a relevant error message.

Serve Static Content: The Simple Delivery

This is the core function: sending pre-existing files. It’s straightforward, fast, and reliable. For this task, servers primarily need to support GET, HEAD, and OPTIONS HTTP methods . Performance can be further enhanced with a file cache .

Directory Index Files: Listing the Contents

When a request hits a directory and no specific index file (like index.html) is found, a server can be configured to generate a directory listing . This displays the files and subdirectories within that location. It’s a convenience, but often avoided for security reasons.

Regular Files: The Standard Delivery

If the URL maps to a valid, accessible file, the server reads it and sends it. Security is paramount here; servers are typically configured to avoid serving sensitive file types or executing files directly unless explicitly intended.

Serve Dynamic Content: The On-the-Fly Generation

This is where things get interesting. When a request targets dynamic content, the server collaborates with an external program or internal module. It passes request parameters, receives the generated output, and then forwards it to the client. This often requires support for methods like POST to handle data submissions.

Key interfaces for this dynamic interaction include:

  • CGI : A new process is spawned for each request. Inefficient, but simple.
  • SCGI : A persistent process, accessed via network connections. More efficient than CGI.
  • FastCGI : Similar to SCGI but uses a persistent connection, offering better performance.
Directory Listings (Dynamic): The Visual Inventory

As mentioned, servers can dynamically generate directory listings. This process is more resource-intensive than serving a static file but offers flexibility. Custom templates can be used to style these listings, or they can be generated by scripts.

Program or Module Processing: The Application Logic

This is the heart of dynamic content. A program or module executes, interacting with databases , file systems, or other resources to produce content. This content can be anything: an HTML page, an image, structured data for a web interface . If the content changes based on request parameters, it’s dynamic.

Send Response Message: The Final Word

The server’s final act is sending the response. This can be a successful delivery of content or an error message.

Error Message: When Things Go Wrong

Errors are broadly categorized:

  • HTTP client errors : The client did something wrong, or the requested resource is unavailable (e.g., 404 Not Found).
  • HTTP server errors : The server itself screwed up (e.g., 500 Internal Server Error).
URL Authorization: The Gatekeeper

Servers can enforce access controls, requiring user authentication (username , password ) before granting access, or simply denying it outright.

URL Redirection: Pointing the Way

When a resource has moved, a server can issue a redirect, telling the client to request it from a new URL. This is used for fixing trailing slashes, reorganizing content, or enforcing secure connections.

  • Example 1: /directory1/directory2 redirects to /directory1/directory2/.
  • Example 2: /path/to/old_resource redirects to /new/path/resource.
  • Example 3: http://example.com/secure redirects to https://example.com/secure.
Successful Message: The Job Well Done

When all goes according to plan, the server sends a success message, optionally including the requested content, whether static or dynamically generated.

Content Cache: The Memory Palace

To improve performance and reduce load, web servers employ caching mechanisms.

File Cache: Remembering Static Files

Since accessing data from disks is relatively slow, operating systems and web servers themselves implement caches to store frequently accessed files in faster RAM . This significantly speeds up the delivery of static content.

Dynamic Cache: Remembering Generated Content

Output from dynamic processes can also be cached, especially if it doesn’t change frequently. This avoids regenerating content for every request, saving CPU cycles and backend processing. Often, external caching solutions like memcached or reverse proxies are used for this purpose.

Kernel-mode and User-mode Web Servers: Where the Code Runs

Web server software can run in two distinct modes:

  • Kernel Mode: Integrated into the operating system’s core (kernel ). Potentially faster due to direct resource access, but far more complex to develop and debug. A crash here can bring down the entire system.
  • User Mode: Runs as a standard application. Easier to manage and less prone to system-wide failures, but requires more interaction with the kernel for resources, which can introduce overhead.

Most modern web servers operate in user mode, as hardware and OS advancements have largely mitigated the performance disadvantages.

Performances: The Race Against Time

A responsive web server is key to a good user experience . Quick responses and high transfer speeds are the goals, minimizing the total time a user waits for a page to load.

Performance Metrics: Measuring the Madness

Key metrics include:

  • Requests per second (RPS): How many requests can it handle?
  • Connections per second (CPS): How quickly can it establish new connections?
  • Latency & Response Time: How long does it take to respond?
  • Throughput: How much data can it transfer per second?

These metrics are measured under various conditions, with the number of concurrent connections being a critical factor.

Software Efficiency: The Art of the Code

The underlying software design – single process vs. multi-process, threading models, coroutines , and clever programming tricks to minimize CPU cache misses or branch mispredictions – profoundly impacts performance and scalability . Some architectures simply demand more resources than others.

Operating Conditions: The Environmental Factors

Performance is a fickle beast, influenced by:

  • Server settings (logging enabled/disabled, etc.).
  • HTTP version used.
  • Type and complexity of requests.
  • Content type (static vs. dynamic).
  • Caching effectiveness.
  • Connection encryption (HTTPS adds overhead).
  • Network speed.
  • Number of active connections and processes.
  • OS limitations and hardware capabilities.

Benchmarking: Testing the Limits

Automated load testing tools are used to push servers to their limits and measure their capabilities.

Load Limits: When the Server Crumbles

Every web server installation has its breaking point. Pushing beyond these limits leads to overload, resulting in unresponsiveness or outright failure.

Causes of Overload: The Many Paths to Collapse

  • Legitimate Traffic Spikes: The dreaded Slashdot effect or viral content.
  • Distributed Denial of Service Attacks: Malicious attempts to overwhelm the server.
  • Malware: Computer worms or XSS worms can generate massive, uncoordinated traffic.
  • Internet Bots : Unfiltered bot traffic can cripple servers.
  • Network Congestion: Slowdowns upstream can cause clients to hold connections open longer, reaching server limits.
  • Backend Bottlenecks: Slow database responses or other backend issues can tie up server resources.
  • Partial Unavailability: If some servers in a cluster fail, the remaining ones bear the brunt.

Symptoms of Overload: The Warning Signs

  • Lag: Requests take ages to complete.
  • Error Codes: Frequent 500, 502, 503, 504, or even intermittent 404 errors.
  • Connection Resets: The server abruptly cuts off connections.
  • Incomplete Responses: Rarely, only partial data is returned.

Anti-Overload Techniques: The Defense Mechanisms

To stave off disaster, common strategies include:

  • OS Tuning: Optimizing operating system parameters.
  • Server Tuning: Configuring the web server for optimal performance and security.
  • Caching: Aggressively caching both static and dynamic content.
  • Traffic Management: Using firewalls , request filters, and bandwidth management to control traffic flow.
  • Distributed Architectures: Using separate servers for static, dynamic, and download content, often behind a load balancer .
  • Hardware Upgrades: More RAM , faster disks .
  • Efficient Software: Choosing performant web server software and efficient Web Server Gateway Interfaces .
  • Protocol Optimization: Leveraging modern protocols like HTTP/2 and HTTP/3 to reduce connection overhead, though encryption can still be a bottleneck.

Market Share: The Popularity Contest

The web server landscape is a shifting battleground. While Netcraft diligently tracks the market share of various servers, the numbers are a snapshot, constantly in flux.

DatenginxApacheOpenRestyCloudflare ServerIISGWSOthers
October 202134.95%24.63%6.45%4.87%4.00% (*)4.00% (*)< 22%
February 202134.54%26.32%6.36%5.0%6.5%3.90%< 18%
February 202036.48%24.5%4.00%3.0%14.21%3.18%< 15%

(*) Percentages rounded.

It’s a constant dance between established players and newer challengers, each vying for dominance.


There. A comprehensive, if somewhat jaded, overview. Don’t expect me to do that again anytime soon. Unless, of course, you make it interesting.