Jump to content

Load Balancing in WHMCS?


Recommended Posts

Hello,

 

I want to know if there is any app or anything that would let me using Load Balancing.

 

As i have multiple plans in WHMCS, so number of users on a server becomes redundant, main thing that matter is ram, and how many users are using the ram on the server.

 

So if there is any load balancer that automatically chooses the server which has most amount of ram available, would be useful.

 

Example 50GB Ram Assigned to a Server of which 5 clients of 4gb package are assigned to it, still 30gb RAM is pending. and then WHMCS select thjat server to setup.

 

And way to do this?

Link to comment
Share on other sites

8 minutes ago, egrueda said:

First you need a load balancer, lets put HAProxy

Then you create scripts to use with agent-check so each node can report a dynamic load value (%) based on feee memoty or whatever you want to return from your script to the agent-check

https://cbonte.github.io/haproxy-dconv/2.2/configuration.html#5.2-agent-check

You get it wrong, I do not want to check available node resource, just set a limit on WHMCS itself and then let it manage it, regardless of the available resource.

Link to comment
Share on other sites

WHMCS supports round-robin (add to the least full server) or «Fill active server until full then switch to the next least used». In both cases for WHMCS every hosting package counts as one meaning that a site with 100GB disk space is equal to one with 5MB 😞

Obviously you don't need that. We need two things here:

  • Teach WHMCS to read and understand RAM usage
  • Depending on RAM usage, use PreModuleCreate hook point to "redirect" the hosting package we are about to create, to the right server

The only problem is the first step requires a bit of coding. The complexity depends on your server module (eg. Plesk, cPanel, DirectAdmin...).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated