ClientServerArch Flashcards
Server Types
1-DNS server
match domain names to I.P. addresses
2-Proxy server
an intermediary server separating end-users from
websites they browse
3-Mirrored server
hold the same data as another server in order to be a
backup and to reduce traffic
4-Web server
hosts web sites
5-E-mail server
receives and sends email messages
6-List servers
manages mailing lists to groups of e-mail addresses,
distributing e-mails to everyone on the list
Server Definition
- Computer providing services to client requests. It must have the power, speed and storage to be able to handle multiple requests from clients
- A software that delivers data on request
Web Server
Accept HTTP requests from clients (e.g. browsers) and serve them HTTP responses (with optional data in the body, which is typically the requested resource)
When you navigate to a URL:
1-CLIENT: You type a URL in the address bar and hit “enter”
2-Browser sends an HTTP GET request saying
“Please GET me the index.html file at http://cs193x.stanford.edu”
3-Browser C++ code creates an array of bytes that is formatted in using
HTTP request message format
4-Browser asks operating system, “Hey, can you send this HTTP GET request message to http://cs193x.stanford.edu”?
5-Operating system sends a DNS query to look up the IP address of “http://cs193x.stanford.edu”
6-DNS server replies with the IP address, e.g. 171.67.215.200
7-Operating system opens a TCP connection with the computer at
171.67.215.200
8-After the TCP connection is established, the OS can send the HTTP message to 171.67.215.200 through the TCP connection
port
port: In the context of networking, a “logical” (as opposed to a physical) connection place
A number from 0 to 65535 (16-bit unsigned integer)
binding
When you start running a process, the operating system associate a port number with it. This is called binding
A TCP connection requires an ………. and a ……….
A TCP connection requires an IP address and a port number
If no port number is specified, ….. is the default for HTTP requests
80 is the default for HTTP requests
When a server computer receives a message:
1-Operating system opens a TCP connection on port 80 of the computer at
171.67.215.200
2-The server process running on port 80 is responding to requests
3-Now the operating system is receiving TCP packets from the wire, and the operating system begins sending the contents of the request to the server program
4-The server software parses the HTTP request and then decides what message it wants to send in response. It formats this message in HTTP
5-The server sends back a status line, such as “HTTP/1.1 200 OK”, and a message of its own. The body of this message is typically the requested resource, although an error message or other information may also be returned
6-This HTTP response is then sent back to the client’s OS, which notifies the browser of the HTTP response, and then the browser displays the web page