Il giorno 04/mag/2012, alle ore 12:36, Damjan ha scritto: >> All correct, but you have to subscribe as localhost:8888 instead of localhost >> >> uwsgi --subscribe-to 127.0.0.1:2626:localhost:8888 -s 127.0.0.1:0 -w >> werkzeug.testapp:test_app > > ahh, so I need to know the full Host header that the router will be getting. > ok > > (but that could change if behind nginx, so ok again)
In nginx (using the fastrouter) you can the UWSGI_FASTROUTER_KEY to whatever value you want. That values has precedence over the Host header: uwsgi_param UWSGI_FASTROUTER_KEY foobar; in your app: --subscribe-to x.x.x.x:4040:foobar > > > Additionally > can I use the fastrouter as a dynamic http proxy to non uwsgi workers? > And how would I register them? the "subscription" packet is a udp message encoded in uwsgi format: modifier1 -> 224 modifier2 -> 0 key => foobar address => your_server_address:port modifier1 => the modifier of the subscribing app cores => the number of cores (the concurrency of your app) load => the current load of your app weight => round robin weight only key and address are required (and obviously the modifier1) Some times ago i have seen a tweet about using subscription system, but sadly i cannot find it anymore :( > > So for ex. I have the fastrouter started on port 8888 (uwsgi or http doesn't > matter), > and I have some apps that listen on http that I can't run in uwsgi (they are > C or perl or something) > These apps come and go, I want them to have random ports and register to the > fastrouter as needed. > this is part of a commercial implementation of uWSGI, i have to ask the customer if i can release that part -- Roberto De Ioris http://unbit.it JID: [email protected] _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
