Skip to content

Commit

Permalink
add readme for session sync.
Browse files Browse the repository at this point in the history
  • Loading branch information
weiyanhua committed Sep 6, 2019
1 parent 72edfcc commit a105a1d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
Binary file added doc/pics/synchronization-principle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -1120,3 +1121,39 @@ worker_defs {
}

```
<a id='session-sync'/>
# 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
}
}
```

0 comments on commit a105a1d

Please sign in to comment.