Configuring Apache as a load balancer – PB Docs 2022

Configuring Apache as a load balancer

This tutorial will walk you through configuring Apache as a load
balancer to direct client requests to a group of PowerServer Web APIs. You
will have to configure Apache as a load balancer and use the “Request
Counting” load balancer scheduler algorithm and the cookie in order to
support sticky sessions.

Step 1: Follow the sections below to install Apache 2.4 (The load
balancing feature is available in Apache 2.2 or later) and configure
Apache as a reverse proxy server.

Step 2: Configure Apache to direct requests to the PowerServer Web
APIs group using the “Request Counting” load balancer scheduler algorithm
and the cookie.

  1. For Windows Apache, make sure the following lines are NOT
    commented out in the httpd.conf file.

    mod_proxy, mod_proxy_http, mod_proxy_balancer,
    mod_lbmethod_byrequests (the “Request Counting” algorithm), and
    mod_headers (stickyness cookie) must be enabled in order to have the
    load-balancing ability.

  2. Add the following lines to the end of the httpd.conf
    file.

    The “Header” directive provides load balancing with stickyness
    using mod_headers.

    The “Max-Age” attribute specifies the number of seconds until
    the cookie expires. This value must be greater than the session
    timeout value (which is 3600 seconds by default).

    The “BalancerMember” directive specifies the URL of the server
    instance in the group.

    The “stickysession” attribute specifies the name of the
    cookie.

    For more information, refer to https://httpd.apache.org/docs/2.4/mod/mod_proxy_balancer.html.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x