Cluster Update
To play with this, though, you'll need the rest of the code. Apply this patch:
http://goathack.livejournal.org:8001/dev/cluster.20010112.diff
Realize some people may not know patch:
(if your lj root is /home/lj, -p0 will also work, in which case your current directory won't matter)$ cd ~lj $ patch -p3 < cluster.20010112.diff
Then, in your ljconfig.pl, you need to define a slave (not the master, even if it has the same DSN) with a role of "cluster1" and "cluster1slave", as well as define @CLUSTERS with valid clusterids for your site.
So basically you're running cluster 0 and cluster 1 on the same machine. (which is exactly what LJ will do...) And we'll have another cluster 2 rooted off cartman (robust hardware, lots of disk). Then it's time to start buying more database servers.
Anyway, to run this afterwards:
$ moveucluster.pl test 1Easy, eh? No way to move a user back to cluster 0, though (that'd be dumb), so keep a snapshot of your database around to reset to.
@CLUSTERS = qw(1);
%DBINFO = (
'master' => {
'host' => '10.0.0.80',
'user' => 'lj',
'pass' => 'whatever',
},
'slavecount' => 1,
'slave1' => {
'host' => '10.0.0.80',
'user' => 'lj',
'pass' => 'whatever',
'role' => {
'cluster1' => 1,
'cluster1slave' => 1,
},
},
