tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: tomcat: bandwidth limiter / transfer rate limit ?
Date Wed, 11 Nov 2009 18:43:03 GMT
Cae Fernandes wrote:
> Well,
> 
> It's not about counting the bytes, but making the connection slower.
> Like, if I would output only a certain amount of bytes per second, i'd have
> to output them and make the thread sleep for a certain amount of
> miliseconds.That's why I mentiojned sleeping threads.

Yes, but isn't *any* solution, in the end, going to have the same effect ?

I mean, suppose that you have a direct connection between Tomcat and the 
client, and that the client is behind a very slow (physical) connection. 
  At some point, the webapp is going to want to output something to the 
client, but all buffers will be full waiting for the client to receive 
them, and whatever is sending them will have to wait.
Whether that wait is a sleep decided at the level of the application, or 
at the level of the OS, is rather immaterial.  The webapp/thread will 
wait anyway.

The only way to avoid that would be to have, between Tomcat and the 
client, some appliance (software or hardware) which would buffer the 
Tomcat output and send it to the client at the rate it will accept, or 
at the rate that you decide.

An Apache front-end might be able to do that, if it has some add-on 
module for the purpose.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message