When you track a lot of data in your Matomo (Piwik) server, you may find that the calls to the Tracking API (piwik.php) become a scalability bottleneck. We have created a new plugin QueuedTracking that we release away for free(dom) to you, the community. This plugin will help with scaling your Matomo server to track dozens or hundreds of millions of requests per month.

This plugin writes all tracking requests into a Redis instance instead of directly into the database. (There is also an option to use a MySQL queue instead if you prefer not to use Redis.) This is useful if you have too many requests per second and your server cannot handle all of them directly (eg too many connections in nginx or MySQL). It is also useful if you experience peaks sometimes. Those peaks can be handled much better by using this queue. Writing a tracking request into the queue is very fast (a tracking request takes in total a few milliseconds) compared to a regular tracking request (that takes multiple hundreds of milliseconds). The queue makes sure to process the tracking requests whenever possible even if it takes a while to process all requests after there was a peak.

Instructions

Learn more

Previous FAQ: How to deploy same code base on all the servers in multi-server environment?