Telling senders to back off on overloaded server?

Kevin Burton burtonator at gmail.com
Tue Oct 25 19:20:11 EDT 2011


I assume I basically have to change interest ops on the channel when the
buffer is empty/full?

Kevin

On Tue, Oct 25, 2011 at 4:18 PM, Kevin Burton <burtonator at gmail.com> wrote:

> How do I tell the sender of data (I control both) to back off if I can't
> accept any more data on the server?
>
> Specifically, I have an HTTP PUT implementation that first writes to a
> queue and then I drain the queue to disk.
>
> When the queue fills up because the server is overloaded, I need a way to
> tell the sender to back off...
>
> Normally the TCP buffers would just fill up on both ends and the sender
> wouldn't receive ACKs any more and wouldn't send more packets until the
> existing ones have been ack'd ...
>
> I just don't now how to tell Netty to stop sending me data because I can't
> handle it...
>
> I don't want to use any threads in my application if they're not needed.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20111025/16dea16c/attachment.html 


More information about the netty-users mailing list