SIMULATION AND COMPARISON OF
HASHING TECHNIQUES IN CDN DNS
SUSHIL KUMAR BHARDWAJ*
Department of Computer Science, RIMT-Regional Institute of Mgmt. & Technology, Mandi Gobindgarh, Punjab, India
JAGJIT SINGH MALHOTRA
Department of Electronics and Communication Engineering, DAV Institute of Engineering and Technology, Jalandhar, Punjab, India
Abstract:
Content Delivery Networks (CDNs) offer fast and reliable delivery of content to end user. It involves replication of content from the origin server to CDN surrogate severs, scattered over the globe. At present, Domain Name Server (DNS) based request routing is widely deployed in Internet. DNS server resolves IP address from the routing table or hash table. CDN DNS Resolution Strategy use hashing algorithms to provide a fast address lookup process and the choice of hashing technique is essential to improve the performance of CDN significantly. This paper explores the performance analysis of URL based hashing techniques viz. Modulo Hashing, Consistent Hashing and Highest Random Weight on the basis of Round Trip Time (RTT), Throughput and Packet Loss in simulating environment using NS-2.
Keywords: Content Delivery Network, DNS, Hashing Techniques, Performance Metrics.
1. Introduction
CDN [Verma (2002), Pallis and Vakali (2006), Vakali and Pallis (2003), Peng (2003)] is a network of computers across the Internet, that cooperate to deliver content to end users, with the purpose of improving performance, scalability, and cost efficiency. In a more general sense, CDNs are overlay networks across the wide-area Internet which consists of dedicated collections of servers, called surrogates, distributed strategically throughout the Internet for the purpose of facilitating content delivery [Molina et. al. (2004)]. CDNs are aiming at reducing response time experienced by users through locating multiple servers in the edge of the network [Moreno et. al. (2006)].
CDN provide fast and reliable services by replicating content and distributing it to edge servers located near to end users. Replicating the same content or services over several mirrored Web servers strategically placed at various locations is a method commonly used by service providers to improve performance and scalability [Pathan and Buyya (2007)]. The commercial CDN Providers such as Akamai, Digital Island and AppStream perform content caching to thousands of cache server globally. They redirect the content request of client to the nearest CDN server to enable faster access by the client, thus improving Web site response time. In order to improve performance of client access to requested content, CDNs push the replica of content from original server to CDNs surrogate server scattered worldwide. The analysis of present day CDNs reveals that, at the minimum, a CDN focuses on the following business goals: scalability, security, reliability, responsiveness and performance [Akamai (2004)]. In CDN, Request-Routing techniques are used as medium to extend the reach and scale of required content requested by client. The DNS name resolution is the first step that is accomplished, when a client begins a request for a given content. In the Domain Name Server (DNS) based request routing, if client wants to request for content from a surrogate server which is located apart, the client will establish a TCP connection with nearest DNS server for resolving the URL to IP address [Manikandan et. al. (2005a)].
1.1.Hashing
1.1.1. Modulo Hashing
With modulo hashing, the hash function is simply h(k) = k mod n for some n (typically the number of servers). In this approach, the URL is hashed to a number modulo the number of server’s i.e. k % n. Fig. 1. Shows Map requests to Surrogate server as follows:
Fig. 1. Modulo Hashing
1.1.2. Consistent Hashing
With Consistent hashing [Karger et. al. (1999), Karger et. al. (1997)], the selection of each replica is done by hashing the URL. In this approach URL and IP address of replica servers hashed in long circular list. URL is hashed to a point on the unit circle and replicas are evenly spaced starting from the original point [Wang et. al.
(2002a)]. The URL is assigned to closest server in list. A map request to Surrogate server with consistent hashing is shown in Fig. 2.
Fig. 2. Consistent Hashing
1.1.3. Highest Random Weight
This approach consists of generating a list of hash values by hashing the URL and each server’s name by random weights, and sorting the results [Wang et. al. (2002b)]. HRW is a similar method to modulo hashing with non-fixed sized regions. Each URL then has a deterministic order to access the set of servers, and this list is traversed to find appropriate server. A map request to Surrogate server is shown in Fig. 3.
2. The CDN DNS Request Routing Strategy
A request-routing technique is responsible to select appropriate surrogate server for required content requested by client. Therefore the main issues in designing Content Distribution Network are Request routing. According to request processing, request routing techniques are classified as: DNS based request routing [Bartolini et. al.
(2004), Manikandan et. al. (2005b)], Global Server Load Balancing (GSLB) [Hofmann and Beaumont (2005)], HTTP redirection, anycasting, URL rewriting [Douglis and Kaashoek (2001)] and CDN peering [Buyya et. al.
(2006)]. We have followed DNS based request routing model proposed by Kath et al (2010), reduce one cycle of request routing by forwarding client request directly to CDN server instead of sending back resolved IP address to the client. Fig 4 provides a request routing network setup implemented in simulation. The interaction flows are:
[1] Client’s request is directed to CDN DNS;
[2] CDN DNS maintains hash table to resolve the client requests. When CDN DNS receives a client’s request, it performs a lookup from its hash table using a hashing technique by considering source address. After selecting appropriate surrogate server, CDN DNS passes client request directly to selected surrogate server of CDN;
[3] Selected surrogate server serves the client’s request.
Fig. 4. CDN DNS request routing technique.
Comparing the hashing techniques in CDN environment, we have simulated network model as shown in Fig. 4. by implementing modulo hashing in DNS server followed by Consistent hashing and HRW hashing technique under the same simulation environment respectively.
2.1.Simulation
To compare Hashing techniques in CDN, it is best to use identical simulation environments for their performance evaluation. Thus, we have used ns-allinone-2.34, supports simulation for routing protocols for computer networks. The network simulator ns-2 is discrete event simulation tool, capable to simulate events such as sending, receiving, forwarding and dropping packets. Although various platforms support ns-2.34, we select a Linux platform [FEDORA 7]. Using simulation with ns-2.34, we run the OTCL script. Simulation generates an output trace file and, experimental results are analyzed using the awk command. XGRAPH demonstrate graphically visualization of performance metrics.
2.2. Implementation
In our implementation of comparing Hashing techniques using NS2, we have formed three new Agents. The functions of these Agents are as follows.
CDN_CLIENT
1. Send a request to CDN_DNS.
2. Receive the requested content from CDN_SERVER. CDN_DNS
1. Receive request from CDN_CLIENT.
2. To resolve the CDN_CLIENT request, perform a lookup from its hash table using a hashing technique by considering source address and content type.
3. On resolving CDN_CLIENT request, CDN_NS passes request directly to CDN_SERVER. CDN_SERVER
1. Receive request from CDN_DNS.
2.3. Assumptions
We assume that number of servers is static. Each client request equipped with static IP address. Routing table or hashing table at DNS stores source address, flag, content type and destination address. DNS redirect the client request to CDN server directly.
2.4.Simulation of Network Model
In order to compare hashing techniques, we create a simulation scenario as shown in Fig 5. In this simulation, there are five CDN_SERVER storing different content at different locations, one CDN_CLIENT and one CDN_DNS storing hash table that store source address, content type and destination address. In Fig. 5, we can see one green CDN_CLIENT node (1), one yellow CDN_DNS node (0) and four red CDN_SERVER nodes (2, 3, 4, 5, 6). There is duplex links between CDN_CLIENT node and CDN_DNS node of bandwidth 3Mbps and delay 10ms; b/w CDN_DNS node and CDN_SERVER nodes of bandwidth 6Mbps and delay 10ms; and b/w CDN_SERVER node and CDN_CLIENT node of bandwidth 3Mbps and 10ms.
Fig. 5. NAM Simulation Scenario
3. Results and Analysis
Using NS2 network environment and TCL/TK script, we performed three tests. We apply the simulation of same network model as shown in Fig. 5. in order to compare three different hashing techniques. In first test, Request at CDN DNS is resolved using modulo hashing followed by second test using Consistent Hashing and third test using HRW Hashing. We use NAM files to get the trace of simulations and XGRAPH to create graphs for performance metrics- throughput, RTT and packet loss.
3.1.Throughput
Fig. 6 illustrates the throughput comparison of hashing techniques in CDN DNS network. In CDN DNS network, the green curve shows throughput using modulo hashing, red curve shows throughput using Consistent hashing and blue curve shows throughput using HRW hashing. The throughput is high in modulo hashing based CDN DNS network; Therefore modulo hashing is better than HRW and Consistent hashing in terms of throughput.
3.2.Packet Loss
Fig. 7. illustrates the Packet loss comparison of hashing techniques in CDN DNS network. In CDN DNS network, blue curve shows packet loss using HRW hashing, red curve shows packet loss during Consistent hashing and the green curve shows packet loss during modulo hashing. The Packet loss is lower in modulo hashing; Therefore modulo hashing is better than Consistent and HRW hashing in terms of packet loss.
Fig. 7. Packet Loss Comparison
3.3.Response Trip Time
Fig. 8 illustrates the RTT comparison of hashing techniques in CDN DNS network. In CDN DNS network, red curve shows RTT during Consistent hashing, the green curve shows RTT during modulo hashing and blue curve shows RTT using HRW hashing. The RTT is lower in HRW; Therefore HRW is better than Consistent and modulo hashing in terms of RTT.
Fig. 8. RTT Comparison
4. Conclusion
The simulation results bring out comparison analysis of hashing techniques viz. Modulo Hashing, Consistent Hashing and Highest Random Weight. Comparison was based on Round Trip Time (RTT), Throughput and Packet Loss. Our comparison scenarios have illustrated that resolving the client’s request at CDN DNS using modulo hashing performs better than HRW and consistent hashing in terms of Throughput and Packet loss. But if Packet Loss is a concern, then HRW is preferred over Modulo Hashing and Consistent Hashing.
References
[1] Akamai Technologies Inc. (2004): Akamai-The Business Internet - A Predictable Platform for Profitable E-Business. [2] Akamai, [online]. Available : http://www.akamai.com
[3] Appstream, [online]. Available : http://www.appstream.com
[4] Bartolini, N.; Casalicchio, E.; Tucci, S. (2004): A Walk Through Content Delivery Networks, In Proceedings of MASCOTS 2003, LNCS Vol. 2965/2004, pp. 1-25.
[6] Digital Island, [online]. Available : http://www.sandpiper.net
[7] Douglis, F.; Kaashoek, M. F. (2001): Scalable Internet Services, IEEE Internet Computing, vol. 5, No. 4, pp. 36- 37.
[8] Hofmann, M.; Beaumont, L. R. (2005): Content Networking: Architecture, Protocols, and Practice, Morgan Kaufmann Publishers, San Francisco, CA, USA, pp. 129-134.
[9] Karger, D. R.; Lehman, E.; Leighton, F. T.; Panigrahy, R.; Levine, M. S.; Lewin, D. (1997): Consistent hashing and random trees: Distributed caching protocols for relieving hot spots on the World Wide Web, In ACM Symposium on Theory of Computing, pp. 654– 663.
[10] Karger, D.; Sherman, A.; Berkheimer, A.; Bogstad, B.; Dhanidina, R.; Iwamoto, K.; Kim, B.; Matkins, L.; Yerushalmi, Y. (1999) : Web caching with consistent hashing, In Proceedings of the Eighth International World-Wide Web Conference.
[11] Kath, S.; Kumar, M.; Sharma, A. (2010) : CDN DNS - An Efficient DNS Request Routing Technique, International Journal of Advances in computational Science and Technology, vol. 3, pp. 147-154.
[12] Manikandan, S.; Chitra, A.; Venketesh. P. (2005) : A Framework For Minimizing Latency in CDN using Url Request Routing Approach , Academic open Internet Journal, vol. 16, [Online]. Available: http://www.acadjournal.com/2005/v16/part6/p2/framework_ CDN.pdf.
[13] Molina, B.; Palau, C. E.; Esteve, M. (2004): Modeling content delivery networks and their performance, Elsevier Science’s Journal of Computer Communications, vol.27, pp. 1401-1411.
[14] Moreno, B. M.; Salvador, C.E.P.; Domingo, M. E.; Pen, I. A.; Extremera, V. R. (2006) : On content delivery network implementation, Elsevier Science’s Journal of Computer Communications, vol. 29, pp. 2396–2412.
[15] Pallis, G.; Vakali, A. (2006) : Insight and Perspectives for Content Delivery Networks, Communications of the ACM, Vol. 49, No. 1, ACM Press, NY, USA, pp. 101-106.
[16] Pathan, M.; Buyya, R. K. (2007): A Taxonomy and Survey of Content Delivery Networks, Technical Report, GRIDS-TR-2007-4, Grid Computing and Distributed Systems Laboratory, University of Melbourne, Australia.
[17] Peng, G. (2003): CDN: Content Distribution Network, Technical Report TR-125, Experimental Computer Systems Lab, Dept. of Computer Science, State University of New York, [Online]. Available: http://citeseer.ist.psu.edu/peng03cdn.html.
[18] Vakali, A.; Pallis, G. (2003): Content Delivery Networks: Status and Trends, IEEE Internet Computing, IEEE Computer Society, pp. 68-74.
[19] Verma, D. (2002): Content Distribution Networks, engineering approach, John Wiley, New York.