Skip to content

Add auxiliary database support for big instances #7554

@mgazdzik

Description

@mgazdzik

Goal of this ticket is to discuss and hopefully implement solution allowing single Piwik instance to query two replicant databases.

Outline of issue:

  • big Piwik instances often have master-slave db replication,
  • currently only use (in our case) of slave servers is to perform db backups, and in emergency cases to switch into master to provide HA

However slave servers could be put to much better use if we can redirect archiving queries onto slave db.
Long running and heavy queries could be triggered against slave, then results processed in PHP and write archives to master server.
This would significantly relieve tracker, take away some other problems with db performance when traffic peak meets long running archiving.

For initial scope, maybe only select queries triggered by LogAggregator could be launched against auxiliary db server, and in future we add option for developers to decide which db to use.
Even putting basic LogAggregator queries into slave would give significant boost to performance.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementFor new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.c: PerformanceFor when we could improve the performance / speed of Matomo.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions