 Move all the NFs of pa to pb if resources allow and continue on 4a, otherwise end the algorithm. constraint or by simply having the operator manually assign VNFs for the chain in question. According to the problem statement above, we formulate the prob- lem of NF placement as integer linear programming (ILP). Since the ILP formulation has only binary variables, it becomes binary integer programming (BIP). In this formulation, we assume integrity of NF, that is, an NF cannot be split into more than one pod. However, the BIP-based solution does not scale with the size of the input (e.g., C, M, and N); therefore, we design a heuristic algorithm for computation efficiency, shown in Algorithm 2. Similar to BIP, Algo- rithm 2 takes CPU as the most limiting resource and may conduct 5 SDN and NFV in 5G additional checks to ensure no violation of other resource constraints. Due to the space limitation, we do not include this part in Algorithm 2. The high-level idea of Algorithm 1 is, VNF placement for chain C fol- lows a "best-fit" strategy, that is, for each NF chain c, the required NFs are first sorted by their resource demand in a descending order. Next, each time the algorithm selects an unplaced NF of chain C with the highest resource demand, and places it to the pod in PodListc with the least (but sufficient) CPU resources. PodListc is initialized as an empty list for NF chain c, and records all the pods used by C. If PodListc is empty, or no such pod can be found in PodListc, the algorithm selects the pod with the most resources from the entire pod list PodList, add it to PodListc, and repeat VNF placement in Step 3. In this study, we assume sufficient pods to avoid NF blocking. A variant of the problem can be minimizing the block ratio of NF placement, given a limited number of pods. In Step 3, as pod usage is optimized per NF chain basis, this does not automatically lead to minimization of overall pod number. Therefore, we introduce Step 4, which conducts an additional optimization to consolidate pods for all NF