Font Size: a A A

The Cdn System, Content Routing

Posted on:2009-08-04Degree:MasterType:Thesis
Country:ChinaCandidate:T GuiFull Text:PDF
GTID:2208360245461450Subject:Computer system architecture
Abstract/Summary:PDF Full Text Request
CDN is short for Content Delivery Network,namely content delivery network.By increasing a new layer of network architecture over existing internet network,CDN publishes website's content to the"edges"which are closest to users,users can get what they want from nearby,so internet network congestion can be solved ,and the speed of visiting website can also be gathered.Based on the subject -"Development of supporting system of IPv6 Stream distribution application system"which supported by"research of the IPv6 based next generation internet key technology and industrialization promotion"of Beijing Municipal Science and Technology Commission, with the advantage of the other content delivery network modes, this thesis puts forward a new content route system,and introduces the design and implementation details of a Content Router,Content Router is a subsystem used for content locating and publishing.Users can search content ,locate resources,and publish content through Content Router. Content Router manages the content and deletes the out of date content. Conter Router is also in charge of their own domain's ESP and is interactive with DHT(distribut hash table service ). Content Router is developed under Linux using modularization idea, and is a single-threaded framework and is optimized for the high network I/O, using epoll from Linux 2.6 kernel. The operations of the database are generally blocked,and mysql doesn't provide non-blocking interfaces. In order to better carry out the operations of the database,we use thread pool(similar to the disk asynchronous I/O),thread pool is composed of many(the number can be configured)working threads in advance.These working threads are waiting in a request queue,when some new requests join the queue,working threads retrieve the requests from the request queue,and implement the corresponding operations according to the type of requests,after that,they write the task's address into a pipe,this pipe is listened by epoll,epoll_wait will return the descriptor of the pipe,the main thread can read out the task's address from the pipe,then,the main thread will call the task's state machine and do the corresponding operations.As a number of threads share the same request queue,we should lock the queue when we put the requests into the queue. we try a method called pthread_mutex_try lock, in order that it is non-blocking.When we find that the request queue has been locked,we put the request into another spare queue.The spare queue is not locked,because only the main thread visits it.when we put a request into the queue and find that the queue is not locked,we lock it first and put the new request and the requests in the spare queue into the request queue.The result of the test indicates that the Content Router system can search content in local database or DHT,locate resources,publish content,and delete the out of date content.So,Content Router system is a pritical system for the small and middle organizations.
Keywords/Search Tags:Content Delivery Network, Content Router, Edge Service Provider, Tracker, Distributed Hash Table
PDF Full Text Request
Related items