• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/24

Click to flip

24 Cards in this Set

  • Front
  • Back
URL
Uniform Resource Locator:
An informal method of identifying a specific location. Used in http, mail, etc. No longer used in technical specifications
URN
Uniform Resource Name:
A persistant method of identifying that doesn't depend on location but instead on resource and organization.
URI
Uniform Resource Identifier:
A generic method of identifying resources
HTTP Request
request line: method, URI, version
header lines: additional meta data, method parameters
Optional request body
HTTP Response
request line: version, status, phrase
header lines: additional meta data, method parameters Optional response body
What are the steps a web server must take in processing an HTTP request?
Read and parse message
Translate URI to file
Determine if request is authorized
Generate and transmit response
Log request and any errors
Why would it be important for a web server to limit (a) the number of requests a client can
make using a persistent connection and (b) the maximum idle time for a persistent connection?
(A) To prevent server overloading
(B) To prevent the queue from filling with clients doing nothing.
1st Web Proxy
Web Cache:
Saves pages and content based on different criteria like access frequency and popularity
2nd Web Proxy
Anonymizing Requests:
Hides IP address of client
Onion routing: multiple layers of connections encrypted at each step
3rd Web Proxy
Filter Content:
Examine URL against blacklist
Examine content against list of banned keywords
Web caching benefits:
The user
Faster load times, lower latency, lower congestion
Web caching benefits:
Web Server
Reduces server load, lower cost because of less bandwidth required. However, sometimes things shouldn't be cached.
Web caching benefits:
ISP
Reduces user load times, also reduces congestion, greater profit for the same price
Web caching benefits:
The internet
Reduces congestion and traffic
What are two di erent ways a web cache can determine if content on the origin server has
changed?
Check time modified and ETag which is an md5 hash
What is a Content Delivery Network?
Web caches at many locations across the country.
How does a CDN work?
It allows the users to be served content much closer to where they are located reducing delay and loss. Amazon
Explain the concept of a resource pool and how this helps when building a scalable and main-
tainable web server.
An application that allocates and caches resources. It can help by restricting the critical functions to small, well-tested parts of the code. You can cache files and recent responses reducing load times when accessing them later.
Explain how a thread pool architecture works.
You have a pool of worker threads and one listening thread. New connections are placed into a queue where they wait to be woken up by a worker thread. Must have synchronization between threads.
What are thread pools advantages relative to spawning a
new thread for every request?
Spawning and destroying a thread takes time. An excessive number of threads takes memory and context-switching takes time and resources
What are the advantages of using threads instead of a pool of
processes?
Threads are more effecient, quicker to switch and quicker to create and destroy.
Explain how event-driven socket polling works.
Only one socket is created. You call epoll_wait to wait for any clients or requests. When you return from epoll wait you process all waiting calls. You don't have to worry about thread syncing because only one process can be inside at a time. Sleeps until event ready
How can event be more efficient than using a
thread pool?
It only fires when an actual event is ready to be processed, so the system doesn't consume resources if there are no events. And it only needs to process the events that actually have been called.
Why would you use a hybrid server architecture, with a small number of threads that each use
event-driven polling for a set of sockets?
If you were going to have a printer that needed to have multiple clients connected to it. Anytime where you need to have processes that could run at the same time and you don't want to tie up resources with only one path.