Efﬁcient Placement of Service Function Chains in Cloud Computing Environments

: The widespread adoption of network function virtualization (NFV) leads to providing network services through a chain of virtual network functions (VNFs). This architecture is called service function chain (SFC), which can be hosted on top of commodity servers and switches located at the cloud. Meanwhile, software-deﬁned networking (SDN) can be utilized to manage VNFs to handle trafﬁc ﬂows through SFC. One of the most critical issues that needs to be addressed in NFV is VNF placement that optimizes physical link bandwidth consumption. Moreover, deploying SFCs enables service providers to consider different goals, such as minimizing the overall cost and service response time. In this paper, a novel approach for the VNF placement problem for SFCs, called virtual network functions and their replica placement (VNFRP), is introduced. It tries to achieve load balancing over the core links while considering multiple resource constraints. Hence, the VNF placement problem is ﬁrst formulated as an integer linear programming (ILP) optimization problem, aiming to minimize link bandwidth consumption, energy consumption, and SFC placement cost. Then, a heuristic algorithm is proposed to ﬁnd a near-optimal solution for this optimization problem. Simulation studies are conducted to evaluate the performance of the proposed approach. The simulation results show that VNFRP can signiﬁcantly improve load balancing by 80% when the number of replicas is increased. Additionally, VNFRP provides more than a 54% reduction in network energy consumption. Furthermore, it can efﬁciently reduce the SFC placement cost by more than 67%. Moreover, with the advantages of a fast response time and rapid convergence, VNFRP can be considered as a scalable solution for large networking environments.


Introduction
Network functions are commonly provided through middleboxes that are used in conventional networks. The functions provided by these middleboxes range from firewalls to proxies, and even to intrusion detection systems. These functions are implemented using dedicated hardware appliances that lead to inflexible management and costly capital expenditure (CAPEX) and operating expenditure (OPEX) [1,2].
The emergence of network function virtualization (NFV) [3,4] and software-defined networking (SDN) [5,6] provides the ability to lead to more agile and flexible networks. NFV is a viable networking paradigm for moving traffic processing from dedicated hardware appliances to flexible software applications, known as virtual network functions (VNFs) [7]. Each VNF is placed on commercial off-the-shelf (COTS) servers or on a virtual machine (VM) located in a virtualization environment, such as the cloud. NFV enables network operators to achieve a high degree of flexibility and cost-saving, resulting in simplified and extensible placement and management, the efficient utilization of network functions, and a reduction in power usage. Moreover, VNFs leverage the virtualization technology mainly because the consolidation of resource usage can cause congestion in the physical network. For example, minimizing the number of active servers leads to increasing the additional bandwidth used for all embedded SFC physical links [34]. Meanwhile, less effort has been made to address the network load balancing issue with VNF placement. This paper addresses VNF placement for SFCs using replica concept in softwaredefined cloud computing environments. It introduces a novel approach to the VNF placement problem for SFCs called virtual network functions and their replica placement (VNFRP). It formulates the VNF placement problem as an integer linear programming (ILP) optimization problem. The objective of this ILP problem is to minimize the link bandwidth utilization, energy consumption, and SFC placement cost. The optimization of VNF placement is more challenging mainly because the centralized controller should have a complete picture of the sequence of network service requests and the physical resource constraints. Additionally, the processing of SFC requests takes into consideration not only the individual VNF constraints, but also the chaining order restrictions of the entire flow, along with the required virtual functions. Meanwhile, most of the current VNF placement research considers only a portion of the problem by optimizing either the host or network resources but does not provide a holistic view of computing the solution. Hence, this paper sheds light on placing VNFs for the service chain, which requires the allocation of both server resources and network resources. Server resources are used to host the VNFs, while network resources are used to route the traffic flow from one VNF to the next in the service chain.
The rest of this paper is organized as follows. Section 2 presents the related work, followed by Section 3, which details the system model and problem formulation. Meanwhile, Section 4 explains the heuristic solution of the problem, followed by Section 5, which describes the experimental results. Finally, the paper is concluded in Section 6.

