<HTML><HEAD><META content="text/html; charset=UTF-8" http-equiv="Content-Type"></HEAD><BODY>Yes. If you have more control over the behavior of the client, I would make use of 100-continue, and send an error response when the server is under load.<BR>
<BR>
HTH<BR>
<BR>
Kevin Burton wrote:<BR>
> I assume I basically have to change interest ops on the channel when <BR>
> the buffer is empty/full?<BR>
><BR>
> Kevin<BR>
><BR>
> On Tue, Oct 25, 2011 at 4:18 PM, Kevin Burton <burtonator@gmail.com <BR>
> <mailto:burtonator@gmail.com>> wrote:<BR>
><BR>
> How do I tell the sender of data (I control both) to back off if I<BR>
> can't accept any more data on the server?<BR>
><BR>
> Specifically, I have an HTTP PUT implementation that first 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 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 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<BR>
> https://lists.jboss.org/mailman/listinfo/netty-users</BODY></HTML>