That's cool. Thanks man!
On Mon, Aug 12, 2013 at 1:49 PM, Roberto De Ioris <[email protected]> wrote: > > > Hello folks, > > > > I wonder if there's any Python API that allows to expose a list of fast > > routers, and a list of nodes that subscribed to it. > > > > I am working on monitor/dashboard webapp, I wish there could be some kind > > of auto-discover mechanism that allows me to connect to worker clusters > > and > > display sys info, trigger deploy commands, etc. > > > > > > Any ideas? Thanks in advance! > > _______________________________________________ > > uWSGI mailing list > > [email protected] > > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > > > > > The stats server (--fastrouter-stats <addr>) exposes a json of all of the > subscribed nodes (and their usage). > > Regarding cluster membership, the legion subsystem is now very powerful > for grouping machines (expecially if your network is multicast capable) > > http://uwsgi-docs.readthedocs.org/en/latest/Legion.html > > you can add a "scroll" to each node of the legion with the address of the > stats server in it, so the monitor node can simply join the legion and > receive the list of json servers to connect to. > > Another approach is using the subscription system (but reversed). You > should be able to easily implement the subscription protocol (there are > example in the contrib directory) in your monitor server. Every node of > the cluster subscribe to it (subscription is a simple udp packet) so the > monitor knows the list of available servers: > > # pseudo code > for(;;) { > wait_for_subscription_packet(); > parse_the_packet(); > connect_to_the_announced_node_and_parse_json(); > display_stats(); > } > -- > Roberto De Ioris > http://unbit.it > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
