# Load-Balanced Dynamic SFC Migration Based on Resource Demand Prediction
## 3 System Model and Problem Description
### SFC and VNF
The relationship between the inflow bandwidth of an NF \(v_{j,\
u}^{nf}\in V_{j}^{NF}\) and the required bandwidth of the logical link connected to it is  
\[bw_{j,uv}^{nf}(t)=bw_{j,ku}^{nf}(t)\sum_{f\in F}t_{j,\
u}^{f}\;\text{ratio}^{ f}\;\forall t\in T \tag{8}\]  
where \(v_{k}^{nf},v_{u}^{nf},v_{v}^{nf}\in V_{i}^{NF}\) are a set of ordered NFs, and ratio\({}^{f}\) is the bandwidth scaling factor for VNF of type \(f\in F\). To describe the migration process, here we define variables related to server status and VNF migration. When \(\xi_{j,u}^{t}\in\{0,1\}\) equals \(1\), it indicates that the virtual node \(v_{j,u}^{nf}\) needs to perform migration in the \(t\) period. We define a set of variables related to resource prediction. Resource data can be CPU, disk, memory, or other system resource usage, such as the number of processes, OS load, etc. For simplicity, this paper considers predicting CPU and memory data. \(c_{j,u}^{nf}(t+n)(n=1,2,\ldots)\) represents the CPU resource demand of \(v_{j,u}^{nf}\) in the \(t+n\) period obtained through prediction; \(m_{j,u}^{nf}(t+n)(n=1,2,\ldots)\) represents the memory resource demand of \(v_{j,u}^{nf}\) in the \(t+n\) period obtained through prediction. \(thr_{over}\) represents the overload threshold of the underlying server. The above variables satisfy the following constraint conditions: each virtual network function of the service function chain should be deployed on a physical node, which is unique, and can be represented as follows:  
\[\sum_{v_{i}^{s}\in V^{s}}\eta_{j,u}^{i,t}=1\;\forall sf\;c^{j}\in S,\;\forall v _{j,u}^{nf}\in V_{j}^{NF},\;\forall t\in T \tag{9}\]  
Each virtual link needs to be mapped onto a physical link. Since the virtual link may span nodes,  
\[\sum_{c_{jpq}^{n}\in E^{s}}\tau_{j,uv}^{pq,t}\geq 1\;\forall sf\;c^{j}\in S,\; \forall e_{j,uv}^{nf}\in E_{j}^{NF},\;\forall t\in T \tag{10}\]The constraints on CPU and memory resources of the underlying network nodes are respectively satisfied:  
\[\sum_{f\in F}\beta_{f}^{i,t}c^{f}+\sum_{sf^{c}\in S}\sum_{y_{j,u}^{nf}\in V_{j}^{ NF}}\eta_{j,u}^{i,t}c_{j,u}^{nf}(t)\leq C_{i}^{S}\;\forall v_{i}^{s}\in V^{S},\; \forall t \tag{11}\]  
\[\sum_{f\in F}\beta_{f}^{i,t}m^{f}+\sum_{sf^{c}\in S}\sum_{y_{j,u}^{nf}\in V_{j} ^{NF}}\eta_{j,u}^{i,t}m_{j,u}^{nf}(t)\leq M_{i}^{S}\;\forall v_{i}^{s}\in V^{S}, \;\forall t\in T \tag{12}\]  
The underlying link bandwidth constraint is satisfied:  
\[\sum_{sf^{c}\in S}\sum_{e_{j,u}^{nf}\in E_{j}^{NF}}\tau_{j,uv}^{pq,t}bw_{j,uv}^ {nf}(t)\leq BW_{pq}^{S}\;\forall e_{pq}^{s}\in E^{S},\;\forall t\in T \tag{13}\]  
The service function chain delay limit is satisfied:  
\[\sum_{e_{j,u}^{nf}\in E_{j}^{NF}}\sum_{e_{pq}^{pq}\in E^{\rm{T}}}\tau_{j,uv}^{ pq,t}L_{pq}^{\rm{S}}\leq l_{j}\;\forall sfc^{j}\in S,\;\forall t\in T \tag{14}\]  
Every pair of connected VNFs \(\left(v_{j,u}^{nf},v_{j,v}^{nf}\right)\) satisfies traffic conservation. Given a logical link \(e_{j,uv}^{nf}\in E_{j}^{NF}\) and underlying nodes \(\forall v_{i}^{s}\in V^{S}\),  
\[\sum_{v_{i}^{q}\in\Omega^{+}\left(v_{p}^{s}\right)}\tau_{j,uv}^{qp,t}-\sum_{v_ {i}^{q}\in\Omega^{-}\left(v_{p}^{s}\right)}\tau_{j,uv}^{pq,t}=\left\{ \begin{array} []{ll}\eta_{j,v}^{p,t}-\eta_{j,u}^{p,t},&\forall v_{j,u}^{nf},v_{j,v}^{nf}\in V _{j}^{NF}\\ 1,\;\forall v_{j,v}^{nf}\in\left\{v_{j,out}^{s}\right\},&v_{j,out}^{s}=v_{p}^{ s},v_{j,u}^{nf}\in V_{j}^{NF}\\ -1,\;\forall v_{j,v}^{nf}\in\left\{v_{j,in}^{s}\right\},&v_{j,in}^{s}=v_{p}^{ s},v_{j,u}^{nf}\in V_{j}^{NF}\\ 0,&\text{otherwise}\end{array} \right. \tag{15}\]  
where \(\Omega^{+}\left(v_{p}^{s}\right)\) and \(\Omega^{-}\left(v_{p}^{s}\right)\) represent the upstream and downstream node sets of _vps_, respectively. The migration of the virtual node \(v_{j,u}^{nf}\in V_{j}^{NF}\) is represented by the following constraint condition.