You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Giancarlo Celli <gi...@flottaweb.com> on 2019/12/23 17:45:13 UTC

How to set apache load balancer for send request to 6 tomcat server

Hi,
I need to configure a load balancer with apache connector on a jelastic 
server that redirects requests to 6 server workers with tomcat 7 
installed.
Atteched you can find extract from httpd.conf and workers.properties.
I need to send single request to tomcat server individually, so I set 
sticky_session to 0.
Could you tell me if parameters are configured correctly?
Is the collector able to handle all requests?
Could you give me some further advice?

Each tomcat server is configured with the following parameters:

     <Connector port="80" protocol="HTTP/1.1"
                maxThreads="400"
                connectionTimeout="20000"
                redirectPort="8443" />

The balancer has the following configuration:
Server version: Apache/2.4.39 (codeit)
Server built:   Apr  3 2019 18:54:14
Architecture:   64-bit
Server MPM:     event
   threaded:     yes (fixed thread count)
     forked:     yes (variable process count)


Thanks.
Best regards.

Re: How to set apache load balancer for send request to 6 tomcat server

Posted by Zahid Rahman <za...@gmail.com>.
Your home page is in Italian
https://www.flottaweb.com/en/

While your login page is in English
https://www.flottaweb.com/en/login/


On Mon, 23 Dec 2019, 17:45 Giancarlo Celli, <gi...@flottaweb.com>
wrote:

> Hi,
> I need to configure a load balancer with apache connector on a jelastic
> server that redirects requests to 6 server workers with tomcat 7 installed.
> Atteched you can find extract from httpd.conf and workers.properties.
> I need to send single request to tomcat server individually, so I set
> sticky_session to 0.
> Could you tell me if parameters are configured correctly?
> Is the collector able to handle all requests?
> Could you give me some further advice?
>
> Each tomcat server is configured with the following parameters:
>
>     <Connector port="80" protocol="HTTP/1.1"
>                maxThreads="400"
>                connectionTimeout="20000"
>                redirectPort="8443" />
>
> The balancer has the following configuration:
> Server version: Apache/2.4.39 (codeit)
> Server built:   Apr  3 2019 18:54:14
> Architecture:   64-bit
> Server MPM:     event
>   threaded:     yes (fixed thread count)
>     forked:     yes (variable process count)
>
>
> Thanks.
> Best regards.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

Re: [OT] Re: How to set apache load balancer for send request to 6 tomcat server

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Zahid,

On 12/27/19 10:33, Zahid Rahman wrote:
> Good,  please expand

Please ask a separate wquestion on the list so we don't hijack this
thread.

- -chris

> On Fri, 27 Dec 2019, 15:27 Christopher Schultz, < 
> chris@christopherschultz.net> wrote:
> 
> Zahid,
> 
> On 12/23/19 15:19, Zahid Rahman wrote:
>>>> If your backend tomcat servers are running on different
>>>> physical machines therefore with different ip addresses then
>>>> there is nothing wrong with each backend  tomcat server
>>>> listening on same port (80) of each machine. Further to
>>>> mod_jk worker properties file redirection.
>>>> 
>>>> It is pointless in having multiple tomcat instances running
>>>> on same machine , because the kernel will slice and share
>>>> resources as per priority level setting of OS.
> 
> I disagree. There are use-cases for running multiple Tomcat
> instances on the same machine.
> 
>>>> If you don't have heavy user activity expectations   then
>>>> this excercise is pointless.
> 
> ?
> 
> -chris
> 
>>>> On Mon, 23 Dec 2019, 17:45 Giancarlo Celli, 
>>>> <gi...@flottaweb.com> wrote:
>>>> 
>>>>> Hi, I need to configure a load balancer with apache
>>>>> connector on a jelastic server that redirects requests to 6
>>>>> server workers with tomcat 7 installed. Atteched you can
>>>>> find extract from httpd.conf and workers.properties. I need
>>>>> to send single request to tomcat server individually, so I
>>>>> set sticky_session to 0. Could you tell me if parameters
>>>>> are configured correctly? Is the collector able to handle
>>>>> all requests? Could you give me some further advice?
>>>>> 
>>>>> Each tomcat server is configured with the following
>>>>> parameters:
>>>>> 
>>>>> <Connector port="80" protocol="HTTP/1.1" maxThreads="400" 
>>>>> connectionTimeout="20000" redirectPort="8443" />
>>>>> 
>>>>> The balancer has the following configuration: Server
>>>>> version: Apache/2.4.39 (codeit) Server built:   Apr  3 2019
>>>>> 18:54:14 Architecture:   64-bit Server MPM:     event
>>>>> threaded:     yes (fixed thread count) forked:     yes
>>>>> (variable process count)
>>>>> 
>>>>> 
>>>>> Thanks. Best regards.
>>>>> 
>>>>> 
>>>>> ------------------------------------------------------------------
- ---
>>>>>
>>>>>
>
>>>>> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail:
>>>>> users-help@tomcat.apache.org
>>>> 
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
> 
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4LaYgACgkQHPApP6U8
pFgQ/g//VkvlaYWhD0j7sUfHaPFgClm/cShsvALKF5m833uaMpv/MEyRlNw7338Z
rYzn5XxLTEKA65JmpNEtGK8XxmnH8bq+o/p3a43JO7SeEqVuat34G5DFTm95PHy5
18lI1g4iRdskAINn12t2OB+hgeKyUZmm8wtQl+2IxVd2PJlmz0jQXfAQk/L+410w
Tj0E6NHZ8YIVr7euKLah8S44bbPKIMpmEkU0B+iGXQ3V7D2h6NiTDE6EWpUMcwg3
lbfsGM88UQsaAQYHSZkYCZeMbBEQTL6GP10VtcsYNa/BDo1X2QbX3C5SH7ffKP0z
ZQEBanFmM8qIYjTMwf47AjIwboXKxA/Y5bMvcB1l7sshKYLZOsuPNUH5caCYL9Lc
+6/VJ8eYlhcM1hJAIQ6qMM0fvhfaaNR4HJTsOEQIPSzrT1ctAiyrmxLQKih1qY01
WAaZ0UE/gACYeqmRjGaTPrznBQI6cHKvDoZEdX9kW7pm3MrKaMZ/WeWJpFZiwVUb
QhG/NDqRjHs3hi8X0qqxNWGWhW1KX9YPV5xBacvURdrbeoYysZKsf+qWyFy+vtSI
pefwbzYWZCWiBQ4/RYP+QDkC23iy1k28i0n8X9//s0xbgQBQrjX7fv/Jt7EGbmcX
cd8sR2mr6JUZkb/GSZjhUsFPuelTgskPhKFxy23iz+QtMLv3UqI=
=gVmH
-----END PGP SIGNATURE-----

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


Re: [OT] Re: How to set apache load balancer for send request to 6 tomcat server

Posted by Zahid Rahman <za...@gmail.com>.
Good,  please expand

On Fri, 27 Dec 2019, 15:27 Christopher Schultz, <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Zahid,
>
> On 12/23/19 15:19, Zahid Rahman wrote:
> > If your backend tomcat servers are running on different physical
> > machines therefore with different ip addresses then there is
> > nothing wrong with each backend  tomcat server listening on same
> > port (80) of each machine. Further to mod_jk worker properties file
> > redirection.
> >
> > It is pointless in having multiple tomcat instances running on same
> > machine , because the kernel will slice and share resources as per
> > priority level setting of OS.
>
> I disagree. There are use-cases for running multiple Tomcat instances
> on the same machine.
>
> > If you don't have heavy user activity expectations   then this
> > excercise is pointless.
>
> ?
>
> - -chris
>
> > On Mon, 23 Dec 2019, 17:45 Giancarlo Celli,
> > <gi...@flottaweb.com> wrote:
> >
> >> Hi, I need to configure a load balancer with apache connector on
> >> a jelastic server that redirects requests to 6 server workers
> >> with tomcat 7 installed. Atteched you can find extract from
> >> httpd.conf and workers.properties. I need to send single request
> >> to tomcat server individually, so I set sticky_session to 0.
> >> Could you tell me if parameters are configured correctly? Is the
> >> collector able to handle all requests? Could you give me some
> >> further advice?
> >>
> >> Each tomcat server is configured with the following parameters:
> >>
> >> <Connector port="80" protocol="HTTP/1.1" maxThreads="400"
> >> connectionTimeout="20000" redirectPort="8443" />
> >>
> >> The balancer has the following configuration: Server version:
> >> Apache/2.4.39 (codeit) Server built:   Apr  3 2019 18:54:14
> >> Architecture:   64-bit Server MPM:     event threaded:     yes
> >> (fixed thread count) forked:     yes (variable process count)
> >>
> >>
> >> Thanks. Best regards.
> >>
> >>
> >> ---------------------------------------------------------------------
> >>
> >>
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >
> -----BEGIN PGP SIGNATURE-----
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4GIuwACgkQHPApP6U8
> pFgmQA//aMZLwDbtop83M7HTtM2P8vXzO7Z1cbvu5NA8yvt4IjMBA9WyrJ+XYhDn
> pRHJP2S0LTLmWrZ3n8o2QpdUGkMwWwpnhuHsr1zqzwhIxWtB1tmBoIgkueM92Yk1
> wXOHuy+PRlXGTRkujprb6bwUH2OxGp3Z6w3X1kqdvgJtZ6ZydBFD+eDv0epOSPay
> z3gvFraikSSY6IAf2y3gI/FTMT8kjUmo+M9TnnZ2Lbjmaxg/abmRa1rypcaMLXPf
> DjlQ0SAJtu2lS4wtQphY1beAsP2l/EXlMPaWIy2HbbaTBmZNtevM21OyxsWAdXQH
> SNmPDIC0AycTJfpeeB3tUbAtPVBKUkoOoaMLEkuAp1JdqnrW1KGH71cAvDkdJIBK
> 7b8mXTE07/mVpak4XhIqfdEkTLI+QWpYDIds6xWPYFokNtfevD6ZIBjbtNyqFcgE
> CEFHOkiM9JtzEOLJu24bS6MAbeYx4TnkvcZZF3hd79/Cxbusw2rlTZEvvKSSDXUn
> tWi4/xeTq1o8slmWf+A241qrr4SyHdOR8XVMUT4RvXSCcmBdkh0UDsxaMXLyx/AK
> yg7BxhU8d2OTmOfsFzRMCYZOpw+P+a5zE+3lNkeTbLuIamn9igKm/E7msd/enK4Z
> yHWd7tof+JXHGyhtYsBlr8tM8cm9pS2R02kLHAr34s7t0TjL9D4=
> =qkR+
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

