Page 1 of 1

vicidial-install slave setup cluster

PostPosted: Wed Jun 29, 2022 3:04 pm
by dhijrwn
Hi guys, I just added a slave server to our cluster setup using the vicibox-install for reporting purposes.

Is it ok that they don't match hardware specs?
Example the master database server has 8 cores and 32gb but the slave server will only have 4 cores and 8 or 16gb.

What I notice is it will replicate all the data from the master database all the user and the leads, even if I uploaded a new leads it will copy it too. Is this normal? I thought the slave server is only for reporting.

and also when I executed the ADMIN_archive_log_tables.pl script on the slave server, both master and slave database was affected.

when I see the crontab of the slave there was no entry on it. Should i put something here?

Re: vicidial-install slave setup cluster

PostPosted: Wed Jun 29, 2022 4:10 pm
by carpenox
naw they dont need to match specs, and yes, the slave will replicate the master and info will be synced. As far as crontab, u dont need anything because the ones on master db server will replicate down to slave. You can also check out my article about scratch installing a slave server, perhaps it will give you additional insight:

https://dialer.one/how-to-setup-a-slave ... -vicidial/

hope this helps

Chris aka carpenox

Re: vicidial-install slave setup cluster

PostPosted: Wed Jun 29, 2022 4:31 pm
by dhijrwn
carpenox wrote:naw they dont need to match specs, and yes, the slave will replicate the master and info will be synced. As far as crontab, u dont need anything because the ones on master db server will replicate down to slave. You can also check out my article about scratch installing a slave server, perhaps it will give you additional insight:

https://cyburdial.net/how-to-setup-a-sl ... -vicidial/

hope this helps

Chris aka carpenox



I see, that is very nice. Thank you!

I just checked your article it has so many commands I might brick the database configuration, but when I used the vicibox-install script does it do the same?

Re: vicidial-install slave setup cluster

PostPosted: Thu Jun 30, 2022 8:42 am
by carpenox
yes it does, i was just giving you the info so it could possibly shed some light for you overall

Re: vicidial-install slave setup cluster

PostPosted: Fri Jul 01, 2022 3:54 pm
by williamconley
dhijrwn wrote:Is it ok that they don't match hardware specs?
Example the master database server has 8 cores and 32gb but the slave server will only have 4 cores and 8 or 16gb.

Yes: Do note, however, that the slave server may not be able to keep up once the DB server is nearing its limit. But that's not something that will affect production, just how close to "now" the slave server can keep itself. If the load gets too high, it may fall behind. We have a script that keeps track of how far behind the archive server is (and turns it red in our ServerWatch if it gets Too Far behind).

This is why some (most?) rooms will leave the Real Time Screen on the live server, since that's really the only report that requires UpToTheSecond information during production.

dhijrwn wrote:What I notice is it will replicate all the data from the master database all the user and the leads, even if I uploaded a new leads it will copy it too. Is this normal? I thought the slave server is only for reporting.

ANY Vicidial script will run ALL update/insert/delete commands on the primary database server: Without regard for the server you run it on. Note that this is how a Vicidial Cluster works: the DB is the central point of data storage. The archive server is ONLY for reports to run. Nothing else. Even the "this user ran this report" entry in the admin logs is stored on the Primary DB server (and then replicates to the replication server in Due Course). That's how replication in mysql works in most cases: the replication server is often "read only" to avoid any misunderstandings.


dhijrwn wrote:and also when I executed the ADMIN_archive_log_tables.pl script on the slave server, both master and slave database was affected.

Yes: Replication servers pull all modification SQL commands and run them so the two databases stay "in sync" at all times. Consider referring to the replication server as the "Reporting Replication" server. It's just to run reports, but has the SAME data as the master server at all times (unless it gets behind a bit ... due to less power in its hardware, which is common).


dhijrwn wrote:when I see the crontab of the slave there was no entry on it. Should i put something here?

Any scripts that run on the archive/slave/replication/reporting (whatever you want to call it) will execute all their sql commands on the Master DB. The ONLY changes that are made to the slave server are by the replication process (pulling db changes from the master). The replication is for Reading data to report. No updates are made on it.

8-)

I hope that helped!

Re: vicidial-install slave setup cluster

PostPosted: Sat Jul 02, 2022 9:00 am
by dhijrwn
That will surely helped me to understand a lot. Thank you for your answers.