DevHeads.net

How to keep httpd balancer scoreboard persistant when MaxConnectionsPerChild set to non-zero?

Hi,

I am facing this issue that when MaxConnectionsPerChild set to non-zero, the httpd balancer scoreboard will reset whenever its child process recycled. Is there a way we can keep the scoreboard data persistant?

Thanks,
Mengchang

This message is confidential and subject to terms at: <a href="https://www.jpmorgan.com/emaildisclaimer" title="https://www.jpmorgan.com/emaildisclaimer">https://www.jpmorgan.com/emaildisclaimer</a> including on confidentiality, legal privilege, viruses and monitoring of electronic messages. If you are not the intended recipient, please delete this message and notify the sender immediately. Any unauthorized use is strictly prohibited.

Comments

Re: How to keep httpd balancer scoreboard persista

By Suvendu Sekhar ... at 03/11/2019 - 10:48

Mengchang,

On Mon, Mar 11, 2019 at 6:57 PM Chen, Mengchang
<mengchang. ... at jpmchase dot com.invalid> wrote:

RE: How to keep httpd balancer scoreboard persista

By Chen, Mengchang at 03/12/2019 - 09:01

Isn’t it the mod_proxy_balancer using mod_slotmem_shm to share data regarding to balancer within httpd processes? If httpd child process recycled(MaxConnectionsPerChild set to non-zero), why is data related to balancer lost?

Mengchang,

On Mon, Mar 11, 2019 at 6:57 PM Chen, Mengchang
<mengchang. ... at jpmchase dot com<mailto:mengchang. ... at jpmchase dot com>.invalid> wrote:
This message is confidential and subject to terms at: <a href="https://www.jpmorgan.com/emaildisclaimer" title="https://www.jpmorgan.com/emaildisclaimer">https://www.jpmorgan.com/emaildisclaimer</a> including on confidentiality, legal privilege, viruses and monitoring of electronic messages. If you are not the intended recipient, please delete this message and notify the sender immediately. Any unauthorized use is strictly prohibited.

Re: How to keep httpd balancer scoreboard persista

By Yann Ylavic at 03/12/2019 - 09:28

On Tue, Mar 12, 2019 at 2:01 PM Chen, Mengchang
<mengchang. ... at jpmchase dot com.invalid> wrote:
You may want: <a href="https://httpd.apache.org/docs/2.4/en/mod/mod_proxy.html#balancerpersist" title="https://httpd.apache.org/docs/2.4/en/mod/mod_proxy.html#balancerpersist">https://httpd.apache.org/docs/2.4/en/mod/mod_proxy.html#balancerpersist</a>

Regards,
Yann.

RE: How to keep httpd balancer scoreboard persista

By Chen, Mengchang at 03/12/2019 - 10:03

We have tried this directive, BalancerPersist set to On, but it doesn’t solve our problem. Our issue is when httpd child process recycled, the data associated with load balancing algorithm are lost and reset.

On Tue, Mar 12, 2019 at 2:01 PM Chen, Mengchang
<mengchang. ... at jpmchase dot com<mailto:mengchang. ... at jpmchase dot com>.invalid> wrote:
You may want: https://httpd.apache.org/docs/2.4/en/mod/mod_proxy.html#balancerpersist<https://secureweb.jpmchase.net/readonly/https:/httpd.apache.org/docs/2.4/en/mod/mod_proxy.html#balancerpersist>

Regards,
Yann.

This message is confidential and subject to terms at: <a href="https://www.jpmorgan.com/emaildisclaimer" title="https://www.jpmorgan.com/emaildisclaimer">https://www.jpmorgan.com/emaildisclaimer</a> including on confidentiality, legal privilege, viruses and monitoring of electronic messages. If you are not the intended recipient, please delete this message and notify the sender immediately. Any unauthorized use is strictly prohibited.

Re: How to keep httpd balancer scoreboard persista

By Jim Jagielski at 03/11/2019 - 10:30

I'm not exactly sure what you mean... could you give more detail in what exactly is happening and I'd be glad to take a look.

RE: How to keep httpd balancer scoreboard persista

By Chen, Mengchang at 03/11/2019 - 11:05

Thank you for reply.
We have our httpd conf directive MaxConnectionsPerChild set to a non-zero number e.g. 1000 and there are 4 BalancerMember inside a Balancer, e.g.

<Proxy balancer://mycluster>
BalancerMember <a href="http://192.168.1.50:80" title="http://192.168.1.50:80">http://192.168.1.50:80</a> lbset=0 route=0
BalancerMember <a href="http://192.168.1.51:80" title="http://192.168.1.51:80">http://192.168.1.51:80</a> lbset=0 route=1
BalancerMember <a href="http://192.168.1.52:80" title="http://192.168.1.52:80">http://192.168.1.52:80</a> lbset=0 route=2
BalancerMember <a href="http://192.168.1.53:80" title="http://192.168.1.53:80">http://192.168.1.53:80</a> lbset=0 route=3
ProxySet lbmethod=byrequests
</Proxy>

ProxyPass "/myAppContext/" "balancer://mycluster/myAppContext/"

When first two requests with url of /myAppContext/ as prefix and they will get sent to route=0 and route=1. There are other requests with different URLs and these requests make the total request counts reach to 1000. Now the httpd child process recycled because of MaxConnectionPerChild set to 1000. If there are two more requests with /myAppContext/ coming in, they are not get proxied to the member of route=2 and route=3 as we are expecting, but still sent to route=0 and route=1.

Not sure if I explained these clearly.

I'm not exactly sure what you mean... could you give more detail in what exactly is happening and I'd be glad to take a look.

Hi,

I am facing this issue that when MaxConnectionsPerChild set to non-zero, the httpd balancer scoreboard will reset whenever its child process recycled. Is there a way we can keep the scoreboard data persistant?

Thanks,
Mengchang
This message is confidential and subject to terms at: https://www.jpmorgan.com/emaildisclaimer<https://www.jpmorgan.com/emaildisclaimer> including on confidentiality, legal privilege, viruses and monitoring of electronic messages. If you are not the intended recipient, please delete this message and notify the sender immediately. Any unauthorized use is strictly prohibited.

This message is confidential and subject to terms at: <a href="https://www.jpmorgan.com/emaildisclaimer" title="https://www.jpmorgan.com/emaildisclaimer">https://www.jpmorgan.com/emaildisclaimer</a> including on confidentiality, legal privilege, viruses and monitoring of electronic messages. If you are not the intended recipient, please delete this message and notify the sender immediately. Any unauthorized use is strictly prohibited.