[OT] Re: How to set apache load balancer for send request to 6 tomcat server

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Zahid,

On 12/23/19 15:19, Zahid Rahman wrote:
> If your backend tomcat servers are running on different physical
> machines therefore with different ip addresses then there is
> nothing wrong with each backend  tomcat server listening on same
> port (80) of each machine. Further to mod_jk worker properties file
> redirection.
> 
> It is pointless in having multiple tomcat instances running on same
> machine , because the kernel will slice and share resources as per
> priority level setting of OS.

I disagree. There are use-cases for running multiple Tomcat instances
on the same machine.

> If you don't have heavy user activity expectations   then this
> excercise is pointless.

?

- -chris

> On Mon, 23 Dec 2019, 17:45 Giancarlo Celli,
> <gi...@flottaweb.com> wrote:
> 
>> Hi, I need to configure a load balancer with apache connector on
>> a jelastic server that redirects requests to 6 server workers
>> with tomcat 7 installed. Atteched you can find extract from
>> httpd.conf and workers.properties. I need to send single request
>> to tomcat server individually, so I set sticky_session to 0. 
>> Could you tell me if parameters are configured correctly? Is the
>> collector able to handle all requests? Could you give me some
>> further advice?
>> 
>> Each tomcat server is configured with the following parameters:
>> 
>> <Connector port="80" protocol="HTTP/1.1" maxThreads="400" 
>> connectionTimeout="20000" redirectPort="8443" />
>> 
>> The balancer has the following configuration: Server version:
>> Apache/2.4.39 (codeit) Server built:   Apr  3 2019 18:54:14 
>> Architecture:   64-bit Server MPM:     event threaded:     yes
>> (fixed thread count) forked:     yes (variable process count)
>> 
>> 
>> Thanks. Best regards.
>> 
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
> 
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4GIuwACgkQHPApP6U8
pFgmQA//aMZLwDbtop83M7HTtM2P8vXzO7Z1cbvu5NA8yvt4IjMBA9WyrJ+XYhDn
pRHJP2S0LTLmWrZ3n8o2QpdUGkMwWwpnhuHsr1zqzwhIxWtB1tmBoIgkueM92Yk1
wXOHuy+PRlXGTRkujprb6bwUH2OxGp3Z6w3X1kqdvgJtZ6ZydBFD+eDv0epOSPay
z3gvFraikSSY6IAf2y3gI/FTMT8kjUmo+M9TnnZ2Lbjmaxg/abmRa1rypcaMLXPf
DjlQ0SAJtu2lS4wtQphY1beAsP2l/EXlMPaWIy2HbbaTBmZNtevM21OyxsWAdXQH
SNmPDIC0AycTJfpeeB3tUbAtPVBKUkoOoaMLEkuAp1JdqnrW1KGH71cAvDkdJIBK
7b8mXTE07/mVpak4XhIqfdEkTLI+QWpYDIds6xWPYFokNtfevD6ZIBjbtNyqFcgE
CEFHOkiM9JtzEOLJu24bS6MAbeYx4TnkvcZZF3hd79/Cxbusw2rlTZEvvKSSDXUn
tWi4/xeTq1o8slmWf+A241qrr4SyHdOR8XVMUT4RvXSCcmBdkh0UDsxaMXLyx/AK
yg7BxhU8d2OTmOfsFzRMCYZOpw+P+a5zE+3lNkeTbLuIamn9igKm/E7msd/enK4Z
yHWd7tof+JXHGyhtYsBlr8tM8cm9pS2R02kLHAr34s7t0TjL9D4=
=qkR+
-----END PGP SIGNATURE-----

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


Re: How to set apache load balancer for send request to 6 tomcat server

Posted by Zahid Rahman <za...@gmail.com>.
If your backend tomcat servers are running on different physical machines
therefore with different ip addresses then there is nothing wrong with each
backend  tomcat server listening on same port (80) of each machine. Further
to mod_jk worker properties file redirection.

It is pointless in having multiple tomcat instances running on same machine
, because the kernel will slice and share resources as per priority level
setting of OS.

If you don't have heavy user activity expectations   then this excercise is
pointless.


On Mon, 23 Dec 2019, 17:45 Giancarlo Celli, <gi...@flottaweb.com>
wrote:

> Hi,
> I need to configure a load balancer with apache connector on a jelastic
> server that redirects requests to 6 server workers with tomcat 7 installed.
> Atteched you can find extract from httpd.conf and workers.properties.
> I need to send single request to tomcat server individually, so I set
> sticky_session to 0.
> Could you tell me if parameters are configured correctly?
> Is the collector able to handle all requests?
> Could you give me some further advice?
>
> Each tomcat server is configured with the following parameters:
>
>     <Connector port="80" protocol="HTTP/1.1"
>                maxThreads="400"
>                connectionTimeout="20000"
>                redirectPort="8443" />
>
> The balancer has the following configuration:
> Server version: Apache/2.4.39 (codeit)
> Server built:   Apr  3 2019 18:54:14
> Architecture:   64-bit
> Server MPM:     event
>   threaded:     yes (fixed thread count)
>     forked:     yes (variable process count)
>
>
> Thanks.
> Best regards.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

