On Jun 08, 2005, at 11:06 AM, PAGES Vincent wrote:

Hi,

I hope i'm writing in the good mailing list...

Since one year, i'm working on loadbalancing solution for webservers (usually Apache 2). Behind a cluster of http servers, we can find a mysql cluster. Generally ppl are using the mysql_connect with the hostname = "localhost". When i suggest a loadbalancing solution, the mysql database is hosted on a different server. So webpages of all virtual hosts need to be updated to connect on the new hostname; which can be very annoying.

I've patched PHP, and added 2 variables in PHP.ini which are :
   mysql.unix_socket = disabled
   mysql.force_hostname =

The first one disabled the connection on mysql unix socket and transform "localhost" in "127.0.0.1". This allows to redirect mysql traffic with iptables. The second force mysql_connect to one database whatever the hostname specified in the mysql_connect function.

I think it can be someting helpful for System Administrators. Tell me ur feeling about this.

Well I'll probably start a war with these remarks but your concept offers easier hosting with MySQL support and this is appealing to me as I make a lateral move in the hosting market world, here it is anyway.

What you are proposing is something that makes logical business sense and I would have to agree with you that it would solve a lot of issues when hosting service that include MySQL support are provided to a hostee but there is a flaw in this logic.

The flaw is this, the PHP developers aren't interested in what you are proposing because it only strengthens your position in the hosting market by making it easier for you to offer PHP and MySQL services without requiring the hostee to recode his work and offers no real improvements to PHP itself.

Since it offers no direct benefit to them in the functionality of PHP, they will refuse this concept, history dictates this, proof is available if you examine the list archives for other such concepts that have been refused by the developer under the weak guise of "tell the hostee to reprogram" which in the opinion of many, is incorrect in a true business structure, the hoster should never have to ask or tell the hostee to reprogram works because the PHP developers wouldn't ensure any transitional features for functionality be included in the PHP core itself.

In what you propose, I would not allow any decision to be given to the PHP developers but rather give them no option to do anything but accept your code changes by force if you believe that your code has value (my opinion is it does but does my opinion matter?).

This can be achieved and I propose the follow to attain this goal, change your code (I know, reprograming, but hear me out) so it is contained within the bundled MySQL source files with defaults for your INI settings, this would give you the ability to obtain endorsement and approval from the MySQL developers much easier and give the PHP developers no opportunity to reject your proposal unless the decided to reject MySQL support altogether (not likely to occur unless they are complete morons).

Your requirements to make this happen would be simple, make your MySQL code enhancements as version friendly as humanly possible, generate versions for PHP4 and PHP5, test it on as many platforms as you can, submit this to the MySQL developers with documentation for your enhancements/changes and I'm sure that they would accept these changes because it enhances their product in a desirable way.

If you need some platforms to test on, I have at my disposal a freeBSD (5.4), a Darwin 6.8 (x86 based) and 3 versions of Mac OSX server (10.2, 10.3 and 10.4) that I could test your code on and I believe you could find a handful of others on this list to test your changes just by asking that should pretty much cover all platforms out there.

--
PAGES Vincent
System Administrator
France

-- Dale

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to