Purchase Solution

URL hashing to caches

Not what you're looking for?

Ask Custom Question

Suppose an institution has four caches, referred to as cache-0, cache-1, cache-2 and cache-3. Suppose that the URL hashing scheme operates as follows:
(1) only the host name of the URL is used.
(2) all non-alphabetic characters are ignored.
(3) each alphabetic character is assigned a number corresponding to its position in the alphabet.
(4) these numbers are added modulo 4 to get the hash value of the URL.
(5) if the hash value is 0, the request is directed to cache-0; if 1, the request is directed to cache-1; if 2, the request is directed to cache-2; if 3, the request is directed to cache-3.
For example, the URL http://aaa.bbb.com has hash value 1 + 1 + 1 + 2 + 2 + 2 + 3 +15 + 13(modulo 4) = 0; a request for this URL is sent to cache-0.

[a] Determine to which caches requests for each of the following URLs will be directed:
www.ohecampus.com; www.liv.ac.uk; www.eurecom.uk; www.tiet.ac.in; www.w3c.net; www.embanet.com

[b] Suppose the institutional caches are initially empty. During the first morning of operation, the requests from users at the institution include http://www.ohecampus.com/admissions/index.phtml, http://www.ohecampus.com/programmes/msc.phtml, http://www.ohecampus.com/finance/loanscholarship.phtml, http://www.ohecampus.com/about/brochure.phtml. During the afternoon of the same day, there are seven requests to each of these URLs. Which servers (origin and cache servers) will satisfy these 32 requests?

[c] Suppose now on the second day of operation a fifth cache is added, cache-4 and the algorithm in the browsers is changed to calculate the hash value using modulo 5 rather than modulo 4. Suppose now requests are made for the same six URLs listed in Part a of this problem. What will happen?

Purchase this Solution

Solution Summary

Solution shows hash value computation for each URL in [a] and [c], in order to determine the cache to which the request for that URL will be directed.

Solution Preview

[a] Answer to this part is organized in group of three lines (URL, Hash value, Cache used) for each case. "Cache used" is used to mean the same as "Cache to which the request for URL is directed to".

URL = www.ohecampus.com
Hash value = 23+23+23+15+8+5+3+1+13+16+21+19+3+15+13 (modulo 4) = 1
Cache used = cache-1

URL = www.liv.ac.uk
Hash Value = 23+23+23+12+9+22+1+3+21+11 (modulo 4) = 0
Cache used = cache-0

URL = www.eurecom.uk
Hash Value = ...

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Javscript Basics

Quiz on basics of javascript programming language.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.