2013/2/14 Roberto De Ioris <[email protected]>

>
> > With nginx->FastRouter->nodes and current uWSGI master branch I see:
> >
> > ab - 10000 requests done, including 803 failed
> > node - 9197 requests done, 0 write_errors
> > fastrouter - 9950 requests, 50 failcnt
> >
> > logs on fastrouter shows:
> >
> > 747 x fr_instance_read(): Connection reset by peer
> > [plugins/fastrouter/fastrouter.c line 127]
> >
> > 50 x [uwsgi-fastrouter] unable to connect() to node "172.16.200.56:3001
> ":
> > Connection timed out
> > looks like above is counted in "failcnt"
>
>
> hmm, 6 errors lost here... Maybe some error in the node side ?


Only errors that backlog is full, nothing about any errors in requests. It
might be on tcp level, network stack gets hammer a lot under such
conditions and I had issues when my vm gets very high traffic.


>
> >
> > Also I've noticed that "ref" shows a lot more than my node (or its
> > backlog)
> > can handle, high ref value stays there for a while, probably until
> request
> > gets a timeout or read error.
>
>
> yes, you are experiencing connection timeouts (maybe for the full listen
> queue) so the ref will be accounted until that timeout.
>
> The important thing is that ref come back to 0 after that timeout.
>

It looks that this is normal for 1.9 router, I'm just making sure since I
expected fastrouter to queue requests in it's backlog and forward them only
if node can accept them. But now it seems to me that fastrouter backlog
only keeps requests not yet forwarded, once fastrouter reads them from
backlog it forwards them, request that is forwarded lives as an event so
uWSGI only needs to accept when something happens to it (it gets completed
or there was an error). And if there was an issue with it, it will be
retried (hopefully). It is simple so that it can be fast.

ref gets back to 0, there was issue with that but since fixing #154 it
works fine.
And yes, backlog is full all the time with 512 concurrent requests so that
is the reason.

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

Reply via email to