Dnia środa, 14 września 2011 o 20:19:45 Roberto De Ioris napisał(a):
> > BTW is subscription server single process? Can I have multiple SS
> > processes
> > listening on single port?
> 
> You can spawn an unlimited number of fastrouter simply adding multiple
> --fastrouter <socket>
> 
> uwsgi --fastrouter :3031 --fastrouter :3032 --fastrouter :3033
> 
> is perfectly valid and will ends with 3 fastrouter
> 
> You can share sockets too using --shared-socket feature
> 
> uwsgi --shared-socket :3031 --fastrouter =0 --fastrouter =0 --fastrouter =0
> 
> means: spawn 3 fastrouter bound on first shared socket

I'm a little bit lost, You are talking about "--fastrouter" here and I my 
question was about "--http-subscription-server" (I didn't asked it clearly). 
If I understand correctly "--fastrouter-*" options are for loadbalancing when 
upstream talks to the uwsgi socket using WSGI protocol, and "--http-
subscription-server" is used when upstream talks using HTTP protocol. 
I can't repeat "--http-subscription-server" option (only last value is used), 
so I'm limited to single process that is doing load balancing and if I want to 
handle big traffic I need to be able to use all cpu cores.
I can just run multiple uwsgi instances on different ports and subscribe my 
backends to all of them, but maybe there is smarter way.

I'm thinking about setup like this:

varnish -> uwsgi --http :8080 --http-subscription-server :2626 -> uwsgi --
emperor /apps/

This way I could start as many backends as needed without touching varnish 
config, which is great because it allowes me to dynamically manage amount of 
backends (or even automate it a bit) for given web app.
I could put nginx between varnish and uwsgi but it seems pointless to me, it 
would be just another layer that does nothing usefull since uwsgi can do the 
same, and it's not exposed directly to clients since it's behind varnish.
But AFAIK varnish can't speak WSGI (after all it's not job for reverse proxy) 
so I need to expose uwsgi load balancing over HTTP.
If I'm wrong than please correct me, after reading [1] and [2] I'm not totally 
sure if I understand the differences between those two right.

1 - http://projects.unbit.it/uwsgi/wiki/FastRouter
2 - http://projects.unbit.it/uwsgi/wiki/SubscriptionServer

Łukasz Mierzwa
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to