docs: refresh & structure overhaul
[nfvbench.git] / docs / developer / design / design.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International
2 .. License.
3 .. http://creativecommons.org/licenses/by/4.0
4 .. (c) Cisco Systems, Inc
5
6
7 *******************
8 NFVbench components
9 *******************
10
11 NFVbench can be decomposed in the following components:
12
13 - Configuration
14 - Orchestration:
15
16   - Staging
17   - Traffic generation
18   - Results analysis
19
20 Configuration
21 =============
22 This component is in charge of getting the configuration options from the user and consolidate them with
23 the default configuration into a running configuration.
24
25 default configuration + user configuration options = running configuration
26
27 User configuration can come from:
28
29 - CLI configuration shortcut arguments (e.g --frame-size)
30 - CLI configuration file (--config [file])
31 - CLI configuration string (--config [string])
32 - REST request body
33 - custom platform pluging
34
35 The precedence order for configuration is (from highest precedence to lowest precedence)
36
37 - CLI configuration or REST configuration
38 - custom platform plugin
39 - default configuration
40
41 The custom platform plugin is an optional python class that can be used to override default configuration options
42 with default platform options which can be either hardcoded or calculated at runtime from platform specific sources
43 (such as platform deployment configuration files).
44 A custom platform plugin class is a child of the parent class nfvbench.config_plugin.ConfigPlugin.
45
46 Orchestration
47 =============
48 Once the configuration is settled, benchmark orchestration is managed by the ChainRunner class (nfvbench.chain_runner.ChainRunner).
49 The chain runner will take care of orchestrating the staging, traffic generation and results analysis.
50
51
52 Staging
53 -------
54 The staging component is in charge of staging the OpenStack resources that are used for the requested packet path.
55 For example, for a PVP packet path, this module will create 2 Neutron networks and one VM instance connected to these 2 networks.
56 Multi-chaining and VM placement is also handled by this module.
57
58 Main class: nfvbench.chaining.ChainManager
59
60 Traffic Generation
61 ------------------
62 The traffic generation component is in charge of contrilling the TRex traffic generator using its python API.
63 It includes tasks such as:
64
65 - traffic check end to end to make sure the packet path is clear in both directions before starting a benchmark
66 - programming the TRex traffic flows based on requested parameters
67 - fixed rate control
68 - NDR/PDR binary search
69
70 Main class: nfvbench.traffic_client.TrafficClient
71
72
73 Traffic Generator Results Analysis
74 ----------------------------------
75 At the end of a traffic generation session, this component collects the results from TRex and packages them in a format that
76 is suitable for the various output formats (JSON, REST, file, fluentd).
77 In the case of multi-chaining, it handles aggregation of results across chains.
78
79 Main class: nfvbench.stats_manager.StatsManager