Re: Re[2]: How to set apache load balancer for send request to 6 tomcat server

Posted by Zahid Rahman <za...@gmail.com>.
This is what a typical workers.properties file look like.this is not same
as your configuration

*Workers properties*
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
worker.list=balancer,status

worker.tomcat1.type=ajp13
worker.tomcat1.port=8009
worker.tomcat1.host=localhost

worker.tomcat2.type=ajp13
worker.tomcat2.port=8010
worker.tomcat2.host=localhost

worker.tomcat3.type=ajp13
worker.tomcat3.port=8011
worker.tomcat3.host=localhost


worker.balancer.type=lb
worker.balancer.balance_workers=tomcat1,tomcat2,tomcat3

worker.status.type=status

On Tue, 24 Dec 2019, 09:17 Giancarlo Celli, <gi...@flottaweb.com>
wrote:

> Thanks for the reply.
> More than anything else my question is to know if the configuration
> parameters of the various threads, connections, etc. they are set up well
> or if they could somehow down the service.
> And if you recommend any changes to optimize the service itself.
> He again attached the files with the extracts of the configurations
> Thanks.
> Best regards.
> Giancarlo
>
>
> ------ Messaggio originale ------
> Da: "Zahid Rahman" <za...@gmail.com>
> A: "Tomcat Users List" <us...@tomcat.apache.org>; "Giancarlo Celli" <
> giancarlo.celli@flottaweb.com>
> Inviato: 23/12/2019 23:56:41
> Oggetto: Re: How to set apache load balancer for send request to 6 tomcat
> server
>
> If you wish we can work the problem , piece by piece through logical
> construction of the solution.
>
>
>
> On Mon, 23 Dec 2019, 17:45 Giancarlo Celli, <giancarlo.celli@flottaweb.com
> >
> wrote:
>
>
> Hi,
> I need to configure a load balancer with apache connector on a jelastic
> server that redirects requests to 6 server workers with tomcat 7 installed.
> Atteched you can find extract from httpd.conf and workers.properties.
> I need to send single request to tomcat server individually, so I set
> sticky_session to 0.
> Could you tell me if parameters are configured correctly?
> Is the collector able to handle all requests?
> Could you give me some further advice?
>
> Each tomcat server is configured with the following parameters:
>
> <Connector port="80" protocol="HTTP/1.1"
> maxThreads="400"
> connectionTimeout="20000"
> redirectPort="8443" />
>
> The balancer has the following configuration:
> Server version: Apache/2.4.39 (codeit)
> Server built: Apr 3 2019 18:54:14
> Architecture: 64-bit
> Server MPM: event
> threaded: yes (fixed thread count)
> forked: yes (variable process count)
>
>
> Thanks.
> Best regards.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

Re: Re[2]: How to set apache load balancer for send request to 6 tomcat server

Posted by Zahid Rahman <za...@gmail.com>.
Load balancing Algorithms

https://youtu.be/iqOTT7_7qXY

On Tue, 24 Dec 2019, 10:06 Zahid Rahman, <za...@gmail.com> wrote:

> There is a really great series of videos on this subject. He is
> referencing tomcat Apache website.
> If you speak German
>
> https://youtu.be/mQKZ8-EfBHU
>
> On Tue, 24 Dec 2019, 09:17 Giancarlo Celli, <gi...@flottaweb.com>
> wrote:
>
>> Thanks for the reply.
>> More than anything else my question is to know if the configuration
>> parameters of the various threads, connections, etc. they are set up well
>> or if they could somehow down the service.
>> And if you recommend any changes to optimize the service itself.
>> He again attached the files with the extracts of the configurations
>> Thanks.
>> Best regards.
>> Giancarlo
>>
>>
>> ------ Messaggio originale ------
>> Da: "Zahid Rahman" <za...@gmail.com>
>> A: "Tomcat Users List" <us...@tomcat.apache.org>; "Giancarlo Celli" <
>> giancarlo.celli@flottaweb.com>
>> Inviato: 23/12/2019 23:56:41
>> Oggetto: Re: How to set apache load balancer for send request to 6 tomcat
>> server
>>
>> If you wish we can work the problem , piece by piece through logical
>> construction of the solution.
>>
>>
>>
>> On Mon, 23 Dec 2019, 17:45 Giancarlo Celli, <
>> giancarlo.celli@flottaweb.com>
>> wrote:
>>
>>
>> Hi,
>> I need to configure a load balancer with apache connector on a jelastic
>> server that redirects requests to 6 server workers with tomcat 7
>> installed.
>> Atteched you can find extract from httpd.conf and workers.properties.
>> I need to send single request to tomcat server individually, so I set
>> sticky_session to 0.
>> Could you tell me if parameters are configured correctly?
>> Is the collector able to handle all requests?
>> Could you give me some further advice?
>>
>> Each tomcat server is configured with the following parameters:
>>
>> <Connector port="80" protocol="HTTP/1.1"
>> maxThreads="400"
>> connectionTimeout="20000"
>> redirectPort="8443" />
>>
>> The balancer has the following configuration:
>> Server version: Apache/2.4.39 (codeit)
>> Server built: Apr 3 2019 18:54:14
>> Architecture: 64-bit
>> Server MPM: event
>> threaded: yes (fixed thread count)
>> forked: yes (variable process count)
>>
>>
>> Thanks.
>> Best regards.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Re[2]: How to set apache load balancer for send request to 6 tomcat server

