Running on clustered MySQL-DB

Locked
User avatar
Hackwar
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3788
Joined: Fri Sep 16, 2005 8:41 pm
Location: NRW - Germany
Contact:

Running on clustered MySQL-DB

Post by Hackwar » Thu Oct 27, 2005 2:51 pm

Hi folks,
in the recent issue of the german IT-enginering magazin iX they wrote about the cluster feature of mySQL to enhance performance. I would suggest a special version of Joomla that is ready for such a cluster. As far as I know you would have only to replace the table-type from MyISAM with NDBCluster or something like this. (I have to look up the correct term in the article.) Although the main resource drain is most likely the PHP, this could also be clustered on several servers. In that case I'm not that sure if all would work well with the session-managment in PHP, but I think it would give Joomla a more professional approach.
In any case: Is there a need for such a feature? Would be interesting to hear from some people with big sites...
god doesn't play dice with the universe. not after that drunken night with the devil where he lost classical mechanics in a game of craps.

Since the creation of the Internet, the Earth's rotation has been fueled, primarily, by the collective spinning of English teachers in their graves.

cthree
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Fri Oct 21, 2005 7:37 pm

Re: Running on clustered MySQL-DB

Post by cthree » Mon Oct 31, 2005 5:25 pm

This is not a feature of Joomla but of MySQL. You can change your table types at any time:

ALTER TABLE jos_xxxxx ENGINE ;

User avatar
Hackwar
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3788
Joined: Fri Sep 16, 2005 8:41 pm
Location: NRW - Germany
Contact:

Re: Running on clustered MySQL-DB

Post by Hackwar » Mon Oct 31, 2005 6:04 pm

I know, I just thought it would be interesting to have a install-script that does this for you...
god doesn't play dice with the universe. not after that drunken night with the devil where he lost classical mechanics in a game of craps.

Since the creation of the Internet, the Earth's rotation has been fueled, primarily, by the collective spinning of English teachers in their graves.

cthree
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Fri Oct 21, 2005 7:37 pm

Re: Running on clustered MySQL-DB

Post by cthree » Mon Oct 31, 2005 9:32 pm

It would be nice if the installer allowed you to choose the table type when building the tables. The only issue I can see might be fulltext indexing.

joeninety2
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Dec 13, 2006 4:36 pm

Re: Running on clustered MySQL-DB

Post by joeninety2 » Wed Dec 13, 2006 4:43 pm

Hi everyone,

I have just set up a mysql cluster using the ndb storage engine and had to make a couple of changes to the sql script to install the database to make it compatible with NDB:-

Code: Select all

--
-- Table structure for table `jos_core_acl_aro`
--
/* Original
DROP TABLE IF EXISTS `jos_core_acl_aro`;
CREATE TABLE `jos_core_acl_aro` (
  `aro_id` int(11) NOT NULL auto_increment,
  `section_value` varchar(240) NOT NULL default '0',
  `value` varchar(240) NOT NULL default '',
  `order_value` int(11) NOT NULL default '0',
  `name` varchar(255) NOT NULL default '',
  `hidden` int(11) NOT NULL default '0',
  PRIMARY KEY  (`aro_id`),
  UNIQUE KEY `jos_gacl_section_value_value_aro` (`section_value`(100),`value`(100)),
  KEY `jos_gacl_hidden_aro` (`hidden`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
*/
 

DROP TABLE IF EXISTS `jos_core_acl_aro`;
CREATE TABLE `jos_core_acl_aro` (
  `aro_id` int(11) NOT NULL auto_increment,
  `section_value` varchar(240) NOT NULL default '0',
  `value` varchar(240) NOT NULL default '',
  `order_value` int(11) NOT NULL default '0',
  `name` varchar(255) NOT NULL default '',
  `hidden` int(11) NOT NULL default '0',
  PRIMARY KEY  (`aro_id`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
 

--
-- Table structure for table `jos_poll_data`
--
/* Original
DROP TABLE IF EXISTS `jos_poll_data`;
CREATE TABLE `jos_poll_data` (
  `id` int(11) NOT NULL auto_increment,
  `pollid` int(4) NOT NULL default '0',
  `text` text NOT NULL,
  `hits` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `pollid` (`pollid`,`text`(1))
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
*/
 
DROP TABLE IF EXISTS `jos_poll_data`;
CREATE TABLE `jos_poll_data` (
  `id` int(11) NOT NULL auto_increment,
  `pollid` int(4) NOT NULL default '0',
  `text` text NOT NULL,
  `hits` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `pollid` (`pollid`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
To make that a bit more readable, the following were removed:-

jos_core_acl_aro:-

Code: Select all

UNIQUE KEY `jos_gacl_section_value_value_aro` (`section_value`(100),`value`(100)),
  KEY `jos_gacl_hidden_aro` (`hidden`)
jos_poll_data:-

Code: Select all

KEY `pollid` (`pollid`,`text`(1))
became

Code: Select all

KEY `pollid` (`pollid`)
As far as I can see Joomla is still working without any issues, but being a bit of a joomla and mysql newbie, I can't say for certain if this will have any long term damaging effects!

Thanks for any help you can provide!

Joe

jphein
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Dec 11, 2006 7:47 am

Re: Running on clustered MySQL-DB

Post by jphein » Sat Jan 26, 2008 8:43 am

I am trying to run Joomla 1.5 on a MySQL cluster with the NDBCLUSTER engine.
Using MySQL 5.0.44
When I try the ALTER command on jos_components table it gives me this error:

Code: Select all

ERROR 1105 (HY000): Failed to open 'jos_components', error while unpacking from engine
ERROR 157 (HY000): Could not connect to storage engine
ERROR 157 (HY000): Could not connect to storage engine
ERROR 157 (HY000): Could not connect to storage engine
ERROR 157 (HY000): Could not connect to storage engine
ERROR 1089 (HY000): Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys
Is there a NDBCLUSTER sql file somewhere?


Locked

Return to “Wishlist Archives - Archived”