I am about to install Matomo on 3 servers onprem:
- 2 frontend servers (each server will have Nginx, PHP and Matomo installed) (both behind a loadbalancer)
- 1 backend dB (MariaSQL, serving both frontend servers)
Any tips or advice for this? Are there any guides for this? I’ve done a quick search without finding any information really. The installation guide I found is only talking about the 5 min install or when installing all on the same server.
My plan is to have a load balancer that will route any requests to one of the front end servers which in turn will communicate with the db-backend. The load balancer will use sticky sessions so a http session will always be routed to the same front end.
Will this work?
It should work.
Here some documentation:
In case of proxy:
Thank you for the feedback.
One follow up question, in the first link there is a high level description and a diagram of scalable multi-servers configuration. How important is it to have a separate archiving server and which of the Archiving server process or the Frontend Server(s) process are most calculation intensive? Which require most resources (cpu, memory, disk)?
If you only have 3 servers, what is the preferred setup? In terms of Frontend, Archiving and DB? One of each or put the Archiving part on the DB server or with one of the Frontend servers?
I suggest the DB server is installed on its own server…
Then you can choose for example to collect data on one server, watch them on another one, and select the one for archiving depending on the amount of data you collect, how often (an when) you archive reports, how often (and when) users connect to Matomo to watch report…
Is Archiving server process a very computational process compared to the Frontend (Tracker) process, when you have quite many hits, but less users generating reports?
Given the setup we have, I now plan to install both the Tracker and Archiving on the Frontends servers and let the Archiving process execute every odd hour on one of them and every even hour on the other, then I get more redundancy and I will have a separate DB-server serving them both.