Related Work
Despite NFV being embraced by both industry and academia at unparalleled levels, the development of NFV is still in its infancy with many open challenges. Service providers look at the details of implementing NFV to meet their intended goals. Meanwhile, the accomplishment of some of NFV objectives and whether implementation leads to the anticipated benefits are questionable. Many key challenges still need to be adequately addressed when seeking the efficient placement of virtualized network functions. These challenges include link bandwidth utilization, energy consumption, cost, resource allocation, violations of the service-level agreement (SLA), and the quality of service (QoS). Early research in this direction focuses solely on the optimal placement of VNFs in NFV-enabled hybrid environments [30]. In such environments, dedicated physical hardware and virtual network functions coexist, depending on the demand. The study in [30] addressed the VNF placement problem by formulating it as an ILP model, with the aim of reducing the number of physical nodes used. Given the complexity of ILP, therefore, the performance of this model has been addressed in small service provider scenarios. On the other hand, the studies in [2,35] modeled the VNF placement problem as a generalization of the virtual network embedding (VNE) problem [13]. However, the placement of VNFs for the service chain and VNE placement have different goals and constraints [35].
Several studies formulate the VNF placement problem as an optimization problem with different objective functions. Therefore, a variety of optimal and near-optimal solutions are proposed. For example, a heuristic approach was introduced in [29] for solving the VNF placement problem with an attempt to reduce the OPEX. This approach modeled the problem using two well-known NP-hard problems: the facility location problem and the generalized assignment problem. Then, it introduced rounding-based heuristics to solve the problem and achieve better results with regard to the OPEX. Meanwhile, the study in [36] formulated the VNF placement problem as a binary integer programming problem in packet optical datacenters. The main objective in this study was to minimize the overall conversions. The study proposed an alternative effective heuristic algorithm to solve the problem. However, the model and the algorithm were limited to packet optical datacenters.
Many heuristic and metaheuristic algorithms have been proposed to reduce the computational complexity and NP-hardness of the VNF placement problem. The study in [24] proposed a resource allocation algorithm for VNFs based on genetic algorithms. The introduced placement algorithm outperformed ILP-based resource allocation for a large number of VNFs in service function chains. Furthermore, the proposed placement algorithm not only decreased memory and CPU utilization but also reduced energy consumption in the datacenter. Meanwhile, the study in [37] proposed a metaheuristic solution, with the aim of maximizing physical resource utilization and minimizing the number of active servers that host VNFs in the network. Another algorithm that approximately solved VNF placement problem was presented in [38]. However, it took only one network function into account while ignoring the chaining of service functions.
In fact, the relationship between virtual network functions and service chains is complicated. Some VNFs from different service chains can be shared during deployment, such as anti-virus, while others cannot, such as firewalls [34]. Moreover, some VNFs may modify the traffic between VNFs, such as firewalls, which may drop packets that do not comply with the security policy [39]. Thus, considerable attention has recently been paid to VNF placement and service chaining problems. The study in [35] introduced a mathematical model for VNF chaining and routing. The introduced approach constructed the VNF-FG and then mapped it to the physical resources. It took into consideration the limitation of network resources and the specific requirements of functions. The VNF-FG mapping problem is formulated as a mixed-integer quadratically constrained program (MIQCP). However, it faces scalability issues. Moreover, the approach introduced in [35] placed multiple VNFs in one node. On the other hand, the optimized consolidation policies outlined in some existing studies [34,40,41] are used to manage computing resources in the cloud. However, they ignore the interconnection among VNFs in the service chain inside the cloud datacenters. Additionally, these studies do not meet the performance isolation required in multitenant clouds.
A genetic algorithm for the placement of VNF chains was proposed in [42] to satisfy the SLA and QoS objectives. However, it did not address the issue of the dynamic placement of VNFs to balance the network operational cost and performance. The study in [43] designed and implemented a VNF traffic-aware chaining algorithm within the SDN controller. However, it considered only the unicast-oriented VNF chains, which are simpler than other types of VNF forwarding graphs. The study in [44] introduced an approach that deals with the deployment of SFCs over NFV architecture. This approach focuses deeply on the problem of VNF placement to form optimal SFC across geographically distributed clouds. Additionally, it formulates the problem as an ILP optimization problem to minimize the intercloud traffic and the response time in multicloud environments. Moreover, the total deployment cost and the SLA constraints are taken into consideration.
SDN and NFV are complementary technologies that can be applied together on different types of networks. Hence, there are several recent research efforts addressing the merging of both SDN and NFV. For instance, the studies in [45,46] introduced a control plane framework that enabled packet forwarding across a collection of network function instances. In addition, they provided a communication path for configuration and decisionmaking between each network role and the SDN controller. The SDN-based networking approach was introduced in [47]. In this approach, SDN provides dynamic management of traffic flows. On the other hand, NFV transfers the network entities into the cloud commodity hardware. Hence, this approach can achieve a lower OPEX. The approach in [48] studied VNF orchestration in virtualized SDN environments. However, it considered a limited number of use cases where user movement could be predictable. Therefore, more accurate and mobility-aware VNF migrations are required to improve the performance and reduce the operational cost. Cloud-based NFV research has gradually increased due to the flexible requirements and elasticity of NFV-enabled cloud networks. One of the key frameworks for cloud-based NFV architecture is OpenStack, which was introduced in [49]. However, it does not meet some of the NFV requirements, as mentioned in [50]. The study in [51] presented a VNF deployment algorithm and a VNF migration algorithm in NFV-enabled cloud networks. These algorithms reduced the number of active physical nodes, the rejection rate of VNF requests, and the number of migrations.
Several research efforts to study the VNF placement problem, with the goal of discovering cost-effective placement, have been accomplished. The study in [52] introduced two algorithms to perform VNF placement while considering the budget, resource constraints, and processing capacity limitation of VNF hosting nodes. However, it did not take into account the bandwidth consumption. Meanwhile, the study in [53] considered the dynamic network load in SDN/NFV-enabled networks while tackling the VNF placement problem. It formulated the problem as a binary integer programming (BIP) problem with the goal of reducing the total cost. This cost included the VNF placement cost, VNF infrastructure (VNFI) running cost, and penalty of rejection for service function chain requests. However, it did not specify the network architecture for the server nodes hosting the VNFs. The study in [54] analyzed the cost-effective orchestration of SFCs in the inter-datacenter network. It provided an ILP model and developed a heuristic algorithm that guaranteed the reliability criteria and minimized the cost of service chain orchestration. Moreover, the study in [55] discussed the impact of NFV on the performance and cost of cloud-based networks. However, no general optimization model was considered.
The addressing of the VNF problem with regard to energy consumption has been introduced in several research works. The study in [56] discussed the problem of mapping and scheduling flows across available VNF instances to reduce energy consumption. However, it ignored routing problems, fault probability, and failure recovery. Meanwhile, the study in [57] addressed the problem of VNF placement and traffic steering to minimize energy consumption in NFV-enabled telecom networks. A power consumption model was presented, and the problem was formulated as an ILP model. Finally, a polynomial algorithm based on the Markov approximation approach was proposed to approximately solve the problem. The study in [58] formulated the service deployment problem as an ILP model, with the aim of minimizing the energy consumption of the deployed chains. A rapid and scalable polynomial algorithm was proposed to solve the designed ILP model. However, the proposed algorithm was designed for static traffic scenarios.
Furthermore, a limited number of research efforts addressed the replication of SFC in cloud-based NFV environments. The study in [59] proposed a migration-based reliability method for the service chain to ensure network service continuity via a replication strategy. It introduced a linear programming (LP) model to place VNFs on the physical computing servers. The main objective of the model was to minimize the overall cost of the network service while ensuring the reliability and performance required by the network service. However, this solution led to a longer recovery time. Additionally, the study in [60] modeled the placement of VNFs, with replications in mobile core networks considering multiple VNF instances. It tried to find a trade-off between the minimization of link utilization and CPU resource usage. However, the proposed solution had strict requirements for server computing resources, which reduced the computational efficiency in practical environments.
Most of the research efforts discussed in this section did not address the merging among different VNF placement objectives in cloud computing environments. This paper tries to jointly solve VNF placement for SFCs, considering VNF replicas in softwaredefined cloud computing environments. Hence, the goal of this research is to minimize the link bandwidth utilization, network energy consumption, and SFC placement cost. Additionally, a heuristic algorithm is proposed to place VNFs for the service chain, taking into consideration the load balancing, especially across the core links within the cloud. The proposed heuristic algorithm may place the VNFs of SFC in the same or separate nodes, depending on the minimum link bandwidth utilization and SFC placement cost. Moreover, the proposed solution in this study can be used to achieve dynamic placement and provide a near-optimal solution within seconds.

System Model and Problem Formulation
It is important to pass the traffic of SFC requests through a sequence of VNFs in a specific order. The flexibility of placing VNFs at various network locations can achieve this goal. Moreover, path selection can affect resource consumption on network links. Providing the concept of replicas increases the number of admissible paths. Therefore, how to concatenate VNFs using replicas for each SFC request should be considered to achieve load balancing and reduce network resource bottlenecks, especially over the core links. Thus, the network energy consumption and SFC placement cost can be decreased. Hence, in this section, the system model is presented, in addition to formulating the mathematical representation of the problem.

System Model
The physical network is represented by a directed graph G = (N, L), where N denotes the set of nodes and L denotes the set of links. N is given by the union of four sets of nodes in the network. The first set is N E for the edge switch nodes, which are responsible for forwarding the data from servers to other neighboring nodes. The second set is N D for the distribution switch nodes, which are responsible for data forwarding and serve as intermediate nodes between the edge and core switches. The third set is N C for the core switch nodes, which are responsible for data forwarding among the distribution switch nodes. Finally, the set N S is for the server nodes, which provide virtualized platforms to run VNFs while simultaneously processing the traffic of SFC requests. Each server node n s has the resource capacity in terms of CPU, memory, and storage denoted by R CPU , R RAM , and R Stg , respectively. Meanwhile, each link in the network is characterized by the bandwidth of the link B L .
The set of service chains is represented by S = {s 1 , s 2 , ..., s n }, where n is the number of service chains of VNFs that are provisioned in the physical network. Additionally, the set of VNFs in the service chain s is represented by F = {f 1 , f 2 , ..., f m }, where m is the number of VNFs in the service chain. Each VNF f ∈ F has a resource demand in terms of CPU, memory, storage, and bandwidth, denoted by d f = (d CPU , d RAM , d Stg , d BW ). Moreover, each network service request j is sent to the cloud as SFC s j = {F j , d CPUj , d RAMj , d Stgj , d BWj }, where F j denotes the ordered sequence of VNFs requested in the SFC, with the first VNF in the chain being the source while the last VNF in the chain is the destination. Meanwhile, d CPUj , d RAMj , d Stgj , and d BWj denote the resource demand of VNFs belonging to s j in terms of CPU, memory, storage, and bandwidth, respectively.
The traffic flow of the SFC request j is transferred according to its VNF-FG G j = (N j , L j ). The VNF-FG is a directed graph where the directions of the links should satisfy the order constraint of the VNF request. In a VNF-FG, the parameters f 1j , f 2j ∈ N j denote two VNFs and f 1j f 2j ∈ L j denote the virtual link connecting VNF f 1j and f 2j in G j . If f j ∈ F j is assigned to server node n s ∈ N S , then L j captures the placement constraints of the network functions-specifically, the bandwidth requirement-of the VNF-FG.

