# ICN-Based Enhanced Content Delivery for CDN
## 4 Problem Formulation  
### Model Description  
The core philosophy of CDN is to move content from the places of origin servers to the places of edge servers, which are much closer to users so that a better QoS (lower access latency and higher transfer rate) is ensured. To this end, the optimization model is QoS-oriented. Meanwhile, a significant traffic engineering goal is to be responsive to sudden traffic surges and have better control over the link load since network links packed with traffic may experience significant degradation in performance. This means our model is subject to bandwidth constraints on each link, which translates our model into a Multi-Commodity Flow (MCF) problem. We formulate a QoS-oriented model subject to bandwidth constraints to mathematically represent our proposed design. The model is considered a directed graph \(G=(V,E)\) with \(|V|\) vertices and \(|E|\) edges. The set \(V=\{v_{1},v_{2},\ldots,v_{n}\}\) and set \(E=\{e_{1},e_{2},\ldots,e_{n}\}\) represent nodes and links in the network, respectively. A node can act as one of the following roles: user, router, CDN edge server, origin server, IG and EG. We assume that there is only one origin server providing all the contents to the whole network, which we denote as \(V_{s}\). IG and EG are chosen from the set of routers \(R=\{r_{1},r_{2},\ldots,r_{n}\}\) with a specific mechanism which will be introduced in Section 5. Let \(U=\{u_{1},u_{2},\ldots,u_{n}\}\) be the set of users and \(N=\{n_{1},n_{2},\ldots,n_{m}\}\) be the set of CDN edge servers. Thus, we have that \(V=U\cup N\cup R\cup V_{s}\). Each router and CDN edge server can potentially cache content and is restricted with finite cache capacity \(C(v)\). For each link \((i,j)\) in the network, it is characterized by its bandwidth capacity \(b_{(i,j)}\) and delay \(d_{(i,j)}\). A large proportion of content cached on CDN edge servers is web files whose sizes range from several bytes to megabytes. In most cases, a content is equivalent to a chunk. And we discuss content/chunks from an object level referring to [49]. To this end, we define the set of content as \(F=\{f_{1},f_{2},\ldots,f_{n}\}\) and \(Size(f_{p})=Size(f_{q}),\forall f_{p},f_{q}\in F\). Derived from MCF model, we define \(K=\{k_{1},k_{2},\ldots,k_{n}\}\), \(k=(s^{k},t^{k},\omega^{k})\) as the set of demands in our model and refer to \(k\) as a content delivery demand, which needs to route a content from source \(s^{k}\) to destination \(t^{k}\) with a demand for transmission rate at \(\omega^{k}\). In our context, \(s^{k}\) is the node where the content is stored, and \(t^{k}\) is the user requesting the content. The content \(f\) demanded by each \(k\) complies with a certain probability distribution, which we denote as \(f=\xi(k)\). In the context of CDN, Zipf distribution is one of the possibilities. For each demand \(k\), we define variable \(z_{(i,j)}\) such that if \(z_{(i,j)}=1\), the route goes through link \((i,j)\) and \(z_{(i,j)}=0\) otherwise. The traffic generated by demand \(k\) on link \((i,j)\) is denoted as \(\gamma^{k}_{(i,j)}\). Moreover, the conversion from an HTTP paradigm to an ICN paradigm in our proposed design can introduce overhead, which we denote as \(a^{k}\). In our proposed design, both routers and CDN edge servers have to make the decision of caching a content according to its caching policy. Let \(X(f,r)\longrightarrow\{0,1\}\) be the Boolean function of caching the content \(f\) at router \(r\), and \(Y(f,n)\longrightarrow\{0,1\}\) be the Boolean function of caching it at edge server \(n\). After a content is cached at a router or edge server, it becomes an available source for content delivery demand \(k\). We denote the content availability at a certain node with binary value \(x\in\{0,1\}\) and \(y\in\{0,1\}\) such that:  
\[x^{k}_{r}= \begin{cases}1,&\text{content demanded by $k$ is available at router $r$}\\ 0,&\text{otherwise}\end{cases}  \tag{1}\]\[y_{n}^{k}= \begin{cases}1,&\text{content demanded by $k$ is available at server $n$}\\ 0,&\text{otherwise}\end{cases}