Web Servers
Examples
Web Servers
Web Servers are a part of the internet architecture.
Web Server = server hardware + server software
Server Hardware Computer connecter to the internet / any network
Server Software program that accepts HTTP requests over a specific port and responds
Client Server
-
Client (Browser or other Servers / Devices)
https://www.google.at
→ Domain Name System DNS →172.217.23.227
→ HTTP Request for Web Resource
-
Multiple Layers and Proxies (see traceroute)
Caching, filtering, load balancing... by routers, modems,...
-
Server
HTTP Response with web resource or error
Can be a collection of servers, sharing the load
Static vs. Dynamic Resources
Web page = hypertext document
parts of displayed text are links to other pages of the Web (nodes in hypertext)
Web Server System output is treated as the complete HTTP response (including headers).
- Static Resources
Sent through the filesystem
assigned only once during the loading of the page
Static assets from file system mapped to URL path
They cannot react to other part of the request (like query parameter)
MIME-Type is usually inferred (file endings) - But headers contain data about the data types.
Common static files in web servers
- HTML, CSS
- JavaScript (for use in browser)
- Media (Images, Video, Audio, etc.)
- Dynamic Resources
Executing programs inserver side language
Can react to complete HTTP request (including header information)
- Path and Query Parameters
- HTTP Method (GET, POST, PUT, …)
- Content Negotiation (Accept: application/json) …
Links to other websites (hyperlinks)
does not actually lookup the resource until asked for the value
Hardware
Can be your own computer (
localhost
,127.0.0.1
)
Contemporary web servers:
- Part of large data centres
- Latency based on location → often geographically distributed (e.g., using DNS)
- Virtual servers: 1 Physical servers can host many virtualized web servers
Software
Program running on a server
- Maps path of URL to static asset on the file server
- dynamically rendered resources
- usually has some functionality for caching and session handling
Geo DNS
"geo-location based Serving" = Serving resources from geographically closer data centres
Possible through Domain Name System DNS.
They determine and return IP addresses based on location.
-
(local) LDNS
The lookup table provided by the internet service provider ISP.
Accessed first, if not found, then request sent to global DNS.
- (global) DNS
Virtual Servers and Containers
One physical server can host multiple virtual servers and containers
-
Virtual Machines VMs
Virtual (isolated) instances of different OS run
"Hypervisor" technology divides physical resources
-
Containers
Not virtualized
"cgroups" → process isolation but shared through same the Host OS kernel
Not as secure as VMs
Cloud
Sets up computational resources over API.
-
Infrastructure as a service (IaaS)
→ less restriction, lower abstraction
retrieving new virtual server capacity can be scripted
ie. AWS EC2, Google Compute Engine, ...
-
Platform as a Service (PaaS)
Application runtimes
Built on top of IaaS but infrastructre is abstracted away, configurable
ie. Heroku, CloudFoundry, App Engine, ...
-
Software as a Service (SaaS)
→ more restriction, higher abstraction
The software itself is running on the cloud
Clients usually continuously pay a fee to get access to the software
ie. Office365, ...