CDNlink Project
Router-based Request Routing
Client Design

Client design for CDNlink with Router-based Request Routing Method
As opposed to the DNS-based RR methods, we may assume that in a future network it will be possible to utilize routers to provide content-based services. Therefore, we propose a router-based RR to redirect the clients request based on the packet content using a router. However, to this end, routers still do not possess the capability to provide content-based services. Therefore, a Service-oriented Router (SoR) is used in the proposed method.
The followings are the sub-systems of the Client design as depicted in the figure above:
Packet Generator

When the simulation performs, first, a packet request is generated in the Packet Generator module, in the Packet Generator block. An interarrival time is managed in the Inter-arrival function as follow:
----------------------------------------------------------
function y = fcn(lambda,random_num)
y = (-1/lambda)*log(random_num);
----------------------------------------------------------
Where the interarrival time is generated as an M/M/1 queueing priciple, with the calculation of arrival rate (lambda) as follow:
Let the size of packet is 1.5 KB,
(a standard maximum size of an IP packet that can be transmitted over internet)
When we need to transmit packet with rate 10 Mbps,
we need to set the arrival rate as 830 packet/second,
where:
10 Mbps = 10*10^3 Kbps
1 packet is 1.5 KB which equals to 1.5 * 8 = 12 Kb
So, 10 Mbps = [(10*10^3)/12], which approximate to 830 packet/sec
If we need this, then simply set the Arrival Rate Gain as 830.
The inter-arrival time is managed through a port (t) in Packet Generator block.
As the simulation time starts, each of the packets is tagged with a timestamp in the Start Timer block.
Then, in the Set Attribute block, each packet is tagged with some attributes, as follow:

Processing module

Sink

Details about CDNlink design of Router-based RR as follows:
1. Client
2. Service-oriented Router (SoR)
3. DNS Server