<HTML><HEAD><META content="text/html; charset=UTF-8" http-equiv="Content-Type"></HEAD><BODY>Channel.setReadable(false)?<BR>
<BR>
Kevin Burton wrote:<BR>
> So how do you do this at the TCP layer and not use threads within <BR>
> Netty...<BR>
><BR>
> You should be able to tell netty to not read from the socket even if <BR>
> it is available because you're not yet ready for the data.<BR>
><BR>
> This way all TCP protocols will work the same way without application <BR>
> specific changes or controlling the client.<BR>
><BR>
> Otherwise you have to use lots of threads which defeats the whole <BR>
> point :-(<BR>
><BR>
> Kevin<BR>
><BR>
> On Tue, Oct 25, 2011 at 4:23 PM, "이희승 (Trustin Lee)" <BR>
> <trustin@gmail.com <mailto:trustin@gmail.com>> wrote:<BR>
><BR>
> Yes. If you have more control over the behavior of the client, I<BR>
> would make use of 100-continue, and send an error response when<BR>
> the server is under load.<BR>
><BR>
> HTH<BR>
><BR>
><BR>
> Kevin Burton wrote:<BR>
> > I assume I basically have to change interest ops on the channel<BR>
> when<BR>
> > the buffer is empty/full?<BR>
> ><BR>
> > Kevin<BR>
> ><BR>
> > On Tue, Oct 25, 2011 at 4:18 PM, Kevin Burton<BR>
> <burtonator@gmail.com <mailto:burtonator@gmail.com><BR>
> > <mailto:burtonator@gmail.com <mailto:burtonator@gmail.com>>> wrote:<BR>
> ><BR>
> > How do I tell the sender of data (I control both) to back<BR>
> off if I<BR>
> > can't accept any more data on the server?<BR>
> ><BR>
> > Specifically, I have an HTTP PUT implementation that first<BR>
> writes<BR>
> > to a queue and then I drain the queue to disk.<BR>
> ><BR>
> > When the queue fills up because the server is overloaded, I<BR>
> need a<BR>
> > way to tell the sender to back off...<BR>
> ><BR>
> > Normally the TCP buffers would just fill up on both ends and the<BR>
> > sender wouldn't receive ACKs any more and wouldn't send more<BR>
> > packets until the existing ones have been ack'd ...<BR>
> ><BR>
> > I just don't now how to tell Netty to stop sending me data<BR>
> because<BR>
> > I can't handle it...<BR>
> ><BR>
> > I don't want to use any threads in my application if they're not<BR>
> > needed.<BR>
> ><BR>
> ><BR>
> > _______________________________________________<BR>
> > netty-users mailing list<BR>
> > netty-users@lists.jboss.org <mailto:netty-users@lists.jboss.org><BR>
> > https://lists.jboss.org/mailman/listinfo/netty-users<BR>
><BR>
> _______________________________________________<BR>
> netty-users mailing list<BR>
> netty-users@lists.jboss.org <mailto:netty-users@lists.jboss.org><BR>
> https://lists.jboss.org/mailman/listinfo/netty-users<BR>
><BR>
><BR>
> _______________________________________________<BR>
> netty-users mailing list<BR>
> netty-users@lists.jboss.org<BR>
> https://lists.jboss.org/mailman/listinfo/netty-users</BODY></HTML>