42.4.5 PagePool/WebTraf

The class PagePool/WebTraf is a standalone Web traffic modle that utilizes PagePool framework. However, this class has nothing to do with the httpsApp classes. Because we are only interested in using it to study Web traffic pattern here, and do not want to be bothered with the burden of transmitting https headers, etc. It has the following two major data structures. Details can be found in ns/webcache/webtraf.cc and ns/webcache/webtraf.h, the architecture WebTraf model is also loosely described in [10], Section 2.4, paragraph 3-4 and the appendix A.1.

Following is a list of related OTcl methods to the WebTraf class. rX set-num-session number-of-session & set the total number of sessions in the WebTraf pool.
set-num-server number-of-server & set the total number of servers.
set-num-client number-of-client & set the total number clients.
set-interPageOption option & There are two ways to interpret inter-page time: One is the time between the start of two consecutive page downloads by the same user, and the other is the time between the end of previous page download and the start of the following page by the same user. $option can be set to either 0 or 1 (default is 1). When $option is set to 1, the second interpretation is used for "inter-page" time. The first interpratation is adopted when $option is set to 0. Note the resulted traffic volume using the first interpretation is much higher than the second interpretation.
doneObj webpage & all the objects in $webpage have been sent.
set-server id node & set $node as server $id.
set-client id node & set $node as client $id.
recycle tcp sink & Recycle a TCP source/sink pair.
create-session session-index pages-per-sess &
launch-time inter-page-rv page-size-rv &
inter-obj-rv obj-size-rv & Create a Web session. $session-index is the sesson index. $pages-per-sess is the total number of pages per session. $launch-time is session starting time. $inter-page-rv is the random variable that generates page inter-arrival time. $page-size-rv is the random variable that generates number of objects per page. $inter-obj-rv is the random variable that generates object inter-arrival time. $obj-size-rv is the random variable that generates object size.

The example script is available at ns/tcl/ex/web-traffic.tcl (also see ns/tcl/ex/large-scale-web-traffic.tcl for use of a large-scale web traffic simulation)

Tom Henderson 2014-12-17