Load Balanced Upgrade Best Practices

Hi Everyone,

We have a bit of a (overly) complex setup. We have 3 load balanced Matomo web front end servers for tracking requests that are feeding into Redis. We also have 1 Matomo Web server for running reports and viewing data, and 1 more Matomo server for performing the report archiving. All 5 servers are pointing to 1 database.

The question is, what is the recommended best practice for upgrading this setup to a new version of Matomo? Right now our process is to download and package the upgrade separately, and then copy it to all the servers manually. But that’s very inefficient and I’m concerned we either miss some aspect of the upgrade (on the DB, for instance) or overwrite something we don’t want to. We tried logging in to each server and using the built in Upgrade functionality, but after the first server was upgraded we received the DB/Web mismatch error on subsequent servers.

So what is the recommended approach? How have others handled this?

Thanks a lot.

-Igor

This post was flagged by the community and is temporarily hidden.

Hi Igor,

I’m with you, I have almost an identical setup and what I do is very manual.
To avoid the mismatches my process is

  1. Increase the size of one of the load balanced servers to twice the size
  2. Change the load balancer rules so all traffic is routed to this one massive server
  3. Switch off the Queued processing
  4. Update the folders on the massive server
  5. Use the update script to update the database
  6. Copy the folders onto the other servers
  7. Switch Queued processing back on
  8. Revert to the regular load balancing rules

As said, its very manual but by temporarily moving from a many tiered and horizontally scaled architecture to simple 1 web server > DB architecture seems to make it safer in my eyes

As said though, there must be a better way and i’d love to hear it!!