Modify NGVS doc
[openretriever.git] / docs / development / ngvsrequirements / ngvs-requirements-document.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International
2 .. License.http://creativecommons.org/licenses/by/4.0
3 .. (c) Xuan Jia (China Mobile)
4
5 ==========================================================================
6 OpenRetriever Next Gen VIM & Edge Computing Scheduler Requirements Document
7 ===========================================================================
8
9 Created by the OPNFV OpenRetriever Team
10
11 | Amar Kapadia
12 | Wassim Haddad
13 | Heikki Mahkonen
14 | Srinivasa Addepalli
15
16
17 | v1.0 5/3/17
18 | v1.1 5/16/17
19 | v1.2 7/26/17
20
21 Motivation
22 ----------
23
24 The OpenRetriever team believes that existing and new NFV workloads can
25 benefit from a new VIM placement and scheduling component. We further
26 believe that these same requirements will be very useful for edge
27 computing scheduling. This document aims to document requirements for
28 this effort.
29
30 By placement and scheduling, we mean:
31
32 -  Choose which hardware node to run the VNF on factors such as AAA, ML prediction or MANO
33
34 -  Start the VNF(s) depending on a trigger e.g. receiving requests such as DHCP,DNS or upon data packet or NULL trigger
35
36 We use the generic term “scheduler” to refer to the placement and
37 scheduling component in the rest of this document. We are not including
38 lifecycle management of the VNF in our definition of the scheduler.
39
40 At a high level, we believe the VIM scheduler must:
41
42 -  Support virtual machines, containers and unikernels
43
44 -  Support legacy and event-driven scheduling
45
46    -  By legacy scheduling we mean scheduling without any trigger (see above)
47 i.e. the current technique used by schedulers such as OpenStack Nova.
48    -  By event-driven scheduling we mean scheduling with a trigger (see above).
49 We do not mean that the unikernel or container that is going to run the VNF is
50 already running . The instance is started and torn-down in response to traffic.
51 The two step process is transparent to the user.
52    -  More specialized higher level schedulers and orchestration systems may be
53 run on top e.g. FaaS (similar to AWS Lambda) etc.
54
55 +----------------------------------------------------------------------------------------+
56 | Serverless vs. FaaS vs. Event-Driven Terminology                                       |
57 |                                                                                        |
58 | Serverless: By serverless, we mean a general PaaS concept where the user does not have |
59 | to specify which physical or virtual compute resource their code snippet or function   |
60 | will run on. The code snippet/function is executed in response to an event.            |
61 |                                                                                        |
62 | FaaS: We use this term synonymously with serverless.                                   |
63 |                                                                                        |
64 | Event-Driven: By event-driven, we mean an entire microservice or service (as opposed a |
65 | code snippet) is executed in response to an event.                                     |
66 +----------------------------------------------------------------------------------------+
67
68 -  Work in distributed edge environments
69
70 Please provide your inputs. Once we have a comprehensive list of
71 requirements, we will investigate what the right open source solution
72 should be, and how to influence that particular project.
73
74 Use cases
75 ---------
76
77 A number of NFV use cases can benefit from a new VIM scheduler:
78
79 vCPE
80 ~~~~
81
82 vCPE can benefit from a new scheduler in two ways:
83
84 1. uCPE devices have very few cores (4-8 typical). Running statically scheduled
85 VMs is inefficient. An event-driven scheduler would help optimize the hardware resources and increase capacity.
86
87 2. vCPE is a bursty NFV use case, where services are not “on” all the time.
88 Legacy provisioning of virtual machines for each VNF significantly reduces
89 resource utilization, which in turn negatively impacts the
90 total-cost-of-ownership (TCO). Recent Intel studies have shown, in certain
91 cases, vCPE saves 30-40% TCO over physical functions. This number is hardly
92 compelling, we believe it needs to be significantly higher to be of any
93 interest. This can be accomplished by increasing utilization, which in turn
94 can be achieved through event-driven scheduling.
95
96 IOT/ MEC
97 ~~~~~~~~
98
99 IOT & multi-access edge computing
100 (`*MEC* <http://www.etsi.org/technologies-clusters/technologies/multi-access-edge-computing>`__)
101 share many of the same characteristics as the uCPE. Though serverless
102 functions increase the resource utilization, it does not provide ability
103 for application developers to introduce traditional security functions.
104 Serverless services that can be brought up on-demand basis provide
105 increases resource utilization as well as ability to introduce security
106 functions within the service. Additionally, there is need for low
107 latency and high security as well. A new scheduler can help with these
108 needs.
109
110 5G
111 ~~
112
113 5G brings with it a number of above requirements, but perhaps the one
114 that stands out the most is price/ performance. By using containers and
115 unikernels, the price/ performance ratio can be significantly improved.
116 (Containers or unikernels result in ~10x density with Legacy scheduling;
117 higher density is possible with event-driven scheduling.) 5G will also
118 bring MEC and IOT needs from the prior use case.
119
120 Security
121 ~~~~~~~~
122
123 Many traditional services are always-on. Always-on services provide
124 enough time for attackers to find vulnerabilities and exploit them. By
125 bringing up workloads on demand basis and terminating them upon
126 completion of its usage, closes the time advantage attackers have. For
127 example, in three tier architecture of “Web”, “App” and “DB”, following
128 on demand bring up would reduce the attack surface
129
130 -  On demand bring up of “DB” service upon “APP” layer request.
131 -  On demand bringup of “APP” service upon “Web” layer authenticates the user.
132 -  On demand bring up of “Web” service upon “DNS” request or upon seeing “SYN” packet
133
134 Workloads can be brought down upon inactivity or using some application
135 specific methods. Thin services (implemented using unikernels & Clear
136 containers) and fast schedulers are required to enable this kind of
137 security.
138
139 Detailed Requirements
140 ---------------------
141
142 Multiple compute types
143 ~~~~~~~~~~~~~~~~~~~~~~
144
145 +----------------------------------------+-----------------------------------------------+
146 | Requirement                            | Details                                       |
147 +========================================+===============================================+
148 | Support for virtual machines           | VMs are the most common form of VNFs, and are |
149 |                                        | not going away anytime soon. A scheduler must |
150 |                                        | be able to support VMs. In theory, the MANO   |
151 |                                        | software could use two VIMs: one for VMs and  |
152 |                                        | another for containers/ unikernels. However,  |
153 |                                        | we believe this is a suboptimal solution since|
154 |                                        | the operational complexity doubles - now the  |
155 |                                        | ops team has to deal with two VIM software    |
156 |                                        | layers. Also, networking coordination between |
157 |                                        | the two VIM layers becomes complex.           |
158 |                                        |                                               |
159 |                                        | NOTE: Bare-metal server scheduling, e.g.      |
160 |                                        | OpenStack Ironic, is out-of-scope for this    |
161 |                                        | document.                                     |
162 +----------------------------------------+-----------------------------------------------+
163 | Support containers                     | This need is clear, the future of VNFs seems  |
164 |                                        | to be containerized VNFs. Containers are 10x  |
165 |                                        | more dense than VMs and boot 10x faster.      |
166 |                                        | Containers will also accelerate the move to   |
167 |                                        | cloud-native VNFs. Some users may want nested |
168 |                                        | scheduling e.g. containers in VMs or          |
169 |                                        | containers in containers. Nested scheduling is|
170 |                                        | out-of-scope for this document. We will only  |
171 |                                        | focus on one layer of scheduling problem and  |
172 |                                        | expect the other layer of scheduler to be     |
173 |                                        | distinct and separate.                        |
174 +----------------------------------------+-----------------------------------------------+
175 | Support unikernels                     | Unikernels are lightweight VMs; with the same |
176 |                                        | density of containers, but faster boot times  |
177 |                                        | than containers. Since unikernels are VMs and |
178 |                                        | incredible small surface area, they have      |
179 |                                        | rock-solid security characteristics.          |
180 |                                        | Unikernels are also higher performance than   |
181 |                                        | VMs. For these reasons, unikernels could play |
182 |                                        | an important role in NFV. The downsides with  |
183 |                                        | unikernels are i) they are new, ii) often tied|
184 |                                        | to a programming language and iii) they       |
185 |                                        | require a software recompile. Unikernels are  |
186 |                                        | an ideal fit for micro-VNFs.                  |
187 |                                        | More specifically:                            |
188 |                                        |                                               |
189 |                                        | -  Need VNFs to be highly secure by reducing  |
190 |                                        |    significantly the attack surface           |
191 |                                        |                                               |
192 |                                        | -  Need to be able to schedule to NFVI with   |
193 |                                        |    high performance OVS-less services         |
194 |                                        |    chaining (e.g. through shared memory) that |
195 |                                        |    can significantly improve performance      |
196 +----------------------------------------+-----------------------------------------------+
197 | Colocation                             | We need support for affinity/anti-affinity    |
198 |                                        | constraints on VNF compute type (i.e. VM,     |
199 |                                        | unikernel, container). This will make         |
200 |                                        | colocation of different types of VNF compute  |
201 |                                        | types on the same host possible, if needed.   |
202 +----------------------------------------+-----------------------------------------------+
203 | Support all compute types on one SFC   | Since VNFs are procured from different vendors|
204 |                                        | , it is possible to get a mix of compute types|
205 |                                        | : VMs, containers, unikernels; and it should  |
206 |                                        | be possible to construct a service function   |
207 |                                        | chain from heterogeneous compute types.       |
208 +----------------------------------------+-----------------------------------------------+
209 | Unified API for all compute types      | Even though it is theoretically possible to   |
210 |                                        | have different APIs for different compute     |
211 |                                        | types and push the problem to the MANO layer, |
212 |                                        | this increases the overall complexity for the |
213 |                                        | solution. For this reason, the API needs to be|
214 |                                        | unified and consistent for different compute  |
215 |                                        | types.                                        |
216 +----------------------------------------+-----------------------------------------------+
217 | Hardware awareness                     | Ability to place workloads with specific      |
218 |                                        | hardware or underlying infrastructure         |
219 |                                        | capabilities (e.g. Intel EPA [1]_, FD.io,     |
220 |                                        | Smart NICs, Trusted Execution Environment,    |
221 |                                        | shared memory switching etc.)                 |
222 +----------------------------------------+-----------------------------------------------+
223 | Rich networking                        | The new VIM scheduler needs to be supported by|
224 |                                        | rich networking features currently available  |
225 |                                        | to OpenStack Nova through OpenStack Neutron   |
226 |                                        | (See document outlining K8s `*networking*     |
227 |                                        | <https://docs.google.com/document/d/1TW3P4c8au|
228 |                                        | WwYy-w_5afIPDcGNLK3LZf0m14943eVfVg/edit?ts=590|
229 |                                        | 1ec88>`__ requirements as an example):        |
230 |                                        |                                               |
231 |                                        | -  Ability to create multiple IP addresses/VNF|
232 |                                        |                                               |
233 |                                        | -  Networks not having cluster-wide           |
234 |                                        |    connectivity; not having visibility to each|
235 |                                        |    other                                      |
236 |                                        |                                               |
237 |                                        | -  Multi-tenancy: i) support traffic isolation|
238 |                                        |    between compute entities belonging to      |
239 |                                        |    different tenants, ii) support overlapping |
240 |                                        |    IP addresses across VNFs.                  |
241 |                                        |                                               |
242 |                                        | -  Limit services such as load balancing,     |
243 |                                        |    service discovery etc. on certain network  |
244 |                                        |    interfaces (see additional `*document*     |
245 |                                        |    <https://docs.google.com/document/d/1mNZZ2l|
246 |                                        |    L6PERBbt653y_hnck3O4TkQhrlIzW1cIc8dJI/edit>|
247 |                                        |    `__).                                      |
248 |                                        |                                               |
249 |                                        | -  L2 and L3 connectivity (?)                 |
250 |                                        |                                               |
251 |                                        | -  Service Discovery                          |
252 +----------------------------------------+-----------------------------------------------+
253 | Image repository & shared storage      | -  Centralized/distributed image repository   |
254 |                                        |                                               |
255 |                                        | -  Support shared storage (e.g. OpenStack     |
256 |                                        |    Cinder, K8s volumes etc.)                  |
257 +----------------------------------------+-----------------------------------------------+
258 .. [1]
259    Intel EPA includes DPDK, SR-IOV, CPU and NUMA pinning, Huge Pages
260    etc.
261
262 [OPEN QUESTION] What subset of the Neutron functionality is required
263 here?
264
265 Multiple scheduling techniques
266 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
267
268 +---------------------------+------------------------------------------------------------+
269 | Requirement               | Details                                                    |
270 +===========================+============================================================+
271 | Legacy scheduling         | This is the current technique used by OpenStack Nova and   |
272 |                           | container orchestration engines. Legacy scheduling needs to|
273 |                           | be supported as-is.                                        |
274 +---------------------------+------------------------------------------------------------+
275 | Event-driven scheduling   | This applies only to unikernels, since unikernels are the  |
276 |                           | only compute type that can boot at packet RTT. Thus, the   |
277 |                           | requirement is to be able to schedule and boot unikernel   |
278 |                           | instances in response to events with <30ms of ms (e.g.,    |
279 |                           | event-driven type of scheduling) as a must-have and <10ms  |
280 |                           | as a nice-to-have.                                         |
281 +---------------------------+------------------------------------------------------------+
282 | Distributed Scheduling    | Since services need to be brought up at packet RTT, there  |
283 |                           | could be requirement to distribute the scheduling across   |
284 |                           | compute nodes.                                             |
285 +---------------------------+------------------------------------------------------------+
286 | Multi Stage scheduling    | To enable scheduling of services at packet RTT, there is a |
287 |                           | need to divide the scheduling to at least two stages -     |
288 |                           | Initial stage where multiple service images are uploaded to|
289 |                           | candidate compute nodes and second stage where distributed |
290 |                           | scheduler bring up the service using the locally cached    |
291 |                           | images.                                                    |
292 +---------------------------+------------------------------------------------------------+
293
294 [OPEN QUESTION] What subset of the rich scheduler feature-set is
295 required here? (e.g. affinity, anti-affinity, understanding of dataplane
296 acceleration etc.)
297
298 Highly distributed environments
299 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
300
301 There are two possibilities here. A) The entire VIM will be in an edge
302 device and the MANO software will have to deal with 10s or 100s of
303 thousands of VIM instances. B) The alternative is that the VIM itself
304 will manage edge devices, i.e. the MANO software will deal with a
305 limited number of VIM instances. Both scenarios are captured below.
306
307 +--------------------+-------------------------------------------------------------------+
308 | Requirement        | Details                                                           |
309 +====================+===================================================================+
310 | Small footprint    | It should be possible to run the VIM scheduler in 1-2 cores.      |
311 +--------------------+-------------------------------------------------------------------+
312 | Nodes across WAN   | It should be possible to distribute the VIM scheduler across nodes|
313 |                    | separated by long RTT delays (i.e. WAN).                          |
314 +--------------------+-------------------------------------------------------------------+
315
316 Software Survey Candidates
317 --------------------------
318
319 Once the survey is complete, we will evaluate the following software
320 stacks against those requirements. Each survey, either conducted in
321 person and/or via documentation review, will consist of:
322
323 1. Architecture overview
324
325 2. Pros
326
327 3. Cons
328
329 4. Gap analysis
330
331 5. How gaps can be addressed
332
333 Each survey is expected to take 3-4 weeks.
334
335 +------------------------------------------+------------------------------------------------------+
336 | CNCF K8s                                 | Srini (talk to Xuan, Frederic, study gap analysis)   |
337 +------------------------------------------+------------------------------------------------------+
338 | Docker Swarm                             |                                                      |
339 +------------------------------------------+------------------------------------------------------+
340 | VMware Photon                            | Srikanth                                             |
341 +------------------------------------------+------------------------------------------------------+
342 | Intel Clear Container                    | Srini                                                |
343 +------------------------------------------+------------------------------------------------------+
344 | Intel Ciao                               | Srini                                                |
345 +------------------------------------------+------------------------------------------------------+
346 | OpenStack Nova                           |                                                      |
347 +------------------------------------------+------------------------------------------------------+
348 | Mesos                                    | Srikanth                                             |
349 +------------------------------------------+------------------------------------------------------+
350 | Virtlet (VM scheduling by K8s)           | Amar                                                 |
351 +------------------------------------------+------------------------------------------------------+
352 | Kubelet (VM scheduling by K8s)           | Amar                                                 |
353 +------------------------------------------+------------------------------------------------------+
354 | Kuryr (K8s to Neutron interface)         | Prem                                                 |
355 +------------------------------------------+------------------------------------------------------+
356 | RunV (like RunC) - can it support a VM   |                                                      |
357 +------------------------------------------+------------------------------------------------------+
358 | Nelson distributed container framework   |                                                      |
359 +------------------------------------------+------------------------------------------------------+
360 | Nomad                                    |                                                      |
361 +------------------------------------------+------------------------------------------------------+
362
363 Additional Points to Revisit
364 ----------------------------
365
366 -  Guidance on how to create immutable infrastructure with complete configuration, and benefits to performance and security
367 -  Guidance on API - VNFM vs. VIM
368