Posted by Zahid Rahman <za...@gmail.com>.
There is a really great series of videos on this subject. He is referencing
tomcat Apache website.
If you speak German

https://youtu.be/mQKZ8-EfBHU

On Tue, 24 Dec 2019, 09:17 Giancarlo Celli, <gi...@flottaweb.com>
wrote:

> Thanks for the reply.
> More than anything else my question is to know if the configuration
> parameters of the various threads, connections, etc. they are set up well
> or if they could somehow down the service.
> And if you recommend any changes to optimize the service itself.
> He again attached the files with the extracts of the configurations
> Thanks.
> Best regards.
> Giancarlo
>
>
> ------ Messaggio originale ------
> Da: "Zahid Rahman" <za...@gmail.com>
> A: "Tomcat Users List" <us...@tomcat.apache.org>; "Giancarlo Celli" <
> giancarlo.celli@flottaweb.com>
> Inviato: 23/12/2019 23:56:41
> Oggetto: Re: How to set apache load balancer for send request to 6 tomcat
> server
>
> If you wish we can work the problem , piece by piece through logical
> construction of the solution.
>
>
>
> On Mon, 23 Dec 2019, 17:45 Giancarlo Celli, <giancarlo.celli@flottaweb.com
> >
> wrote:
>
>
> Hi,
> I need to configure a load balancer with apache connector on a jelastic
> server that redirects requests to 6 server workers with tomcat 7 installed.
> Atteched you can find extract from httpd.conf and workers.properties.
> I need to send single request to tomcat server individually, so I set
> sticky_session to 0.
> Could you tell me if parameters are configured correctly?
> Is the collector able to handle all requests?
> Could you give me some further advice?
>
> Each tomcat server is configured with the following parameters:
>
> <Connector port="80" protocol="HTTP/1.1"
> maxThreads="400"
> connectionTimeout="20000"
> redirectPort="8443" />
>
> The balancer has the following configuration:
> Server version: Apache/2.4.39 (codeit)
> Server built: Apr 3 2019 18:54:14
> Architecture: 64-bit
> Server MPM: event
> threaded: yes (fixed thread count)
> forked: yes (variable process count)
>
>
> Thanks.
> Best regards.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

Re[2]: How to set apache load balancer for send request to 6 tomcat server

Posted by Giancarlo Celli <gi...@flottaweb.com>.
Thanks for the reply.
More than anything else my question is to know if the configuration 
parameters of the various threads, connections, etc. they are set up 
well or if they could somehow down the service.
And if you recommend any changes to optimize the service itself.
He again attached the files with the extracts of the configurations
Thanks.
Best regards.
Giancarlo


------ Messaggio originale ------
Da: "Zahid Rahman" <za...@gmail.com>
A: "Tomcat Users List" <us...@tomcat.apache.org>; "Giancarlo Celli" 
<gi...@flottaweb.com>
Inviato: 23/12/2019 23:56:41
Oggetto: Re: How to set apache load balancer for send request to 6 
tomcat server

>If you wish we can work the problem , piece by piece through logical
>construction of the solution.
>
>
>
>On Mon, 23 Dec 2019, 17:45 Giancarlo Celli, <gi...@flottaweb.com>
>wrote:
>
>>  Hi,
>>  I need to configure a load balancer with apache connector on a jelastic
>>  server that redirects requests to 6 server workers with tomcat 7 installed.
>>  Atteched you can find extract from httpd.conf and workers.properties.
>>  I need to send single request to tomcat server individually, so I set
>>  sticky_session to 0.
>>  Could you tell me if parameters are configured correctly?
>>  Is the collector able to handle all requests?
>>  Could you give me some further advice?
>>
>>  Each tomcat server is configured with the following parameters:
>>
>>      <Connector port="80" protocol="HTTP/1.1"
>>                 maxThreads="400"
>>                 connectionTimeout="20000"
>>                 redirectPort="8443" />
>>
>>  The balancer has the following configuration:
>>  Server version: Apache/2.4.39 (codeit)
>>  Server built:   Apr  3 2019 18:54:14
>>  Architecture:   64-bit
>>  Server MPM:     event
>>    threaded:     yes (fixed thread count)
>>      forked:     yes (variable process count)
>>
>>
>>  Thanks.
>>  Best regards.
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>  For additional commands, e-mail: users-help@tomcat.apache.org

Re: How to set apache load balancer for send request to 6 tomcat server

Posted by Zahid Rahman <za...@gmail.com>.
If you wish we can work the problem , piece by piece through logical
construction of the solution.



On Mon, 23 Dec 2019, 17:45 Giancarlo Celli, <gi...@flottaweb.com>
wrote:

> Hi,
> I need to configure a load balancer with apache connector on a jelastic
> server that redirects requests to 6 server workers with tomcat 7 installed.
> Atteched you can find extract from httpd.conf and workers.properties.
> I need to send single request to tomcat server individually, so I set
> sticky_session to 0.
> Could you tell me if parameters are configured correctly?
> Is the collector able to handle all requests?
> Could you give me some further advice?
>
> Each tomcat server is configured with the following parameters:
>
>     <Connector port="80" protocol="HTTP/1.1"
>                maxThreads="400"
>                connectionTimeout="20000"
>                redirectPort="8443" />
>
> The balancer has the following configuration:
> Server version: Apache/2.4.39 (codeit)
> Server built:   Apr  3 2019 18:54:14
> Architecture:   64-bit
> Server MPM:     event
>   threaded:     yes (fixed thread count)
>     forked:     yes (variable process count)
>
>
> Thanks.
> Best regards.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

Re: How to set apache load balancer for send request to 6 tomcat server

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Giancarlo,

On 12/30/19 12:11, Giancarlo Celli wrote:
> Hi Chris, to avoid any kind of overload, I would like every single
> request to be forwarded to a backend server.

Session stickiness only determines WHICH backend server your request
will be routed to. If your session gets mapped to a server which has
failed, that request will fail-over to another server.

The advantage to sticky-sessions is two-fold:

1. When not clustering and user-sessions are required (i.e. for
login), then sticky-sessions are REQUIRED

2. When clustering sessions, sticky-sessions are also REQUIRED to
ensure that the same session object is being used for all requests,
limiting the possibility of race-conditions. There is no cross-cluster
synchronization to prevent simultaneous access to the same session on
two different nodes.

I can't really see a use-case for NOT using sticky-sessions unless you
have HUGE, bursty-load and the contents of the session aren't very
important. (Or you are using a non-standard session-manager.)

> I attach the files again hoping you can view them correctly. I
> await your suggestions.

A few thoughts:

> worker.node1.ping_mode=P

This will cause a ping to be sent for every request, but no periodic
checks will be made. It probably doesn't matter much, but you may want
to start with ping_mode=A and reduce the frequency if you observe any
performance problems.

> worker.node1.ping_timeout=10000

10s is a long time. Do you want to wait 10s for a request to fail-over
to another server?

> worker.node1.lbfactor=1 worker.node1.socket_timeout=30

Same here: 30s is a long time. You may wait 30 seconds for a back-end
server to fail to respond to a request. Or maybe you have some
requests you expect to take as much as 30 seconds?

> worker.node1.connection_pool_timeout=20 
> worker.node1.recover_time=5

> <Connector port="80" protocol="HTTP/1.1" maxThreads="400" 
> connectionTimeout="20000" redirectPort="8443" />

Good: connectionTimeout == connection_pool_timeout

Everything looks okay to me. Are you having any specific problems, or
are you just asking if everything looks reasonable?

- -chris

