Morgan (boobay) wrote in lj_everywhere,
Morgan
boobay
lj_everywhere

with MEMCACHE ==> get data from master and not from slave (why?)

with MEMCHACHE_SERVERS set LJ gets the (initial) data from the master server(s) and not from a slave, e.g.:
if ($opts->{'cache'} && @LJ::MEMCACHE_SERVERS) {
            $db = $table eq "userproplite2" ?
                LJ::get_cluster_master($u) :
                LJ::get_db_writer();
        }
        unless ($db) {
            $db = $table eq "userproplite2" ?
                LJ::get_cluster_reader($u) :
                LJ::get_db_reader();

...

why is that? for me every hit to the master is much more expensive than using the slave... is there any way to get the memcaches filled by using a (local) slave?
Subscribe
  • Post a new comment

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded 

  • 4 comments