Skip to content

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

Closed

Description

@benishak

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

Activity

  1. drew-gross commented on Apr 5, 2016

    @drew-gross
    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.

  2. benishak commented on Apr 5, 2016

    @benishak
    ContributorAuthor

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

  3. gfosco commented on Apr 5, 2016

    @gfosco
    Contributor

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

  4. benishak commented on Apr 5, 2016

    @benishak
    ContributorAuthor

    @gfosco yes it is

  5. drew-gross commented on Apr 5, 2016

    @drew-gross
    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.

  6. benishak commented on Apr 5, 2016

    @benishak
    ContributorAuthor

    @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.

  7. drew-gross commented on Apr 5, 2016

    @drew-gross
    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?

  8. blacha commented on Apr 5, 2016

    @blacha
    Contributor

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions