-
-
Save jacobat/8401005 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Routing with etcd | |
----------------- | |
A site has the following structure: | |
/name | |
/current_revision => [revision] | |
/nodes | |
/[revision] | |
/[nodename] => [url] | |
For instance the sales site could have the following values: | |
/sales_site/current_revision => abcd | |
/sales_site/nodes/abcd/192.168.0.10 => 192.168.0.10:49013 | |
/sales_site/nodes/abcd/192.168.0.11 => 192.168.0.11:49014 | |
When deploying a new revision defg we would first add the new nodes: | |
/sales_site/nodes/defg/192.168.0.10 => 192.168.0.10:49021 | |
/sales_site/nodes/defg/192.168.0.11 => 192.168.0.11:49022 | |
And the switch the current_revision: | |
/sales_site/current_revision => defg | |
Leaving the tree as: | |
/sales_site/current_revision => defg | |
/sales_site/nodes/abcd/192.168.0.10 => 192.168.0.10:49013 | |
/sales_site/nodes/abcd/192.168.0.11 => 192.168.0.11:49014 | |
/sales_site/nodes/defg/192.168.0.10 => 192.168.0.10:49021 | |
/sales_site/nodes/defg/192.168.0.11 => 192.168.0.11:49022 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment