Blorp (scsi) wrote in lj_everywhere,

Setting up cluster 2

Hi everyone!

Rather than bug brad via email, I figured that id get some documentation out in the open on how to initialize another cluster using the LJ system.

Here is what I have so far:

Add a new entry in your file.. Here is mine (minus my passwords, duh)

'master' => { # master must be named 'master'
'host' => "",
'port' => 3306,
'user' => 'livejournal',
'pass' => 'wee',
'role' => {
'cluster1' => 1,

'master2' => { # master must be named 'master'
'host' => ""
'port' => 3306,
'user' => 'slave',
'pass' => 'wee2',
'role' => {
'cluster2' => 1,


Then, add:

@CLUSTERS = qw(1 2);

One you get that all done, create the database on cluster2 and add a mysql user.

Once you can connect from one machine to the other, run /home/lj/bin/upgrading/ -r --cluster 2 This will create the tables on the other machine.. You should be ready to move people over now by using the /home/lj/bin/ script..

From what I can tell, all of the styles, user table, etc stay on the master cluster, and only the journal entries, userpics, etc (dynamic user stuff) goes on the cluster of which that person is a part of.

Brad: Am I even close to getting this right? Or is there some other thing that I should be adding..

  • Post a new comment


    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded