This homework assignment has six questions; answer all of them. This assignment is due no later than 6:20 p.m. on Tuesday, September 24.
Your homework may turned-in on paper or via rclayton@monmouth.edu
by
email. If you mail your assignment, please submit a printable document
— a PostScript .ps
or PDF .pdf
document, for
example — and not a source document — a
Word .docx
or Latex .tex
document, for example. Make sure you mail a
printable document by the deadline.
Answering this question requires making assumptions, and good answers will describe the assumptions used in the answer.
If the cache hit-rate is high (> 90%), than adding more cache probably won't be cost effective; the improvement will be small (because HTTP requests have a long tail) and the cost will be large (relative to the benefits). If the cache hit rate is low (< 80%) adding more cache may help capture some external Internet traffic not already resident in the cache.
Either a larger single cache or using a cache cluster increases the cache size. If a single cache has a high service time (a queue of waiting requests), distributing the load over a cache cluster will reduce the service time, which may justify the higher cost of a cache cluster over just adding more storage to a single cache.
HTTP request messages are too big. Describe two techniques you would apply to the HTTP protocol to reduce the request message size. A new, smaller HTTP request messages should have the same functions as the original, full-size message (which means you can't throw out features to make the request smaller). Give a rough estimate of the size reduction produced by your techniques.
Message size is measured in eight-bit bytes; don't bother with HTTP reply messages.One possible technique replaces ASCII-based HTTP message headers (and perhaps some portions of the body) with binary message headers. Each header field label would be a one- or two-byte value instead of an arbitrary-length text string. A ten-character header-field label would be replaced by a two-byte (let us suppose) value, for a 80% space savings; longer labels would save more space. No standards-compliant labels have less than three characters, so there always would be some savings.
Binary headers don't change the data. Full message compression would reduce both the message overhead and the data in the message. HTTP currently uses compression, but it's optional if one or the other side doesn't or can't use it. Making compression mandatory would provide consistent benefit, but at possibly great cost to power- or CPU-limited devices. General purpose compression could result on 30 to 60% size reductions depending on data; special-purpose compression could have greater reductions.
REST seems the better choice to replace CGI services.
A CGI program is invoked via a URL: the name of the CGI program and its arguments are encoded as part of the URL. In this way CGI is much like REST, in which the name of the function and function parameter are also encoded in a URL requesting. In contrast, WSDL-SOAP packs away function and parameter information in a SOAP message which is further packed away inside an HTTP request.
If a service involves sizable parameters, such as photos in an upload service, the large parameters can't be encoded in the URL and have to be included as part of the HTTP request. In this sense CGI is like WSDL-SOAP. However, CGI handles large parameters via POST requests, and REST can do the same. Further, REST can use the same encoding used by CGI, while WSDL-SOAP will most likely resort to an XML-based encoding.My colleague has DNS doing too much work going up the server hierarchy. My colleague's DNS sends requests hop-by-hop up the hierarchy to reach root servers. Actual DNS sends the query directly to a root server, skipping over intermediate servers, if the local resolver can't satisfy a query.
From the point of view of caching, DNSC might be better than DNSA because a query can get a cache hit on the way up (that is, sooner) rather than on the way down the hierarchy. On the other hand, queries not satisfied out of a cache would reach an authoritative server faster (with fewer hops) in DNSA, and DNSA servers do not have to maintain parent pointers, which leads to a looser, more resilient hierarchy.
SMTP can send messages directly between sender and receiver because it uses DNS to resolve the receiver's IP address; that is, it relies on the work done by DNS to simplify setting-up sender-receiver communication. DNS, on the other hand, 1) can't rely on a lower-level service to resolve IP address, and 2) has to resolve any Internet address (let's assume), and requires a hierarchy to make such a task scalable.
A protocol uses handshaking to solve problems in exchanging and verifying information between the two end-points in communication. For example, the SSH protocol handshakes over end-point authentication, exchanging public keys (sometimes) and challenge texts to establish identity. More obviously, TCP handshakes during connection set-up to ensure both end-points know of and agree on the sequence numbers used in each direction.