• No results found

3.5 Algorithms for Delay-Aware NFV-enabled Unicasting Problem

3.5.1 Optimal algorithm without the end-to-end delay constraint

The basic idea behind the proposed algorithm is that the routing walk in G for a request ρk must pass through l VMs on the walk with each VM corresponding to a network function inSCk in its specified order. The VM for a specific network function may already exist in a data center, or can be dynamically created in that data center or the other data centers. Thus, any data center (or a subset of data centers if there are restrictions on the use of other data centers) can be a candidate data center for the implementation of that network function.

To this end, we first construct an auxiliary directed acyclic graph

Hk = (Nk,Ak;cv(k),ce(k)) for each request ρk, as detailed in the previous section, where costs cv(k,j) and ce(k,j) are the usage costs of implementing SCk,j at node

v ∈ Vj and an edge hu,vi ∈ (Vi×Vi+1)∩Ak, which have been defined in Eqs. (3.1) and (3.3), respectively.

We then find a shortest path P0 in Hk from node sk to node tk. If P0 exists, a routing walk PinGfromsk totk can then be derived, by expanding each edge in the shortest path inHkto the set of edges in the corresponding shortest path ofG. Notice that the derived walk P in G may not be a simple path, because a node and/or an

54 Routing Cost and Throughput Optimization of Requests in the Remote Cloud

edge inG can appear multiple times in P. Thus, for each incoming request ρk, it is either admitted or rejected, depending on the resource availabilities. If it is admitted, a routing walkPinGwith the minimum operational cost will be delivered.

The detailed algorithm for NFV-enabled unicasting problem without the end-to- end constraint is given inAlgorithm3.1.

Algorithm 3.1Finding a minimum-cost routing path for an NFV-enabled requestρk

Input: An SDN G = (V,E) with a set VS of data centers and installed VMs im-

plementing network functions, a request ρk = (sk,tk;SCk,bk) with source node

sk, destination node tk, bandwidth resource demand bk and the service chain

SCk = hSCk,1,SCk,2. . . ,SCk,li.

Output: Admit or reject request ρk. If it is admitted, find a minimum cost routing

walk inGfor it, in which some existing VMs will be utilized while the VMs for other network functions inSCk can be created at data centers on the walk. 1: Denote byG= (V,E)the resulting graph after the removal of links with residual

bandwidth less than`·bkfromG, assign each link inGa cost of using the amount

bk of bandwidth, where`=|SCk|;

2: Compute all pairs shortest paths inG(V,E);

3: Construct the auxiliary directed acyclic graph Hk = (Nk,Ak;cv(k),ce(k))and as- sign a weight to each of its nodes and edges by Eqs.(3.1) and (3.3);

4: Find a shortest pathP0 in Hk fromsk totk in terms of the weighted sum of edges and nodes in the path;

5: IfP0 exists, a routing walk (or a pseudo-routing path)PinGforρk is derived by replacing each edge in P0 with its corresponding shortest path in G; otherwise, reject requestρk.

The rest is to show the correctness and analyze the time complexity of the pro- posed algorithm,Algorithm3.1. We start with the following lemma.

Lemma 3.1 Given an SDN G = (V,E), a set VS of data centers, an NFV-enabled request

ρkcan be admitted by the system if the destination node tk is reachable in Hkfrom the source

node sk.

We show the claim by contradiction. Following the construction of Hk, Hk is a layered directed acyclic graph, node sk is at layer zero, each nodev ∈ V1 is at layer one, and nodetk at layer`+1 if |SCk|=`.

Let v ∈ Vj be a reachable node in Hk from sk and the layer number j is the maximum value. Clearly, 1 ≤ j ≤ l. Otherwise, there is a directed edge in Hk from

v to tk, andtk is reachable fromsk. As there is no directed edge in Hk starting from

v ∈ Vj, this implies that there is insufficient bandwidth resource in any path in G fromvto tk, and the requestρk will be rejected.

Lemma 3.2 Given an SDN G= (V,E)and an NFV-enabled requestρk with the bandwidth

demand bk, and a service chain SC with|SCk|= `, to ensure that there is a feasible solution

byAlgorithm3.1, for any admitted request ρk, the amount of available bandwidth at each

link in G when implementingρkis no less than`·bk.

The amount of available bandwidth l·bk at each link for the admission of ρk is the most conservative estimation. To show this claim, we consider an extreme case where the SDN consists of nodesv1, v2, . . . ,vn, and there is an edge betweenvi and

vi+1 with 1≤i<n. We assume that v1 =sk andvn= tk, and only two nodesvi and

vi+1 in the SDN are attached with data centers. We further assume thatvi contains the VMs of network functionsSCk,1,SCk,3,SCk,5, . . . ,SCk,`−1 while nodevi+1contains the VMs for network functionsSCk,2,SCk,4,SCk,6, . . . ,SCk,`of the service chainSCk of requestρk, andlis even. We assume that the cost of creating a new VM or migrating an existing VM between vi and vi+1 is much higher than the cost of forwarding a packet to the data centers. In order to implement the service chain SCk of ρk, the routing walk for request ρk must traverse link (vi,vi+1)at least `/2 times with each direction, and each traversal on the link consumes the amountbkof bandwidth. Thus, the amount of bandwidth consumed for implementingSCkin link(vi,vi+1)is at least

`·bk if the link is undirected. The lemma thus follows.

Theorem 3.1 Given an SDN G = (V,E)with a set VSof data centers (VS ⊆ V), there is

an algorithm,Algorithm3.1, for the NFV-enabled unicasting problem, which takes O(|V|3)

time and delivers an optimal solution for the problem.

Following Lemma 3.1, ifsk is reachable inHkfromsk, then requestρk is admissi- ble.

We first show the solution obtained by Algorithm3.1 is feasible. Let Ps0k,tk be a shortest path in Hk from sk to tk. It can be seen that there is a corresponding routing walk in Gfrom sk to tk that passes through the data centers implementing network

56 Routing Cost and Throughput Optimization of Requests in the Remote Cloud

functionSk,jin service chainSCk in order due to the fact thatHkis a layered directed acyclic graph, 1≤ j≤ l. SincePsk0,tk is the shortest path, the cost of realizingρk is the minimum one.

We then analyze the time complexity ofAlgorithm3.1. The construction ofHk = (Nk,Ak)takesO|V|3)time, as|Nk|= ∑`i=1|Vi|+2 ≤ |V|2 and|Ak|= O(∑`i=1(|Vi| ×

|Vi+1|)) = O(|V|3). The edge and node assignments in Hk can be implemented through computing all pairs of shortest paths in Gthat takeO(|V|3)time. Since H

k is a directed acyclic graph, it takes a linear time to find a shortest path in it [22]. Thus, finding a shortest pathPs0

k,tk in Hkfromsk totk takesO(|Nk|+|Ak|) =O(|V|

2) time. The routing walk for requestρk inGthen can be derived fromPsk0,tk inO(|V|+

|SCk|) =O(|V|)time. Algorithm3.1 thus takesO(|V|3)time.