Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Load Balancing of HTTPD on a cpanel server.

Discussion in 'General Discussion' started by cass, Dec 17, 2008.

  1. cass

    cass Well-Known Member

    Jul 17, 2002
    Likes Received:
    Trophy Points:
    Hello everyone...
    We're needing to make something for a special client, that require to balance between two servers the httpd requests.

    by now, it's only 1 domain, but it's running on a cpanel server.

    Basically, the idea is to have 50% requests on one server and 50% on the other, so it's fast, and no server got overloaded....
    for this, we tought it could just be done by Round Robin DNS, assigning 2 IPs to the same site.
    We have also, created the same site in the cpanel of both machines, and a rsync cron will syncronize de data if the clients uploads something, etc.

    Mysql? ... no problem, it runs on a separate server dedicated to mysql.

    But... the problem is PHP...
    not php itself ... but I think the php sessions.
    anyone have a How-To for this ?

    The setup is like this:
    - Server A : Normal Cpanel Server (httpd/php/mail, with external mysql configured)
    - Server B : Additional Cpanel Server (only for httpd....with external mysql configured)
    - Server C : Mysql Server (dedicated, only mysql)

    What should I've in mind when doing this?

    For example.... doing round robin... if clients opens a login page at server A, this server would store a session, then maybe the round robbin when the client clicks on a button to go to another page, could get the server "B", wich not have the session... so it will lost the login.
    I'm right?
    ... and so far, the rsync is too slow to do this.

    I'm not sure if the application can be modified to use "mysql sessions" instead of file sessions....
    and I'm not sure how will a "shared partition" or what type of it, i could use to store the sessions... and what happends when one server is offline with this partition?.... etc.

    Please, someone explain me.:confused:

    also.... anything else I should have in mind that need to be synced?? any other folder? file? config? outside of the /home dir.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice