Setting up mysql replication for piwik


#1

I would like to setup mysql replication for Piwik with MultiMaster setup ( Both node can work as master as well as slave). All scheduled jobs should run on one server only other server will work as just logging visits.

Questions:

  1. In this scenario, I would like to know which tables i should not replicate. Right now, what i can think of is

    1. piwik_session
  2. On one server i want to disable report generation abd archving. I can disable Piwik archiving using “General Setting”. But along with that i would like to stop report generation which used generate based on time interval specified in “Reports for today (or any other Date Range including today) will be processed at most every” in general setting. Is there any way i can stop that too?


(Matthieu Aubry) #2
  1. will only be used on the server that hosts the UI

  2. as long as you don’t call the API or use the UI on the second server, I believe it will not archive any data. To be safe, check that it doesn’t create the piwik_archive_* tables, which contain all processed reports from the logs (which are piwik_log_* tables)

I haven’t heard of similar MultiMaster setup for Piwik before, so if you end up working with this, please send me a message at matt att piwik or here, so that we can update our FAQ on: New to Piwik - Analytics Platform - Matomo


#3

Thanks for quick response.
I am going to setup this for hot failover/ Load balancing. I still want reporting table on both so if i login on Server2 …I can view stats. Using replication all calculated data(archive data) will be available from Server1 to Server2. I just wanted to make sure that All visits logged on Server2 should got to Server1 and no processing on Server2.

Server1(Kind of Master)

  1. This should be able to log visits
  2. Should be able to archive data
  3. Should be able to generate reports
  4. Should be able to view reports

Serve2

  1. This should be able to log visits
  2. Should be able to view reports