Skip to content

Add support for database read replicas #1178

Open
@Ardiea

Description

@Ardiea

Description/Context

Add support for executing specific tasks against the read replica rather than the operational db.

When reindexing tasks are started, database CPU usage spikes to 80-90% and a query backlog beings to form, ultimately slowing down the application / user experience.

We have read replicas available in production so it would be good if we could configure the application to accept a "REPLICA_URL" in addition to the current "DATABASE_URL" configuration item.

Then we would configure specific jobs to execute against the replica rather than the operational db.

I think this could be accomplished largely through the use of a custom database router and a little bit of logic in settings.py.

Plan/Design

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestproduct:mit-openIssues related to the MIT Open product

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions