• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Xenforo on Multi Servers

Codeless

Active member
#1
Hello all experts
I just switched to xenforo from vBulletin I was using two different servers for database hosting + 1 for images and attachments + 1 server for vBulletin files we faced some DDOS and other types of attacks in past that's why we do it.
Itas like

Server A : 192.168.1.1 (For hosting files + 1 database)
Server B : 192.168.1.2 (For hosting files + 1 database)
Server C : 192.168.1.3 (For hosting database only )
Server D : 192.168.1.4 (For images and attachments)

can i do same with xenforo ?
i will make host my domain using CloudFlare if one server is under attack we will simply change IP from CloudFlare and switch to other server.
when attack stopped from 1st server we will swith back.

Question: Xenforo can connect with two databases in the same time and can save same queries to another database ? Like mirror domain
I will appreciate if someone can tell me


in vBulletin I have slave database option can I do with xenforo

PHP:
    //    ****** SLAVE DATABASE CONFIGURATION ******
    //    If you have multiple database backends, this is the information for your slave
    //    server. If you are not 100% sure you need to fill in this information,
    //    do not change any of the values here.
$config['SlaveServer']['servername'] = '';
$config['SlaveServer']['port'] = 3306;
$config['SlaveServer']['username'] = '';
$config['SlaveServer']['password'] = '';
$config['SlaveServer']['usepconnect'] = 0;
 

Pierce

Well-known member
#3
I am watching this thread to see other replies but I'll add my experience.

I used to do a 2 front with db+ master db+slave. For vb4 to push it down the road.

With the same servers, I only need one front, one master db and one backup db. no db on the front. You could of course run a second backup front on the backup db.

I did this because xenforo doesn't natively support it. Digital point has an add-on to do it.

My loads are low always less than 1.0, I run Andy's similar threads which keeps elastic search very busy. My peek users is around 1500-1800 with daily pages currently around 50k. January is at 100k.

As such I don't see a requirement personally for it.

My attachments are 65gb, db is 6gb.

Hope that helps.
 

Mike

XenForo developer
Staff member
#5
There's no built in support for master-slave DB connections, though if I'm understanding your setup, do you need this? You appear to have the master DB (server C) replicated to servers A and B, presumably the DB slaves and the ones running PHP (based on them hosting files). Assuming the slave is getting most of the queries (given that most are reads), then you have a server that's capable of running both the PHP processes and many read queries, on top of keeping up with the main DB.

If that's the case, do you need an explicit slave configuration within XenForo? You can still do the replication for data redundancy, but it sounds like a single server has sufficient capability to meet your traffic demands, so you can just point multiple web servers at the DB master server.