This document provides an overview of web server fundamentals, including:
- A web server receives requests from browsers, retrieves resources like HTML files, and sends them back with an HTTP response.
- Common response status codes include 200 for success and 404 for "not found".
- Factors to consider in establishing a web presence include goals, resources, site usage, control needs, and technology requirements.
- Options include a small local server, ISP space, free hosting, or paying for hosted space or a dedicated server.
2. Server Fundamentals 2
Server Fundamentals
• Software that answers requests for files,
printing, communications, etc.
• Server software normally accessed by many
different users via a network.
• Server software normally run on a
dedicated computer (“box”).
• The “Box” is often called a server as well.
• Server boxes typically more powerful than
workstations.
3. Server Fundamentals 3
Web Server Fundamentals
A webserver is software that does the following:
• Server receives requests from browser/client for
resources
– A resource is any chunk of information that can be
identified by a URL like HMTL or image files, scripts,
streaming media, etc.
• Server retrieves and/or processes the resource
• Server sends the resource back to the client
• Server logs the transaction
• Responses/requests occur using the HTTP
protocol, typically on port 80
4. Server Fundamentals 4
Sample HTTP Exchange
To retrieve the resource at
http://www.host.com/path/file.html
Browser sends request to host www.host.com, port 80:
GET /path/file.html HTTP/1.0
From: someuser@valtara.com
User-Agent: Mozilla/4.01
The server sends a response back to the client:
HTTP/1.0 200 OK
Date: Fri, 31 Dec 1999 23:59:59 GMT
Content-Type: text/html
Content-Length: 1354
<html><body><h1>Happy New Millenium!</h1>
(more file contents)
</body>
</html>
5. Server Fundamentals 5
Response Status Line
• Includes three parts separated by spaces
– the HTTP version
– a response status code that gives the result of the
request
– An English reason phrase describing the status code.
• Typical status lines are:
HTTP/1.0 200 OK or
HTTP/1.0 404 Not Found
6. Server Fundamentals 6
Common Response Status Codes
• 200 OK - Request succeeded, resulting resource is
returned in the message body
• 404 Not Found --The requested resource doesn't exist.
• 301 Moved Permanently
• 302 Moved Temporarily
• 303 See Other (HTTP 1.1 only) Resource has moved to
another URL (given by the Location: response header),
and should be automatically retrieved by the client.
• 500 Server Error -- Unexpected server error. Common
caused by a server-side script that has bad syntax, fails, or
otherwise can't run correctly.
7. Server Fundamentals 7
Response “Content-Type”
• Response header includes “Content-Type” to tell
client/browser how to handle the resource (display
a browser or launch an application/plug-in)
• Based on MIME types for email attachments
• Broad types: text, image, audio, video, application
• Many different subtypes, always new ones.
• E.g., Content-Type: text/html
• Most webservers software have a list of common
types – must define new subtypes on webserver
8. Server Fundamentals 8
Web Server Fundamentals
• Webservers process response/requests, log
activity, and handle scripts.
• Personal Web Server a good example.
• BUT -- Life gets complicated when…
– Additional services are desired (FTP,
Listservers, NNTP, Streaming Media, etc.)
– Server-side dynamic content can quickly
overwhelm a server “box”
9. Server Fundamentals 9
Establishing a Web Presence
• Different paths for different needs:
– Develop a small local webserver (PWS).
– Use space provided by your ISP.
– Lease space with a web hosting service.
– Lease a server with a web hosting service.
– Create and manage your own webserver.
– Create and manage a webserver farm.
10. Server Fundamentals 10
Key Considerations (1)
• Web site goals and architecture
– Static vs. dynamic content
– Internet vs. Intranet vs. Extranet
– Domain name required?
– Special technologies needed for some resources (e.g.,
streaming media, secure e-commerce)?
• Resources (Time, money, and expertise)
A balance between:
– How much can you spend (including personnel)?
– How much time and expertise do/can you have?
11. Server Fundamentals 11
Key Considerations (2)
• Site Usage
– How much traffic initially and in future?
– Secure access required for some/all of content?
• Control and Accountability
– What level of service/support is acceptable?
– Who gets the blame?
• Technology
– Are specific platforms/technologies required (e.g., Unix
vs. NT, FrontPage Server Extensions)?
12. Server Fundamentals 12
Develop a small webserver
• Use Personal Web Server or other
free/inexpensive webserver software locally.
• Can use nearly any type of computer.
• Typically used only for very small Intranets (10-
50 users) or development purposes.
• Low or no cost.
• Limited number of connections possible.
• Limited capabilities and reliability.
13. Server Fundamentals 13
Using your ISP
• Many ISPs offer space on their webservers (e.g.,
http://www.mother.com/~callen/ )
• Typically access pages via FTP.
• Minimal or no cost.
• Most ISPs provide few capabilities (limited
dynamic content, no FrontPage Extensions, etc.)
• Limited reliability and support – not a primary
business activity for ISPs.
• No domain name gives less professional
impression.
14. Server Fundamentals 14
Using a “free” service
• Other sites offer free web sites
• Typically must include advertisements or
other promotions in your web pages
• Limited disk space
• Example:
– Geocities (www.geocities.com)
• Check out http://www.freewebspace.net/
15. Server Fundamentals 15
Web hosting services – Leasing space
• Many companies specialize in providing equipment and
services to “host” your web site.
• They set up multiple “virtual webservers” on their
webservers.
• Server and maintenance costs spread among many users.
• Most services will handle registering your domain.
• Typical monthly costs (comparison difficult):
– Bare bones $10-20
– FrontPage Extensions, ASP, etc. $25-35
– Small/medium e-commerce site, $35-65
16. Server Fundamentals 16
Web hosting services - Advantages
• Low entry cost
• Service monitors your virtual server: 24 hours,
365 days/yr.
• Most offer multiple links to the Internet backbone.
• Most services claim/offer high uptime (98%+).
• Service manages hardware and server
maintenance.
17. Server Fundamentals 17
Web hosting services – Disadvantages
• Sharing server causes less reliable response times.
• Quality, support, and professionalism vary widely.
• Very competitive -- some go under.
• Very difficult to compare prices.
• Hassles moving from one service to another.
18. Server Fundamentals 18
Web hosting services - Leased servers
• Typically have expensive multiple, redundant
connections to Internet.
• Control of your server through Root or
Administrator access. Typically connect using PC
Anywhere or similar software.
• Services typically offer uninterruptible power
supply and generator back-ups.
• Typical monthly costs:
• $200-1000 depending on machine and features.
19. Server Fundamentals 19
Web hosting services – Shopping hints
• Define everything you must have before
you shop (FP Extensions, ASP, Index
Server, CGI, etc.)
• Use Hosting Service pages to identify good
prospects:
– http://www.hostsearch.com/
– http://www.webhosters.com/
20. Server Fundamentals 20
Web hosting services – Shopping hints
• Compare services/prices carefully.
– You get what you pay for – if it sounds too good to be
true, it is!
– Look for at 20MB of disk space for growth.
– Be careful of bandwidth – look for 1GB monthly
minimum.
– Ask for specific on SSL implementations.
– Domain registration should be free (although InterNIC
will charge you $70 for two years registration)
• Ask for a list of sites they are currently hosting.
– Check periodically for availability/response.
– E-mail webmaster for a quick comment of the service
21. Server Fundamentals 21
STOP AND THINK HARD!
• Before you think about managing your own
webserver, explore all outsourcing options.
• Managing your own webserver is resource
intensive.
• Don’t do it unless you need very high
control/accountability, extreme reliability,
or special technologies.
• Outsourcing is getting better and better…
22. Server Fundamentals 22
What you need for your webserver
• Staff
– Knowledgeable and/or trainable staff in web
management
• Connectivity
– A dependable connection to the Internet.
• Server
– A server box(s) for your webserver software and web
content.
• Webserver software
– Software to handle HTTP requests for resources.
23. Server Fundamentals 23
Staffing
• Training takes time – Expertise takes longer!
– Start small and build up…
• Hiring experts in-house takes time and is difficult.
– Limited pool of experts
• Contractors are costly…
– You will spend much time working with and managing
your contractors.
– If use contractors, try to have contractors train your in-
house staff.
24. Server Fundamentals 24
Connecting to the Internet (1)
• Dial-up or Dedicated Phone Line
– Use an analog modem (up to 56 kbps) via the PSTN
(Public Switched Telephone Network)
– Low-cost, available everywhere, slow, analog/digital
translation introduces problems, long-connection time,
not scalable
• ISDN (Integrated Services Digital Network)
– Connections between 64-128 kbps.
– Pretty good cost/value, pretty good availability (uses
existing lines), continuous connection possible, limited
scalability
25. Server Fundamentals 25
Connecting to the Internet (2)
• DSL/ADSL – Digital Subscriber Lines
• Provides a dedicated digital circuit between a
residence and a telephone company's central office
• A is for asynchronous – different speeds coming in
and going out – not ideal for a busy webserver.
• Current typical speeds of 1.5 MBPS downstream and
384 KBPS upstream (or 384/128 KBPS).
• Must be located within about 17,500 feet of their
central telephone switching office.
• Costs in flux – $35-200/month
• Good value, continuous connection, limited scalability
26. Server Fundamentals 26
Connecting to the Internet (3)
• Digital Data Service (DDS)
– Lease a digital line from a ISP or Telco.
– Requires a dedicated line and some type of unit
(Channel Service Unit/Data Service Unit) for
converting signals & protecting provider’s network
– Available in many forms: fractional T1, T1, T3, etc.
– Most common connections at:
• DS1/T1 – 1.544 mbps
• Fractional DS1/T1 available in 64 kbps increments
• DS3/T3 – 44.736 mbps (typically used by ISPs)
– Typical costs: $1000/month plus ISP costs
27. Server Fundamentals 27
Setting up a Server
• General considerations
– Avoid future problems and costs by purchasing off-the-
shelf, name-brand systems and components.
– Purchase as much machine (“more power!”) as you can
afford.
– Purchase a service agreement.
– Locate server in clean, cool, dry location.
– Make sure the equipment you buy will work with the
operating system.
• For NT, see: http://www.microsoft.com/isapi/hwtest/hcl.idc
28. Server Fundamentals 28
Basic Server Security
• Server “box” should be in a physically secure
location.
• Webservers should be located carefully on LANs.
– Webservers located within a LAN should not be located
on busy network segments.
– Routers can filter inappropriate packets.
– Firewall software/hardware can be used to screen
traffic more carefully.
– Ideally, Internet servers should be outside LAN.
29. Server Fundamentals 29
Server Operating Systems
• Windows NT Server
– GUI orientation
– Lower entry cost…
– Mass market appeal
– Integrated with other Microsoft products
• Unix - Solaris/HP-UX/AIX/SCO/s5r4
– Not cheap
– Well supported
– Additional web server required (most of the time)
• Unix – Linux/FreeBSD
– Cheap
– Support issues
– Includes Apache webserver, most popular in the world
30. Server Fundamentals 30
Server CPU
• Buy as much as you can -- stay behind leading
edge.
• Static content requires considerably less CPU than
dynamic content.
• Consider whether dynamic content can be
presented/converted into static content.
• Partition dynamic content onto separate servers to
increase performance.
• Server with average CPU load of >60% needs
upgrading.
31. Server Fundamentals 31
Server Memory
• The most critical portion of a webserver.
• Don’t skimp. Buy as much as you can afford!
• Commonly used resources (e.g., web pages) are
cached in memory.
• Many webservers run multiple services, each
which require memory.
• Consider your memory upgrade path.
• For Windows NT webservers:
– 128 MB is bare bones
– 256 MB is a good entry point
– Rumor: Windows 2000 happy at 512MB
32. Server Fundamentals 32
Server Hard Disks
• 3-5% chance of failing over a 3 year period.
• SCSI better (but more expensive) than ATA/IDE.
– Typically better throughput.
– Multiple drives can be active simultaneously.
– Supports RAID arrays. (see next slide)
• Better to have multiple disks
– o/s and services on one
– data on additional disks
• Isolate differing parts of a site on different volumes
• Particularly place data on a different “spindle” then you FTP
content or web pages
33. Server Fundamentals 33
RAID Arrays
• RAID (Redundant Array of Independent Disks)
joins several disks together to increase
performance and fault tolerance.
• RAID 1 or 5 is usually the best choice for a Web
server.
• RAID 1 (disk mirroring): data written to redundantly to two
separate hard drives working together.
– Should one drive fail, the others can take over automatically.
• RAID 5 (Striped Volume Sets)
– Even higher reliability across multiple volumes. Can be “hot
swapped”.
34. Server Fundamentals 34
Other Server Features
• CD-ROM
• Use a quality (expensive) network interface
card (NIC), which unburdens CPU.
• Quality SCSI/disk controller card
• Back-up technologies
– Tape
– Optical media
– CDR and CD/RW
35. Server Fundamentals 35
Configuring NT Server as a webserver
• Boot drive should be NTFS for security.
• Swap file should be on a separate physical disk
from the operating system.
• FTP Server should be on its own partition to avoid
filling attacks that fill up drive.
• Optimize o/s for server operation.
• Disable unnecessary services.
• Avoid loading unnecessary network protocols.
• If have multiple web servers, configure them the
same for simpler maintenance.
36. Server Fundamentals 36
Webserver Software
Top placed servers in March 1999
Source: http://www.netcraft.com/survey
Apache 2,409,056 54.89%
Microsoft-IIS 1,030,892 23.49%
Netscape Enterprise 205,645 4.69%
RapidSite 85,076 1.94%
WebSite Pro 78,515 1.79%