Problem Formulation
It is assumed in the context of formulating the problem that the service request has already been submitted to the cloud environment as SFC. Meanwhile, the SDN controller is designed to find the optimal placement of the VNFs with their replicas on the physical infrastructure. Optimal placement of the VNFs and their replicas can provide the optimal locations in cloud networks, which can be responsible for load balancing in the network. Ultimately, this leads to a reduction in network energy consumption. The optimal place-ment of VNFs to satisfy an SFC request can be formulated as an ILP problem with a set of constraints, which can be mathematically expressed as follows: where Equations (1)-(3) represent the constraints of the server nodes for SFC request j. Equation (1) ensures that the total CPU utilization of all VNFs placed on the same server node n s should not exceed its maximum CPU capability. Similarly, Equations (2) and (3) indicate that the total memory utilization and storage requirements of all VNFs consolidated on the same server node n s should not exceed the maximum memory and storage capability of the server. Meanwhile, Equation (4) denotes a Boolean variable, which is equal to 1 when any VNF f j ∈ F j belongs to SFC s j placed on the server node n s ∈ N S ; otherwise, it is 0. Moreover, Equation (5) ensures that each VNF f j of SFC s j can be merely placed on exactly one server node. The constraint in Equation (6) guarantees that the bandwidth of each virtual link f 1j f 2j of the SFC request j (in the path between the two VNFs f 1j and f 2j ) does not exceed the maximum bandwidth of the physical path p: where l 1 l 2 is the physical link of the physical path p connecting the two server nodes n s1 and n s2 . BW p is the maximum bandwidth of the physical path connecting the two server nodes n s1 and n s2 when deploying VNFs on VMs in the cloud environment. Y f 1j f 2j j,l 1 l 2 denotes a Boolean variable, which is equal to 1 when the virtual link f 1j f 2j ∈ L j from f 1j to f 2j uses the physical link l 1 l 2 ; otherwise, it is 0.
The constraint in Equation (7) guarantees that each virtual link between two adjacent VNFs f 1j and f 2j of SFC s j can be mapped on exactly one physical link l 1 l 2 : Equation (8) ensures that the sequence order of the VNFs forming the service chain is preserved in the selected physical path p. This means that the function f mj cannot be allocated in the server node n s if the previous function f (m−1)j is not already assigned to any of the previous server nodes of the same path: where Z n s s j , f mj is a Boolean variable, which is equal to 1 when the VNF f mj from SFC s j is allocated in server node n s ; otherwise, it is 0. R p,s j is a Boolean variable which is equal to 1 if the SFC s j utilizes the physical path p; otherwise, it is 0. To achieve the maximum load balancing that reduces the bandwidth consumption of the network using VNF replicas, an additional constraint is provided as follows: where Rep f mj is a Boolean variable, which is equal to 1 when the VNF f mj from SFC s j can be replicated (otherwise, it is 0), and r a is the number of allowed replicas per service chain. In Equation (9), if the VNF f mj can be replicated, then the allowed number of replicas is constrained by r a . Otherwise, the VNF f mj will be set once in the cloud for each service chain s j . Based on these constraints, an effective model for the multi-objective VNF placement problem is proposed with the goal of minimizing link bandwidth utilization, network energy, and the overall SFC placement cost, as shown in the following equations: where w 1 , w 2 , and w 3 are weighting parameters that represent the relative importance of each objective. They must satisfy Equation (11): The link utilization U l is given by Equation (12): where V l 1 l 2 p is a Boolean variable, which is equal to 1 if the physical link l 1 l 2 belongs to the physical path p; otherwise, it is 0. The costs C S associated with the placement of SFC and the corresponding placement of the VNFs can be computed as follows: where C NW represents the cost of network resources, C n s represents the cost of the server node resources, α, β, and γ represent the types of CPU, memory, and storage in different server nodes, respectively, µ n s is the cost of consuming one unit of the server node resources, and µ l is the cost of consuming one unit of bandwidth via one cloud network link. The relative importance of network bandwidth and active server nodes are captured by ρ and σ. The higher the value of ρ, the more important the network bandwidth in the overall SFC placement cost. The objective function in Equation (10) aims to minimize the utilization of physical links, which will result in a reduced consumption of network bandwidth. Additionally, it reduces network energy consumption and the overall cost of VNF placement.
Using ILP to find the optimal solution of this problem will lead to a scalability problem. Hence, the ILP model is only feasible for small networks. Moreover, due to the NP-hardness of the above problem, it cannot be solved in polynomial time. Hence, a heuristic solution is introduced in the next section to solve this problem. It has the advantage of offering a near-optimal solution for this optimization problem.

Heuristic Solution
In this section, the virtual network functions and their replica placement (VNFRP) algorithm is introduced. It is a heuristic algorithm that practically solves the VNF placement problem and provides a near-optimal solution, as shown in Figure 1. The proposed heuristic algorithm should decrease the computational overhead while providing sufficient quality in computing a near-optimal VNF placement using the replication concept. Additionally, to achieve the required goals, the proposed algorithm should be aware of the properties and capabilities of the VNFs and the physical resources.

Heuristic Solution
In this section, the virtual network functions and their replica placement (VNFRP) algorithm is introduced. It is a heuristic algorithm that practically solves the VNF placement problem and provides a near-optimal solution, as shown in Figure 1. The proposed heuristic algorithm should decrease the computational overhead while providing sufficient quality in computing a near-optimal VNF placement using the replication concept. Additionally, to achieve the required goals, the proposed algorithm should be aware of the properties and capabilities of the VNFs and the physical resources. The proposed algorithm assumes that the service chain requests are delivered dynamically based on customer needs. Each service chain is characterized by an ordered sequence of VNFs to be used in addition to the CPU, memory, storage, and bandwidth requirements for each VNF in the same service chain. The SDN controller periodically discovers the current state of the network where the previous SFCs are deployed, including the corresponding provisioned bandwidth for each VNF in the SFCs. Then, it selects the set of the best admissible routes using Dijkstra's shortest path algorithm [61]. The proposed algorithm is responsible for deploying the VNFs in the incoming SFC request while satisfying their resource requirements. In other words, a VNF service chain is mapped to the VMs hosted on the server nodes in the cloud datacenters. Meanwhile, it preserves the sequence order for the chosen admissible route, where the SDN controller is responsible for routing the traffic according to a predefined sequence in the cloud computing environment.
The proposed algorithm aims to replicate already-deployed SFCs to achieve load balancing and save network bandwidth and energy consumption. This means that the proposed algorithm replicates all VNFs composing the service chain with one replica. This must be performed under the condition that a new replica must be deployed on the route using lower network levels (lower network cost) compared with the unreplicated situation [61]. Then, depending on the predefined order of the VNFs in the SFC, the SDN controller routes the traffic through the original and the new replica. If the proposed algorithm improves load balancing effectively, then the consumed network bandwidth on the links is going to be reduced. The details of the proposed heuristic algorithm are shown in Algorithm 1. As shown in Algorithm 1, the proposed algorithm attempts to deploy the second replica while testing whether the load balancing is improved more than the previous state using only one replica. It adds the number of replicas incrementally until the improvement of load balancing becomes constant or the placement constraints cannot be met. The idea of deploying the original SFC and inserting allowed replicas is to find an iteration number of the available alternative parallel routes suitable for forwarding inter-VNF traffic; hence the decrease of the number of overloaded links and network bandwidth consumption. For all replicated chains, the proposed algorithm attempts to avoid intermediate core switches among the replicated chains as much as possible, mainly to reduce the network energy consumption. The proposed algorithm assumes that the service chain requests are delivered dynamically based on customer needs. Each service chain is characterized by an ordered sequence of VNFs to be used in addition to the CPU, memory, storage, and bandwidth requirements for each VNF in the same service chain. The SDN controller periodically discovers the current state of the network where the previous SFCs are deployed, including the corresponding provisioned bandwidth for each VNF in the SFCs. Then, it selects the set of the best admissible routes using Dijkstra's shortest path algorithm [61]. The proposed algorithm is responsible for deploying the VNFs in the incoming SFC request while satisfying their resource requirements. In other words, a VNF service chain is mapped to the VMs hosted on the server nodes in the cloud datacenters. Meanwhile, it preserves the sequence order for the chosen admissible route, where the SDN controller is responsible for routing the traffic according to a predefined sequence in the cloud computing environment.

Algorithm 1 VNFRP
The proposed algorithm aims to replicate already-deployed SFCs to achieve load balancing and save network bandwidth and energy consumption. This means that the proposed algorithm replicates all VNFs composing the service chain with one replica. This must be performed under the condition that a new replica must be deployed on the route using lower network levels (lower network cost) compared with the unreplicated situation [61]. Then, depending on the predefined order of the VNFs in the SFC, the SDN controller routes the traffic through the original and the new replica. If the proposed algorithm improves load balancing effectively, then the consumed network bandwidth on the links is going to be reduced. The details of the proposed heuristic algorithm are shown in Algorithm 1. As shown in Algorithm 1, the proposed algorithm attempts to deploy the second replica while testing whether the load balancing is improved more than the previous state using only one replica. It adds the number of replicas incrementally until the improvement of load balancing becomes constant or the placement constraints cannot be met. The idea of deploying the original SFC and inserting allowed replicas is to find an iteration number of the available alternative parallel routes suitable for forwarding inter-VNF traffic; hence the decrease of the number of overloaded links and network bandwidth consumption. For all replicated chains, the proposed algorithm attempts to avoid intermediate core switches among the replicated chains as much as possible, mainly to reduce the network energy consumption.

Experimental Results
In this section, the results of the conducted experimental studies for the proposed solution are presented. The CloudSimSDN-NFV simulator [62] was used in these studies. The results collected from the proposed algorithm are compared against the least full first (LFF) strategy [62]. The LFF strategy tries to place the VNF on the least loaded server node, which has the least amount of resources allocated in terms of computing energy and network bandwidth. In this strategy, VNFs are distributed across the server nodes in the cloud environment, where server nodes that host more VNFs have a lower priority than server nodes that host few VNFs or do not host any VNFs. This results in spreading the traffic across the links and switches of all network levels.

Simulation Setup
The proposed VNF placement algorithm was implemented using Java programming language and incorporated with the CloudSimSDN-NFV simulator. The physical network topology used in the simulation was a fat tree topology [63] with 64 server nodes, 104 bidirectional links, and the traffic has been generated with 769 demands, as shown in Figure 2. The bandwidth of each higher link (between the core and the distribution switches) was assumed to be 10 Gbps. Meanwhile, the bandwidth of each lower link (between the edge switches and the server nodes) was set to 1 Gbps. There were 66 service chains created in the system. Each service chain consisted of two VNF endpoints (source and destination) and one intermediate VNF. The SDN controller was primarily responsible for controlling the network resources and VNFs, analyzing the information gathered, and making adaptive solutions and comprehensive management in large-scale complex networks [1,4]. Therefore, it was rational to run the proposed algorithm on the SDN controller to improve the network performance based on the information gathered. Additionally, the implementation of the proposed algorithm on the SDN controller allowed for doing the calculation of the shortest forwarding candidate paths based on the smallest link weight [61] and placing the VNF replicas accordingly. trolling the network resources and VNFs, analyzing the information gathered, and making adaptive solutions and comprehensive management in large-scale complex networks [1,4]. Therefore, it was rational to run the proposed algorithm on the SDN controller to improve the network performance based on the information gathered. Additionally, the implementation of the proposed algorithm on the SDN controller allowed for doing the calculation of the shortest forwarding candidate paths based on the smallest link weight [61] and placing the VNF replicas accordingly. Each server node had its available computing resources, while each physical link had its available bandwidth. Similarly, the required resources for each VNF in the service chain were set, and the required bandwidth of each virtual link in the service chain was set too. Moreover, the sum of the required resources should have never exceeded its maximum available capacity. It was assumed that the physical network contained a variety of service chains, while the required resources and bandwidth of each service chain were different. In order to ensure adequate service chain performance, it became essential to track the computing and network resources to place the VNFs and virtual links on the server nodes and the physical links accordingly.

Performance Evaluation
During the experimental studies, comprehensive simulations were examined through a series of different iterations. The number of replicas was increased by one for each iteration. Then, in each scenario, a set of traffic demands was generated, corresponding to the first iteration. The effectiveness of the proposed algorithm was analyzed in terms of four metrics:

•
Network load balancing and link bandwidth utilization; • Network energy consumption; • Service response time; • SFC placement cost.
At the beginning of the experiments, where there was no replica, VNFs were randomly placed on any physical machine that could host VNFs. After the random placement of VNFs, the algorithm increased the number of replicas until reaching the allowed number of them. Meanwhile, the SDN controller searched for the smallest weight-admissible candidate paths that could traverse the VNFs in a predefined order for each traffic demand. Each server node had its available computing resources, while each physical link had its available bandwidth. Similarly, the required resources for each VNF in the service chain were set, and the required bandwidth of each virtual link in the service chain was set too. Moreover, the sum of the required resources should have never exceeded its maximum available capacity. It was assumed that the physical network contained a variety of service chains, while the required resources and bandwidth of each service chain were different. In order to ensure adequate service chain performance, it became essential to track the computing and network resources to place the VNFs and virtual links on the server nodes and the physical links accordingly.

Performance Evaluation
During the experimental studies, comprehensive simulations were examined through a series of different iterations. The number of replicas was increased by one for each iteration. Then, in each scenario, a set of traffic demands was generated, corresponding to the first iteration. The effectiveness of the proposed algorithm was analyzed in terms of four metrics:

