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

Improving ApostropheCMS Performance with High Request Volumes and Large JSON Payloads #4462

Open
maamounkhlifi opened this issue Mar 14, 2024 · 1 comment
Labels

Comments

@maamounkhlifi
Copy link

We're currently experiencing performance challenges with our ApostropheCMS application, particularly when handling around 500-600 requests per minute (Rest API). The primary issue seems to stem from the transfer of large JSON payloads, as our models are complex, featuring numerous widgets and mixed relations.

Despite leveraging projection to trim down the data size, we're still facing slower response times than desired. This is especially true for data returned from widgets, such as the apostrophecms/image widget, where we ideally want to retrieve only the originalUrl instead of the entire object.

I'm looking for advice on the following:

  1. Are there additional strategies within ApostropheCMS for enhancing performance under high request volumes?
  2. Beyond projection, what other methods can effectively reduce the size of the data being transferred?
  3. Specifically for widgets like apostrophecms/image, is there a way to limit the returned data to only essential information, such as originalUrl?

Any insights or suggestions on improving ApostropheCMS performance in such scenarios would be greatly appreciated.

@boutell
Copy link
Member

boutell commented Mar 14, 2024

Hi maamounkhlifi,

My first concern would be to prove it's definitely about the size of those JSON payloads. One way to do that is to use extendApiRoutes to manually trim them down aggressively before returning them, perhaps even to almost nothing just for the sake of testing under simulated load.

Also, what does your CPU load look like in this situation? Are you running multiple servers with a load balancer or is all of this traffic being served by a single process?

Also a good idea to check the CPU load on your mongodb server or cluster.

If you'd like to talk about having a full performance analysis of your application done by the Apostrophe development team, please do reach out to us and let the team know I sent you:

https://apostrophecms.com/contact-us

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants