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

self-hosted parse-server is slow on AWS #1381

Closed
benishak opened this issue Apr 5, 2016 · 8 comments
Closed

self-hosted parse-server is slow on AWS #1381

benishak opened this issue Apr 5, 2016 · 8 comments

Comments

@benishak
Copy link
Contributor

benishak commented Apr 5, 2016

I'm trying to host my own parse-server on AWS
I have an EC2 t2.micro instance running with NGINX and GZip.

When doing requests to my mLab-hosted MongoDB I noticed that it is slow, I get the following result for the same requests
AWS-EU-Central vs PARSE vs AWS-US-East vs Heroku
2.5s vs 0.3s vs 1.4s vs 3.0s

On Heroku I'm not using NGINX

Does parse.com use CDN (AWS CloudFront)

The Indexing could be also a reason for that, does Parse.com use advanced indexing or just basic indexing?

Thanks

@drew-gross
Copy link
Contributor

Parse.com will add index for you based on the queries you issue. Parse Server does not do that, you will need to add indexes yourself.

@benishak
Copy link
Contributor Author

benishak commented Apr 5, 2016

@drew
So do you think it is all about the indexing? Not of the server configuration (nginx .... )

@gfosco
Copy link
Contributor

gfosco commented Apr 5, 2016

Is the parse.com app using the same mlab database?

@benishak
Copy link
Contributor Author

benishak commented Apr 5, 2016

@gfosco yes it is

@drew-gross
Copy link
Contributor

There are a lot of potential reasons for performance issues. Parse Server may be executing different queries, there may be latency between your DB and Server, etc. If you can provide more details about what exactly is slow, that would be helpful.

@benishak
Copy link
Contributor Author

benishak commented Apr 5, 2016

@drew
I'm executing the same queries on the same DB.
The queries are just simple something like query.find() with equalto constraints (searching, filtrations)

I don't think is indexing problem because I'm using the same database, so if that database is indexed, so changing the parse server won't affect it.

@drew-gross
Copy link
Contributor

Thats true, the indexes should be there. Is there any way you can look at your mLab to check how much time is being spent in mongoDB vs in Parse Server code? Also, can you check latency between your Parse Server and mLab db?

@blacha
Copy link
Contributor

blacha commented Apr 5, 2016

@benishak are you a logged in user? There are a number of excess queries being run when the user has roles.

#1383 should improve the role query performance, by quite a lot.

My suggestion would be to look at the real time mongo logging on your mlab database while you run the simple query to see exactly how many queries are run.

Also mLab instances are generally hosted in the east coast, so you will want to have your AWS instance as close as possible to the database.

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

No branches or pull requests

4 participants