unbit / uwsgi-etcd

uWSGI plugin for etcd integration
MIT License
1 stars 0 forks source link

Features to expose #1

Open unbit opened 9 years ago

unbit commented 9 years ago

The etcd plugin (and the consul one) should expose the following features:

alanjds commented 9 years ago

When I saw this repo name (uwsgi-etcd), the 1st thing I guessed is using etcd or discovery.etcd.io for node discovery. Suggestions about how to do it:

1) Use discovery.etcd.io as a node discovery broker

Allow this:

 --fastrouter-subscription-server 192.168.0.100:2626

To accept this:

 --fastrouter-subscription-server 192.168.0.100:2626 \
 --fastrouter-subscription-broker "etcd-discovery:https://discovery.etcd.io/a80ec9b0ace9ac19a19b1b777063040c/"

Meaning: After spawning my subscription server, register it at this etcd discovery endpoint

Or even:

 --fastrouter-subscription-server 192.168.0.100:2626 \
 --fastrouter-subscription-broker "etcd-discovery:https://discovery.etcd.io/new?size=3"

Meaning: After spawning my subscription server, create a new token at this etcd discovery endpoint and register myself.

2) Use discovery.etcd.io as a subscribe servers discovery broker

Allow this:

--subscribe-to 192.168.0.100:2626:uwsgi.it  --subscribe-to 192.168.0.101:2626:uwsgi.it (...) --subscribe-to 192.168.0.199:2626:uwsgi.it

To be replaced by this:

--subscribe-to "etcd-discovery:https://discovery.etcd.io/a80ec9b0ace9ac19a19b1b777063040c/:uwsgi.it"

Meaning: fetch the nodes registered at this discovery endpoint and subscribe on all of them!

What you think?