•
Network load balancing and link bandwidth utilization; • Network energy consumption; • Service response time; • SFC placement cost.
At the beginning of the experiments, where there was no replica, VNFs were randomly placed on any physical machine that could host VNFs. After the random placement of VNFs, the algorithm increased the number of replicas until reaching the allowed number of them. Meanwhile, the SDN controller searched for the smallest weight-admissible candidate paths that could traverse the VNFs in a predefined order for each traffic demand.

Network Load Balancing and Link Bandwidth Utilization
Link bandwidth utilization represents the percentage of the utilized link capacity across the physical links. The links are used to host the service chain virtual paths while meeting the required computing resources of VNFs in the service chain. The link bandwidth utilization was decreased while the network load balancing increased when changing the replica from 0 to 7 with traffic consisting of 769 demands. The load balancing ratio is represented by the percentage of the gap between the initial bandwidth utilization in the absence of a replica and the enhancement bandwidth utilization in each iteration when the replica is increased from 0 to 7 with the same constant traffic demands. Figure 3 shows the average link bandwidth utilization of each level when the VNFRP algorithm was adopted and the corresponding values for the LFF strategy [62]. Both algorithms were evaluated using different VNF replicas. Initially, when no replicas were used, the VNFRP algorithm randomly placed VNFs on any physical machine that could host VNFs, which resulted in increased bandwidth utilization across all links. More replicas produced better improvements in minimizing link bandwidth utilization, which gradually resulted in much better load balancing, as shown in Figure 4. It is obvious that the decrease in link bandwidth utilization was induced by the increase in network load balancing. The explanation behind such a phenomenon is that as the number of VNF replicas increases, the number of admissible paths over the lower links is proportionally increased. Thus, the remaining available bandwidth will increase as well, which increases the volume of traffic that can pass. The load balancing ratios for all replicas were computed for both the VNFRP algorithm and the LFF strategy, and they are represented in Figure 5. The load balancing ratio decreased significantly in the VNFRP algorithm and the LFF strategy as the number of replicas increased. Nevertheless, in the VNFRP algorithm, the load balancing ratio decreased uniformly on all levels from 80% to 27%, while in the LFF strategy, it decreased differently on each level from 85% to 22.7%. The reduction in the load balancing ratio proves the fact that the improvement of load balancing was relatively high at the first replica and gradually decreased. Moreover, the maximum reduction in link utilization in the VNFRP algorithm was observed in the lowest network level, while it was observed in the highest network level in the LFF strategy. This observation is attributed to the fact that the VNFRP algorithm has a greater probability to choose server nodes that have fewer remaining resources to host VNFs of SFC when compared with the LFF strategy. Meanwhile, the VNFRP algorithm tried to reduce the link bandwidth utilization; hence, its advantage became more pronounced as the number of replicas increased. meeting the required computing resources of VNFs in the service chain. The link bandwidth utilization was decreased while the network load balancing increased when changing the replica from 0 to 7 with traffic consisting of 769 demands. The load balancing ratio is represented by the percentage of the gap between the initial bandwidth utilization in the absence of a replica and the enhancement bandwidth utilization in each iteration when the replica is increased from 0 to 7 with the same constant traffic demands. Figure 3 shows the average link bandwidth utilization of each level when the VNFRP algorithm was adopted and the corresponding values for the LFF strategy [62]. Both algorithms were evaluated using different VNF replicas. Initially, when no replicas were used, the VNFRP algorithm randomly placed VNFs on any physical machine that could host VNFs, which resulted in increased bandwidth utilization across all links. More replicas produced better improvements in minimizing link bandwidth utilization, which gradually resulted in much better load balancing, as shown in Figure 4. It is obvious that the decrease in link bandwidth utilization was induced by the increase in network load balancing. The explanation behind such a phenomenon is that as the number of VNF replicas increases, the number of admissible paths over the lower links is proportionally increased. Thus, the remaining available bandwidth will increase as well, which increases the volume of traffic that can pass. The load balancing ratios for all replicas were computed for both the VNFRP algorithm and the LFF strategy, and they are represented in Figure 5. The load balancing ratio decreased significantly in the VNFRP algorithm and the LFF strategy as the number of replicas increased. Nevertheless, in the VNFRP algorithm, the load balancing ratio decreased uniformly on all levels from 80% to 27%, while in the LFF strategy, it decreased differently on each level from 85% to 22.7%. The reduction in the load balancing ratio proves the fact that the improvement of load balancing was relatively high at the first replica and gradually decreased. Moreover, the maximum reduction in link utilization in the VNFRP algorithm was observed in the lowest network level, while it was observed in the highest network level in the LFF strategy. This observation is attributed to the fact that the VNFRP algorithm has a greater probability to choose server nodes that have fewer remaining resources to host VNFs of SFC when compared with the LFF strategy. Meanwhile, the VNFRP algorithm tried to reduce the link bandwidth utilization; hence, its advantage became more pronounced as the number of replicas increased.

Network Energy Consumption
The proposed algorithm places SFC and its replicas by utilizing the resources of the nodes that communicate with the smallest possible number of active network nodes (the smallest weight). Moreover, the SDN controller switches off the unused hosts and switches to reduce energy consumption. The network energy consumption was measured by using a built-in monitoring tool for energy consumption included in the CloudSimSDN-NFV simulator. A Java interface was defined to record the energy consumption of each server node and each switch over a specified period of time, based on the linear models represented in [64,65].
The network energy consumption was almost the same for both the VNFRP algorithm and the LFF strategy at the initial placement without replicas, as shown in Figure 6. This was due to the deployment of VNFs across the cloud network in the LFF strategy contributing to the utilization of more physical hosts. Meanwhile, VNFs were spread randomly around the cloud network in the proposed algorithm, resulting in more physical hosts to be used. Additionally, in both placement algorithms, when the network traffic volumes increased, more network energy was consumed. Figure 6 also shows that the network energy consumption of the cloud network could be saved when the replica was applied to both placement algorithms. The increased number of VNF replicas increased the number of admissible paths that had the smallest possible number of active network nodes, which were used to connect the VNFs on different server nodes. Meanwhile, Figure  6 shows that the improvement of the network energy consumption was higher in the VNFRP algorithm compared with the LFF strategy. The VNFRP algorithm was clearly focused on optimizing link utilization more than server node utilization. Hence, the VNFRP algorithm could reduce the network energy consumption by more than 54% when the number of replicas was increased from 0 to 7. Meanwhile, it decreased the energy consumption by 6% on average compared with the LFF strategy. Moreover, the difference between VNFRP and LFF in network energy consumption became higher as the number of replicas increased. As depicted in Figure 6, the gap in network energy consumption between VNFRP and LFF increased remarkably from about 152 Wh to 612 Wh when the number of replicas was increased.