> ------ Messaggio originale ------ Da: "Christopher Schultz"
> <chris@christopherschultz.net 
> <ma...@christopherschultz.net>> A: users@tomcat.apache.org
> <ma...@tomcat.apache.org> Inviato: 27/12/2019 16:29:28 
> Oggetto: Re: How to set apache load balancer for send request to 6 
> tomcat server
> 
>> Firma ha problemi -----BEGIN PGP SIGNED MESSAGE-----<br />Hash:
>> SHA256<br /><br />Giancarlo,<br /><br />On 12/23/19 12:45,
>> Giancarlo Celli wrote:<br />&gt; Hi, I need to configure a load
>> balancer with apache connector on a<br />&gt; jelastic server
>> that redirects requests to 6 server workers with<br />&gt; tomcat
>> 7 installed. Atteched you can find extract from httpd.conf<br
>> />&gt; and workers.properties. I need to send single request to
>> tomcat<br />&gt; server individually, so I set sticky_session to
>> 0.<br /><br />So you want your clients to switch servers even
>> when they don't have to?<br /><br />&gt; Could you tell me if
>> parameters are configured correctly? Is the<br />&gt; collector 
>> able to handle all requests? Could you give me some<br />&gt;
>> further advice?<br />&gt; <br />&gt; Each tomcat server is
>> configured with the following parameters:<br />&gt; <br />&gt;
>> &lt;Connector port="80" protocol="HTTP/1.1" maxThreads="400" <br
>> />&gt; connectionTimeout="20000" redirectPort="8443" /&gt;<br
>> />&gt; <br />&gt; The balancer has the following configuration:
>> Server version:<br />&gt; Apache/2.4.39 (codeit) Server built:
>> Apr 3 2019 18:54:14 <br />&gt; Architecture: 64-bit Server MPM:
>> event threaded: yes<br />&gt; (fixed thread count) forked: yes
>> (variable process count)<br /><br />Your attachments were
>> stripped. Can you please post an example worker<br />and your
>> JkMounts from httpd.conf? We don't need the whole httpd.conf.<br
>> /><br />- -chris<br />-----BEGIN PGP SIGNATURE-----<br />Comment:
>> Using GnuPG with Thunderbird - https://www.enigmail.net/<br
>> /><br 
>> />iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4GI1cACgkQHPApP6U8<br
>>
>> 
/>pFjHPhAAyDpqNcDm5AIe+QcsF/dB0rEfWSrfXY3DFZUjvJVTLfeqhUxS+gKNbHBf<br
>> />iXhbxnXiFVMkHqgWxcMlrsQMGK5wWL00HCOrlijGbJYa52QCn2aLFJ6buf5kU+Cy<br
>>
>> 
/>SAXOIBbpz4x12QEU6x2LJGAEXa8fMx96xyTXl0SAiWQqQ/EtVw/0y+b5h97Zpej5<br
>> />kxR04IyOMDfqyEMVeKUVQNr46yZmscHE3r9Bo49mVqmLjD8a/tzHZybTuFVeW6xj<br
>>
>> 
/>lILNuPwBL+cMz5ImqfW3qQUKyKLC6Bo9gdeamIXYg4z/66XwFmBUTP/mcTf0Up67<br
>> />rbaJWgg8Si2exZhRJeB5z51hZiEXGWldkBljvwUjevZcjo9dEqvFCY7KtxdkuA/b<br
>>
>> 
/>ZWAyxaTJkRvzusJrRItdV6m66q5aLUKehPTeIe5zm0V10Ttfc6qOpncfULQh0d1N<br
>> />Ic719F1UKYOecqZXVqJJ+mDHhdMsulvWlV18if29riQe2mu+VUGlkjFYuxgm7TCp<br
>>
>> 
/>zKGzdDAI3v/9b5lLtKYqCDaIFjH0MnBjGo+x9gTvpvQRIrdC4OGPTiw8W3Urveln<br
>> />ZycUWihsb26vqaog7jJn6SLMJ/N8nVyw64Uc/slN3tCAIwHvzpu6dTVBEoXI6Jsx<br
>>
>> 
/>29Nqyx6B1tSXrSYXDN0PO7PmpBffS7LDEd1luYXqAtcUilgsb4Q=<br />=KK92<br
>> />-----END PGP SIGNATURE-----<br />
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> <ma...@tomcat.apache.org> For additional
>> commands, e-mail: users-help@tomcat.apache.org 
>> <ma...@tomcat.apache.org>
>> 
> 
> 
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4Lb5wACgkQHPApP6U8
pFiYBA/+KcOkhhrgwPM/cbRsl6wUEO3X6L1WAIYefjiT7OSDAnZs4na7C1ucpsOk
5Xpf7E7LE0tjujBTjOh3TQFSSMuKZq8otJSNJprVZDTWjQMFcTafO+pzcQ3ZDn0Q
CXyCOYvbCbt1Rj0ODb9FsyQla5968tAM4gMpRz0p+C2D5RetJ1jG1OnAFoLXAC9R
5dC/Tkt7dk9juyZjGbnVzVG94EOVYCMzsu7F3Ax/JGtNoPhq1k05xt8jCTRIFJIL
2RrscIUmV3ODaZAO1F6inyvpRHY3XbDmN0Vs1s8gACCCY6536ib51JSR4g0Ll+9h
lXx73DzNRNNktxa/CmpFaZS6q5Kz+u8MA7VOdtEnbkt2SJ8QPN+rQNrcFQJZEOI2
2tqb3wqPgUe9X2+5wbxVBXWdFaNMIbuz4yDWnRwVreKEClrwNWpOogJaIuza3k+s
yUC2+oAAnmVI7T8pomiOokpkiheF5nVbPcb69CzKGAYRyE4kodBclkVSfx0Dtd3K
9ZnZ6owb3xOSAwGBu/HMq9vrOK5pOON8J/z4j8Y51CoukYC8xgIAh02r0n+a1gJ+
h2SLsUE5Klf8sCJ9kOKHxLXzN7yw5XJro/oFrco+BuB52lokRZX5nJUC9qcJVn7b
Z3jcBEAwSheLu5y6KHr680feH8gAyqvneJ/Pvl+JHdlMLl5bIQg=
=6bpX
-----END PGP SIGNATURE-----

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


Re[2]: How to set apache load balancer for send request to 6 tomcat server

Posted by Giancarlo Celli <gi...@flottaweb.com>.
Hi Chris,
to avoid any kind of overload, I would like every single request to be 
forwarded to a backend server.
I attach the files again hoping you can view them correctly.
I await your suggestions.
Best regards.
Giancarlo


------ Messaggio originale ------
Da: "Christopher Schultz" <ch...@christopherschultz.net>
A: users@tomcat.apache.org
Inviato: 27/12/2019 16:29:28
Oggetto: Re: How to set apache load balancer for send request to 6 
tomcat server

