commit 5726a1ba0d4078552cc64ecdce3a71af39484243 Author: Nikita Tokarchuk Date: Wed Apr 13 23:42:00 2022 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..510ff6e --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof + +vendor/ +.idea/ + +.DS_Store diff --git a/README.md b/README.md new file mode 100644 index 0000000..7e848e2 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# node setup + +The nodes-sync library uses zookeeper and helps to manage a clustered app. It can be useful to manage the load across +multiple nodes and dynamically scale it in real time when node fail or a new one become available. + +## load spreading example + +![](docs/node-flow.drawio.svg) diff --git a/docs/node-flow.drawio.svg b/docs/node-flow.drawio.svg new file mode 100644 index 0000000..18289b2 --- /dev/null +++ b/docs/node-flow.drawio.svg @@ -0,0 +1,4 @@ + + + +
node 1
start
node 1...
I am
1/1
I am...
node 2
start
node 2...
I am
2/2
I am...
do 100%
tasks
do 100%...
tasks
database
tasks...
nodesync
nodesync
ZK
ZK
sync
sync
I am
1/2
I am...
finish
pending
tasks
finish...
new
node
available
new...
do 50%
tasks
do 50%...
do 50%
tasks
do 50%...
Text is not SVG - cannot display
\ No newline at end of file