matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.9k stars 2.65k forks source link

Investigate unexpected queue flushing with cache and queued tracking on Redis #20208

Open bx80 opened 1 year ago

bx80 commented 1 year ago

We have a reports of unexpected queue flushing when using a single Redis instance for both the Matomo cache and for the Queued tracking feature in a multi-server environment. The cache and queue were in difference databases on the same Redis instance.

Moving the Matomo cache to a separate Redis instance resolved this behavior for the customer.

Ref L3-386

This issue is a reminder that we should test this scenario to confirm that the Matomo cache and Queued tracking can be run on the same Redis instance and if not then this should be documented or fixed.

Expected Behavior

The Matomo cache and queued tracking should be able to co-exist on the same Redis instance but in separate databases.

Current Behavior

It's reported that this doesn't work, we need to confirm this.

Steps to Reproduce (for Bugs)

Setup Matomo cache on Redis Setup Queued Tracking on Redis (same instance, separate database) Push some queued tracking requests into Redis Attempt a Matomo cache flush and see if it clears the tracking queue Try other things that may trigger a flush?

tsteur commented 1 year ago

@bx80 I believe this is maybe https://github.com/matomo-org/plugin-QueuedTracking/issues/167 ?

tsteur commented 1 year ago

see https://github.com/matomo-org/plugin-QueuedTracking/issues/167#issuecomment-1360883782