## 2 Intelligence Artificial (AI)-Based Resource Allocation Algorithms in Dynamic Traffic Scenario
### Under-Provisioning and Over-Provisioning Costs in Prediction-Based NFV Reconfiguration Algorithms  
We show a simple scenario of one VNFI activated in the NFVI-POP of Figure 1a. Processing resources, represented by black rectangles, are allocated to the VNFI. In a dynamic traffic scenario, the cloud resources have to be reallocated to the VNFI according to the current traffic conditions. We report the cloud resource reconfiguration in Figure 1b in the case of a traffic increase. For handling this increase the cloud resources allocated to the VNFI are increased by applying a vertical scaling technique that leads to increase the processing capacity of an amount represented with a grey rectangle in Figure 1b. Reactive reconfiguration approaches are not suited in NFV environments especially due to the high time needed to reconfigure the cloud resources [15]. For this reason traffic prediction is needed to allocate in advance the cloud resources. Unfortunately the traffic cannot be predicted exactly and the prediction error may lead to resource over/under provisioning with a consequent increase in operational network cost.  
Over provisioning occurs when the predicted traffic is higher than the real one; in this case more cloud resources than needed are allocated; an example of over provisioning is illustrated in Figure 1c where the additional cloud resources are reported with violet rectangles; obviously the allocation of unnecessary resources leads to a cost increase.  
Under provisioning occurs when the predicted traffic is lower than the real one; in this case less resources than needed are allocated as illustrated in Figure 1d where the lack of needed resource is represented with crossed rectangles; the under provisioning leads to QoS degradation due to the traffic amount, which will inevitably be lost because of the lack of resources; that will determine a cost increase for the service provider due to the compensation cost to be paid to the user for the lost traffic.  
The proposed resource allocation procedures are based on two algorithms:  
* A reconfiguration algorithm: it uses the predicted traffic values to reconfigure bandwidth and cloud resource, migrate VNFI, etc.;
* A traffic prediction algorithm: it uses LSTM-based advanced prediction mechanisms to predict the traffic values.  
Briefly we discuss how the NFV architecture proposed by European Telecommunication Standards Institute (ETSI) [21; 22] may be extended to support the proposed resource allocation procedure. The main extensions are the following:  
* The Operation Support System/Business Support System (OSS/BSS) may receive the measured real traffic values from the monitored network devices; then it may perform the prediction algorithm to determine the predicted traffic values;
* The Network Function Virtualization Orchestrator (NFVO) receives the predicted traffic values and by applying the reconfiguration algorithm can decide on reallocating bandwidth and cloud resources and/or migrating VNFIs; Virtual Manager Infrastructures and network controllers are used to actuate the reconfigurations decided by the NFVO.