-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Parse Server Benchmarking #185
Comments
If having multiple cores, you could use the I tested this snipped and it seems to work:
Does this help in your benchmark? |
Very interesting data. Can you take a look at those metrics for a better understanding of what is the slow piece? Maybe you could share your findings so we can also learn from them. |
@doender right now im just using a free dyno at Heroku which is prob a small container on some VM that they let you use. I just wanted to see how that preformed with the Free instance at MongoLabs as well. @codebreach Thanks for reminding me here it is I dont get the post value being 812ms.. thats crazy.. Next steps is to add some sort of profiling to the code, but I its been ages since I tried to profile node.js and not sure where to start again on a remote server. |
Here is my jmeter script, its very simple but you need to change a few things which can be done via text editor if you do not have jmeter.
add your appid you added for your parse server line 55 add your domain in
no http.. just whateveryourdomain.com line 85 change your domain as above
save that and sign up for a free account at blazemeter.. when you log in select jmeter and upload your script.. You can download the script from my server here |
You can run parse-server with PM2 in cluster mode to solve this. |
@francocorreasosa could you explain this a bit more , esp for people reading this thread. |
Sure, |
If you're using Heroku and don't want the complexity of configuring pm2, you could also consider a plugin like Adept Scale to handle this for you: https://devcenter.heroku.com/articles/adept-scale |
@francocorreasosa be nice to see if this works, im assuming this would be running on like AWS to scale your EC2 instances or? @jamiechapman I read though the docs, seems like some of this is still in beta, it would be good to figure out if this could be used with parse-server because nobody is really talking about scaling or how to potentially scale a parse server. |
"pm2 start index.js -i 2" could also be used one a single instance with 2 cores to distribute the load. I tried it, works perfectly and no changes to the code needed like in the snippet I posted. |
@doender If I have time this week Ill test this out and run some benchmarks.. what cloud provider are you using? |
DigitalOcean |
@doender thanks for that. From building my own backend for a game called TouchFish as you scale you will need to eventually have load balancers in front of your parse servers that will then based upon the parse server health or requests send the data to x server. I have yet time to mess around with this and might try it in aws since they have already load balancers you can use with one of their many services. |
Here are a suggestions for a few other load tests that may be useful to do, in clustered and non-clustered configurations:
|
Ill be running tests on AWS , since they now have a set up to work with Parse server that uses their Elastic Beanstock system (manages load balancers, auto scaling etc).. More found here http://mobile.awsblog.com/post/TxCD57GZLM2JR/How-to-set-up-Parse-Server-on-AWS-using-AWS-Elastic-Beanstalk |
Also above Ill be testing https://www.mongodb.com/migrate-from-parse-to-mongodb-cloud-manager-and-aws provisioning system in aws with beanstalk |
Eagerly following...any updates? |
Sorry I was side tracked this weekend with other stuff and am looking into seeing how to integrate PM2 depending on the AWS EC2 I use since you can run one instance of node.js on a core. I want to make sure the nodes also restart if they crash of fail, so a lot of reading up on Elastic Beanstalk. |
@gateway any updates? |
@markuswinkler last week, got pulled into figuring out what hosting we will be doing and will do my first decent load test with mongo cloud (in aws) and elastic beanstalk with parse servers.. This will give me the ability to scale parse servers up or down based on load and use a nice interface for mondodb cloud manager to have 1 replica set of 3 servers to start with. |
@gateway Fantastic! I bet this kind of setup applies to a lot of people who want to migrate, looking forward to the results! Are you going with m3.medium instances? |
I think I've tentatively settled on AWS EB and Compose.io. I am very interested to see your results. Thanks! |
@markuswinkler it will depend on what your skill level set is or how comfortable you are using other interfaces. For our Likemoji project we will be going the route of Elastic Beanstalk to handle load balancing, scaling of parse servers and connecting to a cluster of mondodb servers running in the same amazon region. We will also be using mondo cloud to admin the mondo databases which provides a nice interface, backup system and ability to fire up various replica sets in amazon east region but better yet in different data centers (to avoid a data center going down and your app to not work).. Mongo just did a webinar on using their system with aws.. https://www.mongodb.com/presentations/webinar-step-by-step-parse-migration-plan.. anyhow rambling. Most people not really tech savvy can just use heroku and mongolab which works. Ill prob do a writeup on my personal blog about my experiences. EDIT: btw your data set will grow by 2-4% when you move from Parse.com to a new mongo service due to the lack of compression. So anything you look at as far as a plan make sure you consider the db storage space because its not 1 for 1 |
@gateway Interesting, thanks for sharing the link, looks very helpful should we go that route! |
@markuswinkler yea, I was going off what the mondodb webinar was saying.. but you deff need lots more space. Its to bad that Parse does not support mondodb 3.2 because they have built in compression with WiredTiger options. Looking at mondo site it says its in 3.0 so maybe ill do some tests with that. |
What will it take to get Parse to support WireTiger MongoDB 3.2 (which I On Tue, Feb 23, 2016 at 1:59 PM, Gateway notifications@github.com wrote:
|
I believe one of the reasons 3.2 isn't supported is a change in how geopoints are stored, and we're using an older format which is incompatible. So that makes migration difficult unless you handle that on your own after moving to a supported version... and it would be problematic to change how geopoints are stored for any migrated app while old clients are still hitting api.parse.com. For an entirely new app, I think a modified database adapter could be used to work with 3.2. |
I'd like to close this issue, not really seeing much benchmark discussion, and we're still in a state of flux getting closer and closer to production stability.. Seeing examples online for how to properly load-balance and monitor parse-server would be great, and we'd happily link to any good info / blog posts from the wiki. |
Hey Guys I did some simple benchmarking today with a Jmeter script , just does a POST and a GET of the object created and I also used apache benchmark... From the looks of the data I'm seeing pretty high response times from the results.. I'm not sure if its the connection between you guys and MongoLab or the small free dyno im running.. here are some of my findings.. Any thoughts?
https://groups.google.com/forum/#!topic/parse-developers/puldzNyFEGs
The text was updated successfully, but these errors were encountered: