diff --git a/doc/pics/synchronization-principle.png b/doc/pics/synchronization-principle.png new file mode 100644 index 000000000..7e5f4fad0 Binary files /dev/null and b/doc/pics/synchronization-principle.png differ diff --git a/doc/tutorial.md b/doc/tutorial.md index 6e42499a3..a45dce079 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -21,6 +21,7 @@ DPVS Tutorial - [KNI for virtual device](#vdev-kni) * [UDP Option of Address (UOA)](#uoa) * [Launch DPVS in Virtual Machine (Ubuntu)](#Ubuntu16.04) +* [Session synchronization](#session-sync) > To compile and launch DPVS, pls check *README.md* for this project. @@ -1120,3 +1121,39 @@ worker_defs { } ``` + + +# Session synchronization + +Session synchronization to decrease the connection break due to the DPVS node failure in the cluster. +There are two synchronization modes: full and incremental +* incremental synchronization is used for the new sessions +* full synchronization is used for the existing sessions + +The basic synchronization principle,looks like below +![synchronization-principle.png](pics/synchronization-principle.png) + +Adding new DPVS nodes in the cluster requires the following commands to select synchronous nodes and synchronize existing sessions. + +```bash +$ ipvsadm --conn-sync +``` +If you would like to use session synchronization, add the following lines into the device configs of `dpvs.conf`: + +``` +session_sync { + sync_session_enable + sync_session_elapse 2 !secondes elapsed since the connection is established + sync_buff_delay 2 + laddr_ifname dpdk0 + sync_id 8 + + socket { + mcast_addr 224.0.1.100 + mcast_port 8088 + mcast_ttl 20 + mtu 1500 + unicast_port 8089 + } +} +```