Re: RES: Configuring limits of requests/sessions/threads in Tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Danilo, On 4/1/14, 8:37 PM, Danilo Amaral de Oliveira wrote: Hello Chritopher, You make score. Exactly, I am waiting 500 users on the peak time. The archive is in a separated storage in our environment. So, I think that it is not a limiting factor. I will try some maxthreads configurations and stress situations to see if the server will could handle 500 users. If necessary I can increase the server memory and processing, we have robust cluster. Actually the server has 4 cores and 8gb of memory. None of that really matters. You could serve this site off an iPhone if you had enough network bandwidth. That's why I suggested using a CDN. At the same time, I am analyzing with security team if we could liberate a specific video in youtube Beware of YouTube's terms of service. You may be better off with a choice like Vimeo. In you host on Amazon S3, you have no licensing problems (as long as the content truly is yours). in order to instead use JWPlayer the site use an embedded youtube video, so I take off the responsibility of tomcat to deliver the video and I can sleep in peace. hahha That's what CDNs are for. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTPGxQAAoJEBzwKT+lPKRYDFYQAKzWjCupgJPB1V2Y/5fY3+Y8 gpZYxxrrHPl4BEJRng0Idwriw1m1BLyIAfsp+KMlCuwRJpvaATQhHy04C516DvlZ kmDT6vYh6ZsfFxrhcLjzm16pjs34OCltIDGC5zko54jpeWBaO7r+HZpKzJQi7uHs 3CDML7WasLtsSJEVk2tdu1MoHZ/iviegVbk6gsDZbYm0HEsc1cuU3uA2mHkYAxQU 3DmiPpN1cSExQScpAJGUF2hC4xnUNOM4kpcAvhc5PgQHnp3GmFMYSjviFXulfIUm bu2IfYMMxftViIfo1+c6szZq73SN7J+2e/W6Bgx53/hsGjSI3o43DLUpRgL3p9Jx y5VSOnCp4CTPnpw4HOyzrbmIMZjNIlDxrTRYKdnPmJeNXOxWzPqtm7687cdNup9U coQqqueY8MiDEEDCYFXw43ajK/k54xxQ/08/2CVldQKCitjmtWBypPHA5SlVb9Wr fNQqqLoOxttddbdYcOREW2CMk8exqYfQNTRAndOS7B94UYRLmLprxxJryUhOK0TT LP6lxNQk/sqElw31GGZawCtZiHklKJ+zTXUqtUUJSCKt9NxlhFNhFV5lvIm2jEik w5r0HEWHefn9Ineu6B1CrtAMoerCelDSAVBpBHqYd3RL/ikZaOFRdX43DTLCX9Ft dktwTvK3lLsa27VanYYS =njlk -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RES: Configuring limits of requests/sessions/threads in Tomcat
Milo, The video is embedded in a JWPlayer Javascript application. The video is in the page too, but you need download it before watch it. Summarizing, here the simulating process of watching the video: User access the page | Tomcat serve the page. User clicks play button | Tomcat send the video to the user (it is the same if the user download it) User watches the video in the JWPlayer windows| The processing task of the video is in the local user machine - The interaction between the web application finishes after download the video. Danilo Grupo Energisa Danilo A. Oliveira Analista Suporte Aplicacao TI - DPTO CORP. DE INFRAESTR. TI e-mail: danilo.olive...@energisa.com.br | tel: (32) 3429-6342 | cel: (32) 8452-9478 Esta mensagem contém informação confidencial. Se você a recebeu por engano, não divulgue ou copie seu conteúdo. Por favor, avise ao remetente imediatamente e apague-a do computador. Privileged and confidential. If this message has been received by mistake, do not disclose or copy its contents. Please notify sender and delete immediately. -Mensagem original- De: Milo Hyson [mailto:m...@cyberlifelabs.com] Enviada em: terça-feira, 1 de abril de 2014 15:52 Para: Tomcat Users List Assunto: Re: Configuring limits of requests/sessions/threads in Tomcat On Apr 1, 2014, at 11:03 AM, Danilo Amaral de Oliveira danilo.olive...@energisa.com.br wrote: Next week we will deploy a institutional video to all company (more than 5k users) in a webpage in an application manges by the Tomcat 7.0.40. I have made a stress test through JMeter, simulating a lot of simultaneous access, and when the simultaneous access reaches 100 users the application stop answering. Are you serving the video streams through Tomcat or just the pages that house them? - Milo Hyson Chief Scientist CyberLife Labs, Inc. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: RES: Configuring limits of requests/sessions/threads in Tomcat
On Apr 1, 2014, at 12:00 PM, Danilo Amaral de Oliveira danilo.olive...@energisa.com.br wrote: The video is embedded in a JWPlayer Javascript application. The video is in the page too, but you need download it before watch it. Since users have to download the video, I'm guessing it isn't being streamed at a reasonable bit-rate but rather transmitted at full-rate like any other static file would be. If that's the case, your bandwidth (and Tomcat's time) are being spent on bulky video transmissions rather than serving up pages. I'd recommend taking a different approach, like using a content-aware streaming package or maybe even offloading the video to a third-party network (e.g. YouTube). - Milo Hyson Chief Scientist CyberLife Labs, Inc.
Re: RES: Configuring limits of requests/sessions/threads in Tomcat
Danilo Amaral de Oliveira wrote: Milo, The video is embedded in a JWPlayer Javascript application. The video is in the page too, but you need download it before watch it. Summarizing, here the simulating process of watching the video: User access the page | Tomcat serve the page. Ok, so there can be 5000 users obtaining that page, and just to annoy you, they all wait before they press the play button. (I would imagine that the page does not really contain the video when they get it. Or does the fact of simply viewing that page already downloads the video ?) User clicks play button So now they all click play at the same time. | Tomcat send the video to the user (it is the same if the user download it) That's probably not what really happens, is it ? I mean, the play button must be sending something back to Tomcat. User watches the video in the JWPlayer windows| The processing task of the video is in the local user machine - The interaction between the web application finishes after download the video. ... I searched Google for JWPlayer, and went to their homepage, which shows one such video window. I did this with Firefox, with the add-on HttpFox enabled, to see what happens. Loading the page which contains the window showing the starting image of the video, does not really download the video yet; just a lot of html, stylesheets, javascript, gifs, jpegs etc.. But nothing very large individually. When you click the play button however, /then/ the browser makes a request for the video/mp4 file (in this case 3.6 MB) and starts downloading and playing it. The request to the server for the video, is just a GET request. (GET /sEtaWjfL/videos/RxiqSWej-htxObmZA.mp4?5c877a8d15f183bb974dcdccb105a79495b4e5e3b1b6e4cf2779670f5893acd5fb2e2e0fa612e58d66b8691edfddfac95896931e691ea609ff9f808064d5ebbefd315cdd991497cb4a0ea3fdf2a639831982a394 HTTP/1.1) So is there some application on the server which responds to that GET request from the page, or just the file itself ? As for the real solution to your problem, considering that this JWPlayer is a commercial application, with probably some technical support available, did you ask the supplier about this ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: RES: Configuring limits of requests/sessions/threads in Tomcat
André Warnier wrote: Danilo Amaral de Oliveira wrote: Milo, The video is embedded in a JWPlayer Javascript application. The video is in the page too, but you need download it before watch it. Summarizing, here the simulating process of watching the video: User access the page | Tomcat serve the page. Ok, so there can be 5000 users obtaining that page, and just to annoy you, they all wait before they press the play button. (I would imagine that the page does not really contain the video when they get it. Or does the fact of simply viewing that page already downloads the video ?) User clicks play button So now they all click play at the same time. | Tomcat send the video to the user (it is the same if the user download it) That's probably not what really happens, is it ? I mean, the play button must be sending something back to Tomcat. User watches the video in the JWPlayer windows| The processing task of the video is in the local user machine - The interaction between the web application finishes after download the video. ... I searched Google for JWPlayer, and went to their homepage, which shows one such video window. I did this with Firefox, with the add-on HttpFox enabled, to see what happens. Loading the page which contains the window showing the starting image of the video, does not really download the video yet; just a lot of html, stylesheets, javascript, gifs, jpegs etc.. But nothing very large individually. When you click the play button however, /then/ the browser makes a request for the video/mp4 file (in this case 3.6 MB) and starts downloading and playing it. The request to the server for the video, is just a GET request. (GET /sEtaWjfL/videos/RxiqSWej-htxObmZA.mp4?5c877a8d15f183bb974dcdccb105a79495b4e5e3b1b6e4cf2779670f5893acd5fb2e2e0fa612e58d66b8691edfddfac95896931e691ea609ff9f808064d5ebbefd315cdd991497cb4a0ea3fdf2a639831982a394 HTTP/1.1) So is there some application on the server which responds to that GET request from the page, or just the file itself ? As for the real solution to your problem, considering that this JWPlayer is a commercial application, with probably some technical support available, did you ask the supplier about this ? Complement of information, for anyone interested : The following is the complete sequence of requests sent by the browser (as per HttpFox), starting from the pressing of the play icon in the middle of the initial image, up to the end of the video. 00:00:09.681 1.663 568 3.6M GET 200 video/mp4 https://videos-vm.jwpsrv.com/sEtaWjfL/videos/RxiqSWej-htxObmZA.mp4?5c877a8d15f183bb974dcdccb105a79495b4e5e3b1b6e4cf2779670f5893add9bd407b6146da13d8a990bbb9a17d6835bbd66c15fc66bb4167bad932cfe0c24276d7d671f2759d6d3f1d3994dd83013b92f4ba92d71d 00:00:10.648 0.150 830 200 GET 200 image/gif http://i.n.jwpltx.com/v1/jwplayer6/ping.gif?tv=4636ph=1n=2136859365394319aid=FTMzKDHrEeODISIACusDuQe=si=0pv=6.8.4616pi=a=0ed=3vs=2l=2q=4mu=https%3A%2F%2Fvideos-vm.jwpsrv.com%2FsEtaWjfL%2Fvideos%2FRxiqSWej-5iAUmvy0.mp4%3F5c877a8d15f183bb974dcdccb105a79495b4e5e3b1b6e4cf2779670f5893add9bd407b6146da13d8a990bbb9a17d6835bbd66c15fc66bb4167bad932cfe0c24276d7d671f2759d6d3f1d6489e4990e20da9eeec3050epu=http%3A%2F%2Fwww.jwplayer.com%2Ft=Playpt=JW%20Player%20%7C%20Best%20HTML5%20%26%20Flash%20Online%20Video%20Player%20%7C%20Video%20Hosting 00:00:21.681 0.158 829 200 GET 200 image/gif http://i.n.jwpltx.com/v1/jwplayer6/ping.gif?tv=4636ph=1n=4250413625278177aid=FTMzKDHrEeODISIACusDuQe=ti=0pv=6.8.4616pi=ed=3ti=11pw=32q=4mu=https%3A%2F%2Fvideos-vm.jwpsrv.com%2FsEtaWjfL%2Fvideos%2FRxiqSWej-5iAUmvy0.mp4%3F5c877a8d15f183bb974dcdccb105a79495b4e5e3b1b6e4cf2779670f5893add9bd407b6146da13d8a990bbb9a17d6835bbd66c15fc66bb4167bad932cfe0c24276d7d671f2759d6d3f1d6489e4990e20da9eeec3050epu=http%3A%2F%2Fwww.jwplayer.com%2Ft=Playpt=JW%20Player%20%7C%20Best%20HTML5%20%26%20Flash%20Online%20Video%20Player%20%7C%20Video%20Hosting 00:00:37.860 0.157 829 200 GET 200 image/gif http://i.n.jwpltx.com/v1/jwplayer6/ping.gif?tv=4636ph=1n=7175237523619218aid=FTMzKDHrEeODISIACusDuQe=ti=0pv=6.8.4616pi=ed=3ti=11pw=64q=4mu=https%3A%2F%2Fvideos-vm.jwpsrv.com%2FsEtaWjfL%2Fvideos%2FRxiqSWej-5iAUmvy0.mp4%3F5c877a8d15f183bb974dcdccb105a79495b4e5e3b1b6e4cf2779670f5893add9bd407b6146da13d8a990bbb9a17d6835bbd66c15fc66bb4167bad932cfe0c24276d7d671f2759d6d3f1d6489e4990e20da9eeec3050epu=http%3A%2F%2Fwww.jwplayer.com%2Ft=Playpt=JW%20Player%20%7C%20Best%20HTML5%20%26%20Flash%20Online%20Video%20Player%20%7C%20Video%20Hosting 00:00:48.764 0.169 829 200 GET 200 image/gif
RES: Configuring limits of requests/sessions/threads in Tomcat
Hello Chritopher, You make score. Exactly, I am waiting 500 users on the peak time. The archive is in a separated storage in our environment. So, I think that it is not a limiting factor. I will try some maxthreads configurations and stress situations to see if the server will could handle 500 users. If necessary I can increase the server memory and processing, we have robust cluster. Actually the server has 4 cores and 8gb of memory. At the same time, I am analyzing with security team if we could liberate a specific video in youtube in order to instead use JWPlayer the site use an embedded youtube video, so I take off the responsibility of tomcat to deliver the video and I can sleep in peace. hahha Thank you all! Grupo Energisa Danilo A. Oliveira Analista Suporte Aplicacao TI - DPTO CORP. DE INFRAESTR. TI e-mail: danilo.olive...@energisa.com.br | tel: (32) 3429-6342 | cel: (32) 8452-9478 Esta mensagem contém informação confidencial. Se você a recebeu por engano, não divulgue ou copie seu conteúdo. Por favor, avise ao remetente imediatamente e apague-a do computador. Privileged and confidential. If this message has been received by mistake, do not disclose or copy its contents. Please notify sender and delete immediately. -Mensagem original- De: Christopher Schultz [mailto:ch...@christopherschultz.net] Enviada em: terça-feira, 1 de abril de 2014 18:32 Para: Tomcat Users List Assunto: Re: Configuring limits of requests/sessions/threads in Tomcat -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Danilo, On 4/1/14, 2:03 PM, Danilo Amaral de Oliveira wrote: Next week we will deploy a institutional video to all company (more than 5k users) in a webpage in an application manges by the Tomcat 7.0.40. I have made a stress test through JMeter, simulating a lot of simultaneous access, and when the simultaneous access reaches 100 users the application stop answering. What is your expected peak load? If you only need to handle 500 simultaneous users, then you should be fine. I would like to know if I can set a max number (80, for example) of requests (maxsession or threads, I dunno) in order to configure the tomcat to send a warning page advising the user that the server is loaded and try again in few minutes if the limits reach the maximum value. You can change the size of Tomcat's request processing pool. That's either maxConnections on your Connector or, better yet, maxThreads in your Executor. If you set maxThreads=80, then the 100th request will wait in a queue. You may get request timeouts at this point, which will be equivalent to the 100-user situation you describe above. What you really need is a CDN so your servers don't even handle the requests at all. Is there a place where you can upload your file that will be more scalable and/or faster? Something like Amazon S3 maybe? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTOzBFAAoJEBzwKT+lPKRYKjQP/0Ntz/ZT1ylSwMnFMCLFUDqC 4C0eFUXJvPXu3Rr9+EjoSPRbX7r3FN5JMrx4SmwBwfxZhsjiyXksUMNVvUlW0QeD CUtDsy4oYu3MM8BZqa2zqHtzDXQu8Qp8Hg3a5N0PQGWUqZCR/f2FOgR1fV+Zco2S Av7ioK67dC/u2elUoC/2oUJ1J4xXSLlVOFRKGNB1i/EmkpDLi07tyLs/L2Y9TmWQ VfUv5RETqdIA682OshfHJ5ViR5NbZKZVFwTA3H8+oPn5NtPBJ3UgT5hv4GmVYpgz m4S6O/8CRJz33q+tz9N35e8Fx5JnU8l4Nwn6AfOW0tgUX9JO6V0+x6W7bvCjSrlH vbmJYJjPynoP8Y1smAxGrNg8jwjQklTP5qTIRr2FBm2DZ0chJQYMAmbETShrYZu8 n4na84JJ67gEMD2LV+ym5k7ma6gVmfCw3inT12kXtiwzC+d8vyxzdvToCT589cCJ lRG5jhihpxPJTZtJ27db4ZxxgvG87ArQNhpvzEQCKnGa22/UkOaC56NZwzxbtfqb 64u7Ok+Jn6z8fJBMeq9lxILUVJTsbgfD3wx4WqNH+f1D2U+LsSPXrm8xmP5DS5hd KQ4GZUNT4kEApRCCSfqlzbi+BC2dwo7mm7zmhaMIV5Otu43Wda4fUpK2z+ZAwE35 YJJvZvdzD8LkeMFiQz4G =/hsP -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: RES: Configuring limits of requests/sessions/threads in Tomcat
Hi Danilo, On 04/02/2014 02:37 AM, Danilo Amaral de Oliveira wrote: Hello Chritopher, You make score. Exactly, I am waiting 500 users on the peak time. The archive is in a separated storage in our environment. So, I think that it is not a limiting factor. I will try some maxthreads configurations and stress situations to see if the server will could handle 500 users. If necessary I can increase the server memory and processing, we have robust cluster. Actually the server has 4 cores and 8gb of memory. First, this video is a static file right? If so, just put an nginx or such in front of you'r Tomcat, you dont need an application server for that, it's just like using a tank to shoot a mosquito :P At the same time, I am analyzing with security team if we could liberate a specific video in youtube in order to instead use JWPlayer the site use an embedded youtube video, so I take off the responsibility of tomcat to deliver the video and I can sleep in peace. hahha Well, this clever, bandwidth for free. Thank you all! Grupo Energisa Danilo A. Oliveira Analista Suporte Aplicacao TI - DPTO CORP. DE INFRAESTR. TI e-mail: danilo.olive...@energisa.com.br | tel: (32) 3429-6342 | cel: (32) 8452-9478 Esta mensagem contém informação confidencial. Se você a recebeu por engano, não divulgue ou copie seu conteúdo. Por favor, avise ao remetente imediatamente e apague-a do computador. Privileged and confidential. If this message has been received by mistake, do not disclose or copy its contents. Please notify sender and delete immediately. -Mensagem original- De: Christopher Schultz [mailto:ch...@christopherschultz.net] Enviada em: terça-feira, 1 de abril de 2014 18:32 Para: Tomcat Users List Assunto: Re: Configuring limits of requests/sessions/threads in Tomcat -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Danilo, On 4/1/14, 2:03 PM, Danilo Amaral de Oliveira wrote: Next week we will deploy a institutional video to all company (more than 5k users) in a webpage in an application manges by the Tomcat 7.0.40. I have made a stress test through JMeter, simulating a lot of simultaneous access, and when the simultaneous access reaches 100 users the application stop answering. What is your expected peak load? If you only need to handle 500 simultaneous users, then you should be fine. I would like to know if I can set a max number (80, for example) of requests (maxsession or threads, I dunno) in order to configure the tomcat to send a warning page advising the user that the server is loaded and try again in few minutes if the limits reach the maximum value. You can change the size of Tomcat's request processing pool. That's either maxConnections on your Connector or, better yet, maxThreads in your Executor. If you set maxThreads=80, then the 100th request will wait in a queue. You may get request timeouts at this point, which will be equivalent to the 100-user situation you describe above. What you really need is a CDN so your servers don't even handle the requests at all. Is there a place where you can upload your file that will be more scalable and/or faster? Something like Amazon S3 maybe? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTOzBFAAoJEBzwKT+lPKRYKjQP/0Ntz/ZT1ylSwMnFMCLFUDqC 4C0eFUXJvPXu3Rr9+EjoSPRbX7r3FN5JMrx4SmwBwfxZhsjiyXksUMNVvUlW0QeD CUtDsy4oYu3MM8BZqa2zqHtzDXQu8Qp8Hg3a5N0PQGWUqZCR/f2FOgR1fV+Zco2S Av7ioK67dC/u2elUoC/2oUJ1J4xXSLlVOFRKGNB1i/EmkpDLi07tyLs/L2Y9TmWQ VfUv5RETqdIA682OshfHJ5ViR5NbZKZVFwTA3H8+oPn5NtPBJ3UgT5hv4GmVYpgz m4S6O/8CRJz33q+tz9N35e8Fx5JnU8l4Nwn6AfOW0tgUX9JO6V0+x6W7bvCjSrlH vbmJYJjPynoP8Y1smAxGrNg8jwjQklTP5qTIRr2FBm2DZ0chJQYMAmbETShrYZu8 n4na84JJ67gEMD2LV+ym5k7ma6gVmfCw3inT12kXtiwzC+d8vyxzdvToCT589cCJ lRG5jhihpxPJTZtJ27db4ZxxgvG87ArQNhpvzEQCKnGa22/UkOaC56NZwzxbtfqb 64u7Ok+Jn6z8fJBMeq9lxILUVJTsbgfD3wx4WqNH+f1D2U+LsSPXrm8xmP5DS5hd KQ4GZUNT4kEApRCCSfqlzbi+BC2dwo7mm7zmhaMIV5Otu43Wda4fUpK2z+ZAwE35 YJJvZvdzD8LkeMFiQz4G =/hsP -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: RES: Configuring limits of requests/sessions/threads in Tomcat
On Tue, Apr 1, 2014 at 9:30 PM, Frederik Nosi frederik.n...@postecom.itwrote: If so, just put an nginx or such in front of you'r Tomcat, you dont need an application server for that, it's just like using a tank to shoot a mosquito :P Wow, LOL!