# Load-Balanced Dynamic SFC Migration Based on Resource Demand Prediction
## 1 Introduction  
In traditional networks, deploying or updating the physical network requires specialized hardware to provide new services. This leads to high purchasing and maintenance costs. Additionally, the system cannot be easily customized or adjusted based on demand. Therefore, Network Function Virtualization (NFV) was developed. NFV aims to implement the functions of traditional network devices through software. It decouples network functions from dedicated hardware and runs them as software on general-purpose servers or in virtualized environments. This approach can significantly reduce operators' costs and improve the flexibility and resilience of network service deployment. Network operators can use Service Function Chains (SFCs) to provide customized network services to users. SFC connects Virtualized Network Functions (VNFs). It not only supports the fine-grained and elastic delivery of services in the network but also allows for the modification of service functions and the migration of loads. In NFV, operators use Service Function Chains to provide customized network services [1]. Network efficiency is closely related to the mapping of Virtualized Network Functions and the routing of SFCs. At the same time, as network slicing operates, the traffic arrival of each specific service fluctuates over time. This can lead to a mismatch between SFC resource demand and server resource availability, which negatively affects the quality of service (QoS) and resource utilization [2]. When a VNF layout and resource allocation strategy cannot meet the current network demands, the NFV Orchestrator (NFVO) reconfigures the SFC. This reconfiguration includes vertical scaling, horizontal scaling, anddynamic migration. Horizontal scaling makes full use of fragmented resources, but it is only possible when there are enough available resources on the server. Dynamic migration is a flexible solution during overload conditions, but it also incurs overhead. Due to the dynamic changes in traffic, edge computing networks often experience overloaded nodes. This leads to increased computation delays and sometimes service interruptions. To maintain normal SFC services, SFC migration must be performed. Additionally, network load balancing should be ensured. Network load balancing allows the network system to adapt more easily to dynamic changes in traffic [3]. By introducing load balancing for time-varying network traffic, the network becomes more robust after VNF migration and promotes long-term resource optimization. Based on the above background, we focus on the problem of SFC dynamic migration for network load balancing in edge computing environments where resources are scarce and highly dynamic. We use machine learning algorithms to predict VNF resource demands, which helps us anticipate changes in network node resource allocation. With the prediction results, we proactively determine the appropriate time for migration and identify the VNFs to migrate from overloaded nodes. We also use deep reinforcement learning algorithms to better understand complex environments and select target nodes for migration. This approach ensures network load balancing, reduces the number of future migrations, and minimizes the impact of unnecessary migrations. In view of the above problems, the main contributions of this paper are as follows:  
1. Considering the real SFC request scenario, we use a time-varying traffic dataset. We apply a CNN-AT-LSTM model to predict the short-term resource demands of VNFs. Using these predictions, we can proactively migrate VNFs in advance within a certain time frame. 2. Considering that dynamic changes in traffic may lead to frequent VNF migration and uneven use of network resources, we introduce a load-balancing model to maintain network stability. 3. In response to the multi-dimensionality and complexity of the VNF migration remapping problem caused by the dynamic network environment, we propose a DRL algorithm based on Proximal Policy Optimization (PPO) to enhance the effectiveness of VNF migration decisions.