Future Internet Chapter 5: Network Function Virtualization 5b: Foundations & Algorithms Holger Karl Computer Networks Group Universität Paderborn
Goals of this session • Previous session has dealt with motivating examples and architectural fundamentals • Open: • Which VNF instances to run where? • How many instances per VNF are needed? • How to interconnect them? • This session: What are the relevant algorithmic problems to solve? • The questions, rather than the solutions – no time to go into details of any algorithms • Which problems are hard? SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 2
What to decide in NFV? • Given: • Topology, annotated with capacities • VNF chain to deploy (one or several) • Client distribution • Geographical or topological • Decide: • For each VNF in each chain: • How many instances to run? • Where to execute these instances? • How much capacity to assign each instance? • For each chain: • How to route requests to entry points of the chain? • How to route flows between VNFs? SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 3
Algorithmic sub-problems • Facility location • Routing • Splittable vs. unsplittable flows • Single vs. multi-commodity flows • Network embedding • Fixed networks • Malleable networks: Template embedding SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 4
Simplify the problem • Difficulties: Multiple VNFs, interaction of flows, limited capacities • Simplifications • Only look at a single VNF, required by many users • Idea: Ignore interaction between flows and facilities • On edges: latency does not increase for multiple flows, data rate infinite • Facilities have infinite capacity • Costs • Each facility incurs cost • Latency towards facility • More generally, path costs • Look for Pareto optimal points? • Or relate facility and path costs to each other? SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 5
Excursion: Pareto optimality • Suppose a problem has two relevant figures of merit • Two metrics • Solutions might differ in the degree by which they satisfy either metric • But not possible to trade one metric against the other, relate into a common, single metric (e.g., “cost”) • Then: notion of “dominating solution” • Or: Pareto-optimal solutions traffic casualties • Set of these: Pareto front x x Avg. # of x x x x x x x x x x Average travel time SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 6
Overview • Facility location • Routing • Splittable vs. unsplittable flows • Single vs. multi-commodity flows • Network embedding • Fixed networks • Malleable networks: Template embedding • Testbeds SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 7
Facility location • Goal: Reduce Round Trip Time • Solution idea: Serve user requests nearby Where to place? SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 8
Facility location: Formally • Suppose we can weigh facility and path costs • Goal: minimize a weighted sum of these costs • Given: • Graph G=(V,E) • Set of possible facility locations F ½ V • For each possible location v 2 F, a facility cost f(v) • Incurred when opening a facility at that location • Demand d(v), 8 v 2 V • Path costs: 8 v 1 , v 2 2 V: c(v 1 , v 2 ) • Incurred if demand from location v 1 is processed by a facility at v 2 • Usually assumed to be symmetric: c(v 1 , v 2 ) = c(v 2 , v 1 ) SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 9
Facility location: Solution • Find • a subset F' ½ F of used facilities • an assignment of demand to facility: x v,u = 1 if and only if facility at v serves the demand from u • all demand from one location goes to exactly one facility • Minimize: • SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 10
Facility location: Main properties • NP hard! L • In general: Only approximable in O(log |V|) L • Better news: If costs are well-behaved, approximation within 1.861 • Well behaved: obey triangle inequality • I.e., detours never save money: c(u, w) <= c(u, v) + c(v,w) • Bad news: The Internet does obey triangle inequality • Violations are quite common on BGP graph • E.g., https://www.cs.umd.edu/~lume/files/pam09.pdf , http://ieeexplore.ieee.org/document/5207998/, SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 11
Facility location: Greedy algorithm • Write the problem as an Integer Programming (IP) problem • Solve the relaxed linear version • Use this as an initial solution, improve it using a greedy algorithm • Repeat: • For all unopened facility, compute the resulting cost when adding it to the solution • Pick the one with best improvement and add it Guha and Kuller, Greedy strikes back: Improved Facility Location Algorithms SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 12
Capacitated facility location • So far: a facility could serve arbitrary demand • Not realistic! • Better: Assume a facility has a maximum capacity for the demand it can handle Verter, Uncapacitated and Capacitated Facility Location Problems • Next: A local heuristic for capacitated facility location problem Keller et al., A local heuristic for latency-optimized distributed cloud deployment SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 13
Where to place? – The Model Capacity 1: #Server Capacity 2: #User Server Costs Assignment + Opening Facility Location Problem SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 14
Literatur Opt. Problem: Uncapacitated Capacitated Global: GreedyFL No known approximation (1.861-Approx.) Local: Keller 2013 SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 15
GreedyFL in a Nutshell • Every client: Budget • Used to pay for 1. Connection cost 2. Facility opening cost • Increases every round • Client connects if • Budget ≥ Connection cost • Facility is open • Facility opens if • Sum of clients’ contribution ≥ facility opening cost • Client’s contribution = max (0, budget – distance) SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 16
GreedyFL L – Sketch Local Algorithm • Local participants: Clients, facilities • Coordination messages: Clients ask facilities • Communication limit: Derived from budget • Discrete time model: Clocked rounds SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 17
GreedyFL L – Sketch SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 18
GreedyFL L – Sketch SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 19
GreedyFL L – Sketch SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 20
GreedyFL L – Sketch SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 21
GreedyFL L – Sketch SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 22
GreedyFL LC – Sketch Capacity Limit SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 23
GreedyFL LC – Sketch Longer runtime, worse RTT SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 24
Extensions to facility location • Multi-commodity: Different “products” have to be handled by the facilities • Hierarchical: Introduce “backend” facilities that only serve other facilities, ... • E.g., Hub location problem from airlines SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 25
Overview • Facility location • Routing • Splittable vs. unsplittable flows • Single vs. multi-commodity flows • Network embedding • Fixed networks • Malleable networks: Template embedding • Testbeds SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 26
Routing vs. flow problems • Typical routing problem: in a graph, find paths that minimize some cost metric • Cost of a path usually a function of the costs of constituting edges (e.g., sum, max, ...) • Often: Costs are independent on what traffic flows along the edges • Typical flow problem: Move stream of data along a network from a source to a sink • Where the data stream consumes capacity of the edges • Typically allowed to go along multiple paths in parallel SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 27
Basic single flow problem • Given • A directed Graph with edge capacities c(u,v) ¸ 0 for each edge (u,v) • A source s and a sink t for a flow • Solution: a flow f • f: V x V ! Real numbers • Constraints of a flow • Capacity constraint: f(u,v) <= c(u,m) • Skew symmetry: f(u,v) = - f(v,u) • Flow conversation: å f(u,w) = 0 for all u, except source and sink • Skew symmetry eases notation here! • Implies: å ( u , v ) 2 E f(u,v) = å ( v , w ) 2 E f(v,w) for all v except source or sink • Source produces flow, sink consumes it • Main point: flow may be split over multiple paths SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 28
Single flow problem: Example • Source: Wikipedia, http://en.wikipedia.org/wiki/Flow_network SS 19, v1.1 FI: Ch 5b - NFV Foundations & Algorithms 29
Recommend
More recommend