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

Re-add schema pulling #8229

Closed
4 tasks done
mtrezza opened this issue Oct 12, 2022 · 7 comments · Fixed by #8436
Closed
4 tasks done

Re-add schema pulling #8229

mtrezza opened this issue Oct 12, 2022 · 7 comments · Fixed by #8436
Labels
bounty:$50 Bounty applies for fixing this issue (Parse Bounty Program) state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version type:feature New feature or improvement of existing feature

Comments

@mtrezza
Copy link
Member

mtrezza commented Oct 12, 2022

New Issue Checklist

Issue Description

Parse Server 5 introduced schema hooks with the option databaseOptions.enableSchemaHooks in #7214. There are potential performance downsides using the MongoDB change stream.

The MongoDB change stream works by setting a cursor on the MongoDB oplog collection. If many Parse Server instances are behind a load balancer, each one will open a change stream and set an oplog cursor. Each cursor adds an overhead to the MongoDB cluster resources in terms of CPU and RAM consumption.

There may be deployments in which schema hooks are disadvantageous. If the schema doesn't change much, it's unnecessary to constantly maintain the database cursors and the previous solution of pulling the schema in regular intervals may be much more economic. In hindsight, it seems that schema hooks should have been added as a optional feature, not a mandatory change.

Steps to reproduce

Run many server instances in a cluster with high write frequency and watch the MongoDB resource consumption increase significantly.

Actual Outcome

The developer has no choice and is forced to use schema hooks, or restart all server instances on every schema change.

Expected Outcome

The developer should have the choice of pulling the schema in defined intervals, as was possible with Parse Server <5.

Workaround

Disable databaseOptions.enableSchemaHooks and restart server instances whenever schema changed.

Environment

Server

  • Parse Server version: 5.7.2
@parse-github-assistant
Copy link

parse-github-assistant bot commented Oct 12, 2022

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@mtrezza mtrezza added the type:feature New feature or improvement of existing feature label Oct 12, 2022
@mtrezza mtrezza added the bounty:$50 Bounty applies for fixing this issue (Parse Bounty Program) label Jan 29, 2023
@parse-github-assistant
Copy link

The label bounty:$50 cannot be used here.

@parse-github-assistant parse-github-assistant bot removed the bounty:$50 Bounty applies for fixing this issue (Parse Bounty Program) label Jan 29, 2023
@mtrezza mtrezza added bounty:$100 Bounty applies for fixing this issue (Parse Bounty Program) bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) and removed bounty:$100 Bounty applies for fixing this issue (Parse Bounty Program) labels Jan 29, 2023
@parse-github-assistant
Copy link

The label bounty:$20 cannot be used here.

@parse-github-assistant parse-github-assistant bot removed the bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) label Jan 29, 2023
@mtrezza mtrezza added the bounty:$50 Bounty applies for fixing this issue (Parse Bounty Program) label Jan 29, 2023
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 6.0.0-alpha.35

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Feb 27, 2023
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 6.1.0-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Mar 2, 2023
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 6.1.0-alpha.1

@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 6.1.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty:$50 Bounty applies for fixing this issue (Parse Bounty Program) state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version type:feature New feature or improvement of existing feature
Projects
None yet
2 participants