Created
May 29, 2014 18:37
-
-
Save relistan/53be1fc306543df4ffdd to your computer and use it in GitHub Desktop.
etcd service discovery and configuration schema
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
client.set('/services/fooservice/ports/3021', value: 9292) | |
client.set('/services/fooservice/env/TESTING_URL', value: 'http//foo.com/asdf') | |
client.set('/services/fooservice/hosts/chi-staging-foo-1.nr-ops.net', value: 'up') | |
client.set('/services/fooservice/hosts/chi-staging-foo-2.nr-ops.net', value: 'up') | |
client.set('/services/fooservice/hosts/chi-staging-foo-3.nr-ops.net', value: 'down') | |
client.set('/services/fooservice/endpoints/chi-staging-foo-1.nr-ops.net', value: 'http://chi-staging-foo-1.nr-ops.net:3021/') | |
client.set('/services/fooservice/endpoints/chi-staging-foo-2.nr-ops.net', value: 'http://chi-staging-foo-2.nr-ops.net:3021/') | |
client.set('/services/fooservice/endpoints/chi-staging-foo-3.nr-ops.net', value: 'http://chi-staging-foo-3.nr-ops.net:3021/') | |
I think that rather than hostnames, the endpoint and hosts keys should be a unique ID. Kelsey indicated that Google has an algorithm for generated a 12 letter key that is preyty unique. That might be a good option. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment