PDA

View Full Version : Mambo 3 Usernames load balancing


[MaxX]
7-4-05, 02:11 PM
Hello,

Well today I tried the load balancing code I found in another thread to overcome the 75k (right?) SELECT queries per hour per user limit. I had major problems with that today, with just ~200 users or so on my website. I was very disappointed with the limits..

Is mambo inefficient? What cms produces least amount of queries.

Also I tried following code in mambo to distribute load randomly between 3 users. I think it is correct. (config.php)


#$mosConfig_user = 'user'
$db_user_array[] = "user1"; //enter 1st user name
$db_user_array[] = "user2"; //enter 2nd user name
$db_user_array[] = "user3"; //enter 3rd user name
$mosConfig_user = $db_user_array[ rand( 0, ( sizeof($db_user_array) -1 ) ) ];

First of all is it compulsory to comment out original db code? That might cause problems in auto config as it cant find the field. All db's have same pass. Should the db users array have single quotes? It was double quotes in the thread I saw.

Anyway after I tried this, mysql server got slow down problems, although it became fine on itself. Now im wondering if that is a coincidence or what. Is it possible to give me only 1 user per db and give 216k requests per hour on that.

Should I try it again?

Thanks

RTH10260
7-5-05, 05:25 AM
Is mambo inefficient?Possibly, but this may be a general problem with CMS's that pull tens to hundreds of bits and pieces to create a dynamic webpageAlso I tried following code in mambo to distribute load randomly between 3 users. I think it is correct. (config.php)

#$mosConfig_user = 'user'
$db_user_array[] = "user1"; //enter 1st user name
$db_user_array[] = "user2"; //enter 2nd user name
$db_user_array[] = "user3"; //enter 3rd user name
$mosConfig_user = $db_user_array[ rand( 0, ( sizeof($db_user_array) -1 ) ) ]; You are doing just fine !First of all is it compulsory to comment out original db code? Not compulsory when the final field value is corectly filled later on. But it is a nice coding trait, cause it expresses that that some piece of original code is being replaced by something better. It's also slightly more efficient (in the microseconds range) cause a line of code without any effect on the final result is not executed.That might cause problems in auto config as it cant find the field.But you are creating that value/field just a few lines later. Inbetween there is no magic that requires the original code and values. All db's have same pass.Whatever you like, it's fine and does no harm here. Should the db users array have single quotes? It was double quotes in the thread I saw.Take it as you have seen the code when you don't know the difference between a literal in single and one in double quotes. And sorry, I will not try to explain here at your current level of understanding. Just take the code you see as-is.Anyway after I tried this, mysql server got slow down problems, although it became fine on itself. Now im wondering if that is a coincidence or what. Is it possible to give me only 1 user per db and give 216k requests per hour on that.Pure coincidence. You have paid for three users per database, each with those llimits imposed. So go ahead and use the stuff.

[MaxX]
7-5-05, 02:18 PM
Ah, it was coincedence alright, a great one at that. I tried again and its perfect!

Now I feel stupid feeling sorry and saying that I am the one who crashed the server on the IRC channel :P

technochick
7-13-05, 12:47 PM
this worked like a charm for me!! Thanks so much. :-)