Merge "Updated the LACP developer guide, incorporated comments."
[docs.git] / manuals / user-guide / src / main / asciidoc / sfc / odl-sfc-load-balance-user.adoc
1 === Service Function Load Balancing User Guide
2
3 ==== Overview
4 SFC Load-Balancing feature implements load balancing of Service Functions, rather than a one-to-one mapping between Service-Function-Forwarder and Service-Function. 
5
6 ==== Load Balancing Architecture
7 Service Function Groups (SFG) can replace Service Functions (SF) in the Rendered Path model. 
8 A Service Path can only be defined using SFGs or SFs, but not a combination of both.
9
10 Relevant objects in the YANG model are as follows:
11
12 1. Service-Function-Group-Algorithm:
13
14         Service-Function-Group-Algorithms {
15                 Service-Function-Group-Algorithm {
16                         String name
17                         String type
18                 }
19         }
20         
21         Available types: ALL, SELECT, INDIRECT, FAST_FAILURE
22
23 2. Service-Function-Group:
24
25         Service-Function-Groups {
26                 Service-Function-Group {
27                         String name
28                         String serviceFunctionGroupAlgorithmName
29                         String type
30                         String groupId
31                         Service-Function-Group-Element {
32                                 String service-function-name
33                                 int index
34                         }
35                 }
36         }
37
38 3. ServiceFunctionHop: holds a reference to a name of SFG (or SF)
39
40 ==== Tutorials
41 This tutorial will explain how to create a simple SFC configuration, with SFG instead of SF. In this example, the SFG will include two existing SF.
42
43 ===== Setup SFC
44 For general SFC setup and scenarios, please see the SFC wiki page: https://wiki.opendaylight.org/view/Service_Function_Chaining:Main#SFC_101
45
46 ===== Create an algorithm
47 POST - http://127.0.0.1:8181/restconf/config/service-function-group-algorithm:service-function-group-algorithms
48 ----
49 {
50     "service-function-group-algorithm": [
51       {
52         "name": "alg1"
53         "type": "ALL"
54       }
55    ]
56 }
57 ----
58
59 (Header "content-type": application/json)
60
61 ===== Verify: get all algorithms
62 GET - http://127.0.0.1:8181/restconf/config/service-function-group-algorithm:service-function-group-algorithms
63
64 In order to delete all algorithms:
65 DELETE - http://127.0.0.1:8181/restconf/config/service-function-group-algorithm:service-function-group-algorithms
66
67 ===== Create a group
68 POST - http://127.0.0.1:8181/restconf/config/service-function-group:service-function-groups 
69 ----
70 {
71     "service-function-group": [
72     {
73         "rest-uri": "http://localhost:10002",
74         "ip-mgmt-address": "10.3.1.103",
75         "algorithm": "alg1",
76         "name": "SFG1",
77         "type": "service-function-type:napt44",
78                 "sfc-service-function": [
79                         {
80                                 "name":"napt44-104"
81                         }, 
82                         {
83                                 "name":"napt44-103-1"
84                         }
85                 ]
86       }
87         ]
88 }
89 ----
90
91 ===== Verify: get all SFG's
92 GET - http://127.0.0.1:8181/restconf/config/service-function-group:service-function-groups