Network Energy Consumption
The proposed algorithm places SFC and its replicas by utilizing the resources of the nodes that communicate with the smallest possible number of active network nodes (the smallest weight). Moreover, the SDN controller switches off the unused hosts and switches to reduce energy consumption. The network energy consumption was measured by using a built-in monitoring tool for energy consumption included in the CloudSimSDN-NFV simulator. A Java interface was defined to record the energy consumption of each server node and each switch over a specified period of time, based on the linear models represented in [64,65].
The network energy consumption was almost the same for both the VNFRP algorithm and the LFF strategy at the initial placement without replicas, as shown in Figure 6. This was due to the deployment of VNFs across the cloud network in the LFF strategy contributing to the utilization of more physical hosts. Meanwhile, VNFs were spread randomly around the cloud network in the proposed algorithm, resulting in more physical hosts to be used. Additionally, in both placement algorithms, when the network traffic volumes increased, more network energy was consumed. Figure 6 also shows that the network energy consumption of the cloud network could be saved when the replica was applied to both placement algorithms. The increased number of VNF replicas increased the number of admissible paths that had the smallest possible number of active network nodes, which were used to connect the VNFs on different server nodes. Meanwhile, Figure 6 shows that the improvement of the network energy consumption was higher in the VNFRP algorithm compared with the LFF strategy. The VNFRP algorithm was clearly focused on optimizing link utilization more than server node utilization. Hence, the VNFRP algorithm could reduce the network energy consumption by more than 54% when the number of replicas was increased from 0 to 7. Meanwhile, it decreased the energy consumption by 6% on average compared with the LFF strategy. Moreover, the difference between VNFRP and LFF in network energy consumption became higher as the number of replicas increased. As depicted in Figure 6, the gap in network energy consumption between VNFRP and LFF increased remarkably from about 152 Wh to 612 Wh when the number of replicas was increased.

Service Response Time
The service response time was measured as the average end-to-end delay of all re quests submitted to the cloud network. It included the processing time of the applicatio server nodes and network delays along the SFCs. The service response time was corre lated with the number of replicas and requests. To demonstrate the effectiveness of th VNFRP algorithm, the number of replicas was increased while the number of request was fixed. As shown in Figure 7, when the number of replicas increased, the service re sponse time decreased, which resulted in a rapid convergence of the VNFRP algorithm and the LFF strategy. Additionally, Figure 7 shows that the service response time of th LFF strategy was slightly longer than the corresponding one in the VNFRP algorithm, bu it was still acceptable. Moreover, the observed difference was not significant between th LFF strategy and the VNFRP algorithm in each replica except for the initial placemen where the replica was not applied. The service response time could be reduced in th VNFRP algorithm by more than 16% in the best case and by more than 4% in the wors case, compared with the LFF strategy, as shown in Figure 7. This occurred because VNF were deployed over server nodes connected to the lower network levels. Therefore, it led to routing the traffic among the VNFs of the SFC through these small weight shortes paths, which resulted in a corresponding reduction in end-to-end delay. Additionally when the number of replicas was more than 4, the service response time of both VNFRP and LFF was nearly constant. With the advantages of the fast response time and rapid convergence, the VNFRP algorithm had an effective impact on practical networks tha had thousands of nodes and VNFs. Therefore, the VNFRP algorithm could be applied t NFV-enabled environments with heterogeneous nodes and workloads.

Service Response Time
The service response time was measured as the average end-to-end delay of all requests submitted to the cloud network. It included the processing time of the application server nodes and network delays along the SFCs. The service response time was correlated with the number of replicas and requests. To demonstrate the effectiveness of the VNFRP algorithm, the number of replicas was increased while the number of requests was fixed. As shown in Figure 7, when the number of replicas increased, the service response time decreased, which resulted in a rapid convergence of the VNFRP algorithm and the LFF strategy. Additionally, Figure 7 shows that the service response time of the LFF strategy was slightly longer than the corresponding one in the VNFRP algorithm, but it was still acceptable. Moreover, the observed difference was not significant between the LFF strategy and the VNFRP algorithm in each replica except for the initial placement, where the replica was not applied. The service response time could be reduced in the VNFRP algorithm by more than 16% in the best case and by more than 4% in the worst case, compared with the LFF strategy, as shown in Figure 7. This occurred because VNFs were deployed over server nodes connected to the lower network levels. Therefore, it led to routing the traffic among the VNFs of the SFC through these small weight shortest paths, which resulted in a corresponding reduction in end-to-end delay. Additionally, when the number of replicas was more than 4, the service response time of both VNFRP and LFF was nearly constant. With the advantages of the fast response time and rapid convergence, the VNFRP algorithm had an effective impact on practical networks that had thousands of nodes and VNFs. Therefore, the VNFRP algorithm could be applied to NFV-enabled environments with heterogeneous nodes and workloads. Electronics 2021, 10, x FOR PEER REVIEW 18 of 23

