From 20c06b1c3f91eca7fc9848e72ce404df9ca5f67e Mon Sep 17 00:00:00 2001 From: kerwenwwer Date: Sun, 24 Mar 2024 22:18:55 +0800 Subject: [PATCH 1/4] Update README.md --- README.md | 53 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 866023c..52c9dc8 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,49 @@ # XDP Gossip -## A Gossip protocol toolkit based on eBPF feature - -Basic Gossip API is from [PekoNode](https://github.com/dpwgc/pekonode/tree/master) - -## Build and Test +## Build Using make command it will build and run automatically. Build binary file -``` make ``` +``` +make +``` Build docker image -``` make docker``` +``` +make docker +``` Start a docker compose server -``` docker-compose up ``` +``` +docker-compose up +``` + +For k8s deployment: + +``` +kubectl apply -f k8s/deployment.yaml +``` + +## Benchmark (only support k8s) -## k8s +After deployment is ready, we can use our custom benchmark tool to test our server, first we should config the cluster first -``` kubectl apply -f k8s/deployment.yaml ``` +```bash + python3 script/test.py -c +``` +Then we can use ``-gl`` flag to check the nodeList size. +``` +python3 script/test.py -gl +``` -### Implement function +Use ``-b`` flag to generate random metadata update event on a node. +``` +python3 script/test.py -b +``` + +## Implement function ### eBPF Feature @@ -34,12 +55,18 @@ Attention !! In Linux network implementation, to avoid netlink or TC causing pac ![](img/3.png) +### Gossip Protocol + +Basic Gossip API is from [PekoNode](https://github.com/dpwgc/pekonode/tree/master) + + ##### Cluster node list sharing * Synchronize the list of cluster nodes through rumor propagation `NodeList` (Each node will eventually store a complete list of nodes that can be used in service registration discovery scenarios) ##### Cluster metadata information sharing * Publishing cluster metadata information through rumor spreading `Metadata` (The public data of the cluster, the local metadata information of each node is eventually consistent, and the storage content can be customized, such as storing some public configuration information, acting as a configuration center), The metadata verification and error correction function of each node of the cluster is realized through data exchange. -##### TCP or UDP protocol can be used to realize bottom communication interaction -* Customize the underlying communication protocol through the `NodeList - Protocol` field. UDP is used by default. If you want to pursue high reliability, you can use TCP. +##### UDP protocol can be used to realize bottom communication interaction +* Customize the underlying communication protocol through the `NodeList - Protocol` field. UDP is used by default. + ##### Custom configuration * The node list `NodeList` list provides a series of parameters for users to customize and configure. Users can use the default parameters, or fill in the parameters according to their needs. *** From aa730e76653d7517f091c8e7276d1090861b6c11 Mon Sep 17 00:00:00 2001 From: kerwenwwer Date: Sun, 24 Mar 2024 22:20:29 +0800 Subject: [PATCH 2/4] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 52c9dc8..89db70b 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,8 @@ python3 script/test.py -b #### In-kernel broadcastor Using ebpf TC hook to implement a clone redirect with a resruion structure, allowing gossip to quickly replicate multiple copies by only sending a single packet to the Linux protocol stack. -Attention !! In Linux network implementation, to avoid netlink or TC causing packet recursion too many times, which could lead to stack overflow, the XMIT_RESUION_LIMIT is set to 8. If Gossip needs to broadcast to more than 8 nodes, consider modifying the kernel source code. + +> Attention !! In Linux network implementation, to avoid netlink or TC causing packet recursion too many times, which could lead to stack overflow, the ``XMIT_RESUION_LIMIT`` is set to 8. If Gossip needs to broadcast to more than 8 nodes, consider modifying the kernel source code. ![](img/3.png) From 7ff990afc721e96c03f53b7a043627bfcdfe2793 Mon Sep 17 00:00:00 2001 From: kerwenwwer Date: Sun, 24 Mar 2024 22:23:17 +0800 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 89db70b..ee99da4 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Using ebpf TC hook to implement a clone redirect with a resruion structure, allo > Attention !! In Linux network implementation, to avoid netlink or TC causing packet recursion too many times, which could lead to stack overflow, the ``XMIT_RESUION_LIMIT`` is set to 8. If Gossip needs to broadcast to more than 8 nodes, consider modifying the kernel source code. -![](img/3.png) + ### Gossip Protocol From 21215eea6592cba5daabbe5ffedc8c1796458ef9 Mon Sep 17 00:00:00 2001 From: kerwenwwer Date: Sun, 24 Mar 2024 22:25:27 +0800 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ee99da4..2807c2f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# XDP Gossip +# eGossip ## Build Using make command it will build and run automatically.