sonuyos Posted July 26, 2020 Share Posted July 26, 2020 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? 0 Quote Link to comment Share on other sites More sharing options...
Eduardo G. Posted July 26, 2020 Share Posted July 26, 2020 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 0 Quote Link to comment Share on other sites More sharing options...
sonuyos Posted July 26, 2020 Author Share Posted July 26, 2020 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. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted July 26, 2020 Share Posted July 26, 2020 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...). 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.