MyBB Community Forums

Full Version: define multiple memcached servers
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Defining a single memcached server is easy in the config.php. What i have is two servers - both running memcached for fall-over.
In addition to running two forums on myBB I have 3 on xenForo. With xenForo setting up multiple cache servers is as simple as setting up an array in config.php
        'servers' => array(
                array(
                        'host'=>'localhost',
                        'port'=>'11211'
                ),
                array(
                        'host'=>'xxx.xxx.xxx.xxx',
                        'port'=>'11211'
                )

)
);

Will the same process work for assigning an array in myBB's config.php?
I have performed a search looking for this and either my search technique leaves a lot to be desired or it's not been talked about. I've even searched on Google and so far have had no luck turning up any info other than a blurb on the myBB site about it being supported (with no information relating how to do it).
Guess nobody knows how to do this. Not that worried about it now as I've converted the site that I needed it for over the xenForo.
MyBB doesn't support this as we haven't had any requests for it. Usually the amount of data stored in the datacache is only a few megabytes (Unless you have something like 1,000 forums) and doesn't require the use of memcached. There are only a few forums which use memcache as a cache handler.
(2013-12-09, 10:22 AM)Nathan Malcolm Wrote: [ -> ]MyBB doesn't support this as we haven't had any requests for it. Usually the amount of data stored in the datacache is only a few megabytes (Unless you have something like 1,000 forums) and doesn't require the use of memcached. There are only a few forums which use memcache as a cache handler.

It wasn't so much for that... but in case one of them went down it didn't bring the entire forum down because of memcache on the server not running as well as load balancing. There are multiple forums running on the servers (myBB, xenForo, CPG and WordPress). Was wanting to try and spread it out to the other servers I have also (especially the one that sits out as a standalone mysql/memcache(d) server.

Thanks for the reply though.. was getting to feel rather lonely. Toungue

I just won't worry about it for the other 3 forums I have set up with myBB.
Nathan is wrong, MyBB supports multiple memcache servers. The servers need to be specified as an array.
$config['memcache'][0]['host'] = '10.0.0.0';
$config['memcache'][0]['port'] = 11211;
$config['memcache'][1]['host'] = '10.1.1.1';
$config['memcache'][1]['port'] = 11211;
//...
(2013-12-14, 09:01 AM)StefanT Wrote: [ -> ]Nathan is wrong, MyBB supports multiple memcache servers. The servers need to be specified as an array.
$config['memcache'][0]['host'] = '10.0.0.0';
$config['memcache'][0]['port'] = 11211;
$config['memcache'][1]['host'] = '10.1.1.1';
$config['memcache'][1]['port'] = 11211;
//...

Hrmm... We should probably document that. Toungue