SFC Placement Cost
All VNFs of each SFC and its replicas occupied one node or a set of nodes that were connected through the smallest weight. Hence, they could utilize a lot of active nodes with an increased number of replicas, as shown in Figure 8. Meanwhile, Figure 9 shows the overall SFC placement cost, as defined in Equation (13). As shown in this figure, it was affected by applying the replica concept. The parameters and were adjusted to 10 and 0.1, respectively, to capture the relative importance of the cost of network resources and the cost of server node resources. When was higher than , the cost of network resources became more relevant than the cost of server node resources. It is clear that the LFF strategy provided a higher SFC placement cost compared with the VNFRP algorithm. Furthermore, the difference in SFC placement cost between the VNFRP algorithm and the LFF strategy increased when the number of replicas was increased. As shown in Figure 9, the VNFRP algorithm reduced the SFC placement cost by more than 67%, while the LFF strategy reduced the SFC placement cost by no more than 36% when the number of replicas increased from 0 to 7. Meanwhile, the average SFC placement cost gap between the VNFRP algorithm and the LFF strategy increased from 14% to 57%. As shown in Figure  8, the increase in the number of active server nodes was relatively the same in both VNFRP and LFF. Therefore, the cost of network resources only affected the SFC placement cost. As a result, the VNFRP algorithm could be implemented to allocate sophisticated SFCs consisting of multiple VNFs more efficiently than the LFF strategy. Moreover, the results in Figure 9 demonstrate that when the number of replicas increased, the SFC placement cost decreased. Additionally, more flexibility and efficiency were guaranteed in the VNFRP algorithm than the LFF strategy in terms of SFC placement and network bandwidth utilization. This is attributed to the fact that shorter paths could be used to direct VNF traffic in the VNFRP algorithm. Figure 9 shows that it is efficient and significant in the context of VNF and SFC placement problems to jointly and dynamically control the network and the server node resources.

SFC Placement Cost
All VNFs of each SFC and its replicas occupied one node or a set of nodes that were connected through the smallest weight. Hence, they could utilize a lot of active nodes with an increased number of replicas, as shown in Figure 8. Meanwhile, Figure 9 shows the overall SFC placement cost, as defined in Equation (13). As shown in this figure, it was affected by applying the replica concept. The parameters ρ and σ were adjusted to 10 and 0.1, respectively, to capture the relative importance of the cost of network resources and the cost of server node resources. When ρ was higher than σ, the cost of network resources became more relevant than the cost of server node resources. It is clear that the LFF strategy provided a higher SFC placement cost compared with the VNFRP algorithm. Furthermore, the difference in SFC placement cost between the VNFRP algorithm and the LFF strategy increased when the number of replicas was increased. As shown in Figure  9, the VNFRP algorithm reduced the SFC placement cost by more than 67%, while the LFF strategy reduced the SFC placement cost by no more than 36% when the number of replicas increased from 0 to 7. Meanwhile, the average SFC placement cost gap between the VNFRP algorithm and the LFF strategy increased from 14% to 57%. As shown in Figure 8, the increase in the number of active server nodes was relatively the same in both VNFRP and LFF. Therefore, the cost of network resources only affected the SFC placement cost. As a result, the VNFRP algorithm could be implemented to allocate sophisticated SFCs consisting of multiple VNFs more efficiently than the LFF strategy. Moreover, the results in Figure 9 demonstrate that when the number of replicas increased, the SFC placement cost decreased. Additionally, more flexibility and efficiency were guaranteed in the VNFRP algorithm than the LFF strategy in terms of SFC placement and network bandwidth utilization. This is attributed to the fact that shorter paths could be used to direct VNF traffic in the VNFRP algorithm. Figure 9 shows that it is efficient and significant in the context of VNF and SFC placement problems to jointly and dynamically control the network and the server node resources.

Conclusions
This paper studied the problem of VNF placement for SFCs using an effective replica technique in software-defined cloud computing environments. The problem was first formulated using an ILP model with the objective to reduce the link bandwidth utilization, energy consumption, and SFC placement cost. Then, a heuristic algorithm, named VNFRP, was designed to find a near-optimal solution for this problem. The VNFRP algorithm exploits the SDN controller knowledge about the smallest weight-admissible candidate paths to traverse the traffic of VNFs in a predefined order for each SFC and its replicas. The experimental results revealed the effectiveness of the VNFRP algorithm. It

Conclusions
This paper studied the problem of VNF placement for SFCs using an effective replica technique in software-defined cloud computing environments. The problem was first formulated using an ILP model with the objective to reduce the link bandwidth utilization, energy consumption, and SFC placement cost. Then, a heuristic algorithm, named VNFRP, was designed to find a near-optimal solution for this problem. The VNFRP algorithm exploits the SDN controller knowledge about the smallest weight-admissible candidate paths to traverse the traffic of VNFs in a predefined order for each SFC and its replicas. The experimental results revealed the effectiveness of the VNFRP algorithm. It

Conclusions
This paper studied the problem of VNF placement for SFCs using an effective replica technique in software-defined cloud computing environments. The problem was first formulated using an ILP model with the objective to reduce the link bandwidth utilization, energy consumption, and SFC placement cost. Then, a heuristic algorithm, named VNFRP, was designed to find a near-optimal solution for this problem. The VNFRP algorithm exploits the SDN controller knowledge about the smallest weight-admissible candidate paths to traverse the traffic of VNFs in a predefined order for each SFC and its replicas. The experimental results revealed the effectiveness of the VNFRP algorithm. It could achieve an improvement in load balancing by 80% when replicas were increased. Moreover, the VNFRP algorithm provided better network performance in terms of network energy consumption. Additionally, it could efficiently reduce the VNF placement cost. Furthermore, its service response time could be kept sufficiently low, which makes it applicable for large networking environments. While these findings are encouraging, this work can be seen as a significant move toward SFC placement, mainly because it deals with the volatility of network traffic among VNFs in cloud computing environments and their requirements. This is accomplished using an efficient replica strategy that provides a new methodology for load balancing.
Exploring the performance of the VNFRP algorithm across different network architectures can be considered as one of the main future perspectives. Moreover, tuning the parameters of the VNFRP algorithm for complex traffic models that have more variability and uncertainty could be another potential area of interest.