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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to