Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for database read replicas #1178

Open
Ardiea opened this issue Jun 26, 2024 · 0 comments
Open

Add support for database read replicas #1178

Ardiea opened this issue Jun 26, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request product:mit-open Issues related to the MIT Open product

Comments

@Ardiea
Copy link
Member

Ardiea commented Jun 26, 2024

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

@Ardiea Ardiea added enhancement New feature or request product:mit-open Issues related to the MIT Open product labels Jun 26, 2024
@shanbady shanbady self-assigned this Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request product:mit-open Issues related to the MIT Open product
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants