File tree Expand file tree Collapse file tree 2 files changed +67
-0
lines changed
Expand file tree Collapse file tree 2 files changed +67
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ DPVS Tutorial
2121 - [ KNI for virtual device] ( #vdev-kni )
2222* [ UDP Option of Address (UOA)] ( #uoa )
2323* [ Launch DPVS in Virtual Machine (Ubuntu)] ( #Ubuntu16.04 )
24+ * [ Session synchronization] ( #session-sync )
2425
2526> To compile and launch DPVS, pls check * README.md* for this project.
2627
@@ -1120,3 +1121,69 @@ worker_defs {
11201121 }
11211122
11221123` ` `
1124+ < a id=' session-sync' />
1125+
1126+ # Session synchronization
1127+
1128+ Session synchronization to decrease the connection break due to the DPVS node failure in the cluster.
1129+ There are two synchronization modes: full and incremental
1130+ * incremental synchronization is used for the new sessions
1131+ * full synchronization is used for the existing sessions
1132+
1133+ The basic synchronization principle,looks like below
1134+ ! [synchronization-principle.png](pics/synchronization-principle.png)
1135+
1136+ Adding new DPVS nodes in the cluster requires the following commands to select synchronous nodes and synchronize existing sessions.
1137+
1138+ ` ` ` bash
1139+ $ ipvsadm --conn-sync
1140+ ` ` `
1141+ If you would like to use session synchronization, add the following lines into the device configs of ` dpvs.conf` :
1142+
1143+ ` ` `
1144+ ! worker config (lcores)
1145+ worker_defs {
1146+ < init> worker cpu0 {
1147+ type master
1148+ cpu_id 0
1149+ }
1150+
1151+ < init> worker cpu1 {
1152+ type slave
1153+ cpu_id 1
1154+ port dpdk0 {
1155+ rx_queue_ids 0
1156+ tx_queue_ids 0
1157+ ! isol_rx_cpu_ids 9
1158+ ! isol_rxq_ring_sz 1048576
1159+ }
1160+ }
1161+ .......
1162+
1163+ < init> worker cpu10 {
1164+ type sync-tx
1165+ cpu_id 10
1166+ }
1167+
1168+ < init> worker cpu11 {
1169+ type sync-rx
1170+ cpu_id 11
1171+ }
1172+ }
1173+
1174+ session_sync {
1175+ sync_session_enable
1176+ sync_session_elapse 2 ! secondes elapsed since the connection is established
1177+ sync_buff_delay 2
1178+ laddr_ifname dpdk0
1179+ sync_id 8
1180+
1181+ socket {
1182+ mcast_addr 224.0.1.100
1183+ mcast_port 8088
1184+ mcast_ttl 20
1185+ mtu 1500
1186+ unicast_port 8089
1187+ }
1188+ }
1189+ ` ` `
You can’t perform that action at this time.
0 commit comments