>Firma ha problemi
>-----BEGIN PGP SIGNED MESSAGE-----<br />Hash: SHA256<br /><br 
>/>Giancarlo,<br /><br />On 12/23/19 12:45, Giancarlo Celli wrote:<br 
>/>&gt; Hi, I need to configure a load balancer with apache connector on 
>a<br />&gt; jelastic server that redirects requests to 6 server workers 
>with<br />&gt; tomcat 7 installed. Atteched you can find extract from 
>httpd.conf<br />&gt; and workers.properties. I need to send single 
>request to tomcat<br />&gt; server individually, so I set 
>sticky_session to 0.<br /><br />So you want your clients to switch 
>servers even when they don't have to?<br /><br />&gt; Could you tell me 
>if parameters are configured correctly? Is the<br />&gt; collector able 
>to handle all requests? Could you give me some<br />&gt; further 
>advice?<br />&gt; <br />&gt; Each tomcat server is configured with the 
>following parameters:<br />&gt; <br />&gt; &lt;Connector port="80" 
>protocol="HTTP/1.1" maxThreads="400" <br />&gt; 
>connectionTimeout="20000" redirectPort="8443" /&gt;<br />&gt; <br 
>/>&gt; The balancer has the following configuration: Server version:<br 
>/>&gt; Apache/2.4.39 (codeit) Server built: Apr 3 2019 18:54:14 <br 
>/>&gt; Architecture: 64-bit Server MPM: event threaded: yes<br />&gt; 
>(fixed thread count) forked: yes (variable process count)<br /><br 
>/>Your attachments were stripped. Can you please post an example 
>worker<br />and your JkMounts from httpd.conf? We don't need the whole 
>httpd.conf.<br /><br />- -chris<br />-----BEGIN PGP SIGNATURE-----<br 
>/>Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/<br 
>/><br 
>/>iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4GI1cACgkQHPApP6U8<br 
>/>pFjHPhAAyDpqNcDm5AIe+QcsF/dB0rEfWSrfXY3DFZUjvJVTLfeqhUxS+gKNbHBf<br 
>/>iXhbxnXiFVMkHqgWxcMlrsQMGK5wWL00HCOrlijGbJYa52QCn2aLFJ6buf5kU+Cy<br 
>/>SAXOIBbpz4x12QEU6x2LJGAEXa8fMx96xyTXl0SAiWQqQ/EtVw/0y+b5h97Zpej5<br 
>/>kxR04IyOMDfqyEMVeKUVQNr46yZmscHE3r9Bo49mVqmLjD8a/tzHZybTuFVeW6xj<br 
>/>lILNuPwBL+cMz5ImqfW3qQUKyKLC6Bo9gdeamIXYg4z/66XwFmBUTP/mcTf0Up67<br 
>/>rbaJWgg8Si2exZhRJeB5z51hZiEXGWldkBljvwUjevZcjo9dEqvFCY7KtxdkuA/b<br 
>/>ZWAyxaTJkRvzusJrRItdV6m66q5aLUKehPTeIe5zm0V10Ttfc6qOpncfULQh0d1N<br 
>/>Ic719F1UKYOecqZXVqJJ+mDHhdMsulvWlV18if29riQe2mu+VUGlkjFYuxgm7TCp<br 
>/>zKGzdDAI3v/9b5lLtKYqCDaIFjH0MnBjGo+x9gTvpvQRIrdC4OGPTiw8W3Urveln<br 
>/>ZycUWihsb26vqaog7jJn6SLMJ/N8nVyw64Uc/slN3tCAIwHvzpu6dTVBEoXI6Jsx<br 
>/>29Nqyx6B1tSXrSYXDN0PO7PmpBffS7LDEd1luYXqAtcUilgsb4Q=<br />=KK92<br 
>/>-----END PGP SIGNATURE-----<br />
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>

Re: How to set apache load balancer for send request to 6 tomcat server

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Giancarlo,

On 12/23/19 12:45, Giancarlo Celli wrote:
> Hi, I need to configure a load balancer with apache connector on a
> jelastic server that redirects requests to 6 server workers with
> tomcat 7 installed. Atteched you can find extract from httpd.conf
> and workers.properties. I need to send single request to tomcat
> server individually, so I set sticky_session to 0.

So you want your clients to switch servers even when they don't have to?

> Could you tell me if parameters are configured correctly? Is the
> collector able to handle all requests? Could you give me some
> further advice?
> 
> Each tomcat server is configured with the following parameters:
> 
> <Connector port="80" protocol="HTTP/1.1" maxThreads="400" 
> connectionTimeout="20000" redirectPort="8443" />
> 
> The balancer has the following configuration: Server version:
> Apache/2.4.39 (codeit) Server built:   Apr  3 2019 18:54:14 
> Architecture:   64-bit Server MPM:     event threaded:     yes
> (fixed thread count) forked:     yes (variable process count)

Your attachments were stripped. Can you please post an example worker
and your JkMounts from httpd.conf? We don't need the whole httpd.conf.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4GI1cACgkQHPApP6U8
pFjHPhAAyDpqNcDm5AIe+QcsF/dB0rEfWSrfXY3DFZUjvJVTLfeqhUxS+gKNbHBf
iXhbxnXiFVMkHqgWxcMlrsQMGK5wWL00HCOrlijGbJYa52QCn2aLFJ6buf5kU+Cy
SAXOIBbpz4x12QEU6x2LJGAEXa8fMx96xyTXl0SAiWQqQ/EtVw/0y+b5h97Zpej5
kxR04IyOMDfqyEMVeKUVQNr46yZmscHE3r9Bo49mVqmLjD8a/tzHZybTuFVeW6xj
lILNuPwBL+cMz5ImqfW3qQUKyKLC6Bo9gdeamIXYg4z/66XwFmBUTP/mcTf0Up67
rbaJWgg8Si2exZhRJeB5z51hZiEXGWldkBljvwUjevZcjo9dEqvFCY7KtxdkuA/b
ZWAyxaTJkRvzusJrRItdV6m66q5aLUKehPTeIe5zm0V10Ttfc6qOpncfULQh0d1N
Ic719F1UKYOecqZXVqJJ+mDHhdMsulvWlV18if29riQe2mu+VUGlkjFYuxgm7TCp
zKGzdDAI3v/9b5lLtKYqCDaIFjH0MnBjGo+x9gTvpvQRIrdC4OGPTiw8W3Urveln
ZycUWihsb26vqaog7jJn6SLMJ/N8nVyw64Uc/slN3tCAIwHvzpu6dTVBEoXI6Jsx
29Nqyx6B1tSXrSYXDN0PO7PmpBffS7LDEd1luYXqAtcUilgsb4Q=
=KK92
-----END PGP SIGNATURE-----

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