{"action":"created","issue":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2539","repository_url":"https://api.github.com/repos/ParsePlatform/parse-server","labels_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2539/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2539/comments","events_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2539/events","html_url":"https://github.com/ParsePlatform/parse-server/issues/2539","id":171685627,"number":2539,"title":"Poor performance or normal behaviour?","user":{"login":"icalvete","id":3052093,"avatar_url":"https://avatars.githubusercontent.com/u/3052093?v=3","gravatar_id":"","url":"https://api.github.com/users/icalvete","html_url":"https://github.com/icalvete","followers_url":"https://api.github.com/users/icalvete/followers","following_url":"https://api.github.com/users/icalvete/following{/other_user}","gists_url":"https://api.github.com/users/icalvete/gists{/gist_id}","starred_url":"https://api.github.com/users/icalvete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icalvete/subscriptions","organizations_url":"https://api.github.com/users/icalvete/orgs","repos_url":"https://api.github.com/users/icalvete/repos","events_url":"https://api.github.com/users/icalvete/events{/privacy}","received_events_url":"https://api.github.com/users/icalvete/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2016-08-17T15:20:54Z","updated_at":"2016-08-19T06:27:45Z","closed_at":null,"body":"### Issue Description\r\n\r\nWe in the middle of migration from parse.com to our own parse server on AWS EC2.\r\n\r\nWe are almost ready to go so we are testing the new platfrom.\r\n\r\nWe see weird behaviour. It's seems that parse-server don't works well with concurrent requests.\r\n\r\nWe have tested the whole app with jmeter and ab with the same result.\r\n\r\nParse-server tend to eat all free CPU. Even with a few requests.\r\n\r\n**We are using this simple script.**\r\n\r\n```\r\n#!/bin/bash\r\n\r\nab -n1 -c1 \\\r\n-p parse.json \\\r\n-H \"X-Parse-Application-Id: XXXXXXXXXXXX\" \\\r\n-H \"X-Parse-Client-Key: XXXXXXXXXXXX\" \\\r\n-H \"Content-Type: application/json\" \\\r\n-H \"Accept-Encoding: gzip\" \\\r\nhttps://XXXXXXXXXXXX.XXXXXXXXXXXXcom:1337/parse/login\r\n```\r\n\r\nWhere parse.json content is ...\r\n\r\n```\r\n{\"username\":\"user1\",\"password\":\"pass1\",\"_method\":\"GET\"}\r\n```\r\n\r\nWe have done the tests with an empty database too. Our mongodb platform is really close to our parse-servers. There aren't any slow queries in our mongodb (80 ms is slow to us)\r\n\r\nWe hace un ELB with only one instance behind.\r\n\r\n#### Results\r\n\r\n##### 10 requests. 1 concurrent request\r\n\r\n```\r\nConcurrency Level:      1\r\nTime taken for tests:   2.266 seconds\r\nComplete requests:      10\r\nFailed requests:        0\r\nTotal transferred:      8890 bytes\r\nTotal body sent:        4090\r\nHTML transferred:       3680 bytes\r\nRequests per second:    4.41 [#/sec] (mean)\r\nTime per request:       226.572 [ms] (mean)\r\nTime per request:       226.572 [ms] (mean, across all concurrent requests)\r\nTransfer rate:          3.83 [Kbytes/sec] received\r\n                        1.76 kb/s sent\r\n                        5.59 kb/s total\r\n\r\nConnection Times (ms)\r\n              min  mean[+/-sd] median   max\r\nConnect:        5    5   0.2      5       6\r\nProcessing:   219  221   2.2    221     225\r\nWaiting:      218  221   2.2    221     225\r\nTotal:        224  226   2.2    226     231\r\n\r\nPercentage of the requests served within a certain time (ms)\r\n  50%    226\r\n  66%    227\r\n  75%    228\r\n  80%    229\r\n  90%    231\r\n  95%    231\r\n  98%    231\r\n  99%    231\r\n 100%    231 (longest request)\r\n```\r\n\r\n##### 10 requests. 2 concurrent requests\r\n\r\n```\r\nConcurrency Level:      2\r\nTime taken for tests:   2.169 seconds\r\nComplete requests:      10\r\nFailed requests:        0\r\nTotal transferred:      8890 bytes\r\nTotal body sent:        4090\r\nHTML transferred:       3680 bytes\r\nRequests per second:    4.61 [#/sec] (mean)\r\nTime per request:       433.873 [ms] (mean)\r\nTime per request:       216.936 [ms] (mean, across all concurrent requests)\r\nTransfer rate:          4.00 [Kbytes/sec] received\r\n                        1.84 kb/s sent\r\n                        5.84 kb/s total\r\n\r\nConnection Times (ms)\r\n              min  mean[+/-sd] median   max\r\nConnect:        5    6   0.8      6       8\r\nProcessing:   414  428  10.0    431     440\r\nWaiting:      414  428   9.9    431     440\r\nTotal:        419  434  10.2    439     446\r\n\r\nPercentage of the requests served within a certain time (ms)\r\n  50%    439\r\n  66%    441\r\n  75%    441\r\n  80%    443\r\n  90%    446\r\n  95%    446\r\n  98%    446\r\n  99%    446\r\n 100%    446 (longest request)\r\n```\r\n\r\n##### 10 requests. 4 concurrent requests\r\n\r\n```\r\nConcurrency Level:      4\r\nTime taken for tests:   2.145 seconds\r\nComplete requests:      10\r\nFailed requests:        0\r\nTotal transferred:      8890 bytes\r\nTotal body sent:        4090\r\nHTML transferred:       3680 bytes\r\nRequests per second:    4.66 [#/sec] (mean)\r\nTime per request:       857.880 [ms] (mean)\r\nTime per request:       214.470 [ms] (mean, across all concurrent requests)\r\nTransfer rate:          4.05 [Kbytes/sec] received\r\n                        1.86 kb/s sent\r\n                        5.91 kb/s total\r\n\r\nConnection Times (ms)\r\n              min  mean[+/-sd] median   max\r\nConnect:        5    6   0.9      6       7\r\nProcessing:   426  765 177.6    849     857\r\nWaiting:      426  765 177.6    849     857\r\nTotal:        431  771 178.0    856     863\r\n\r\nPercentage of the requests served within a certain time (ms)\r\n  50%    856\r\n  66%    857\r\n  75%    861\r\n  80%    861\r\n  90%    863\r\n  95%    863\r\n  98%    863\r\n  99%    863\r\n 100%    863 (longest request)\r\n```\r\n\r\n## **Even with only two concurrent requests response times grows to double.**\r\n\r\n##### 2 requests. 2 concurrent requests\r\n\r\n```\r\nConcurrency Level:      2\r\nTime taken for tests:   0.432 seconds\r\nComplete requests:      2\r\nFailed requests:        0\r\nTotal transferred:      1778 bytes\r\nTotal body sent:        818\r\nHTML transferred:       736 bytes\r\nRequests per second:    4.63 [#/sec] (mean)\r\nTime per request:       432.359 [ms] (mean)\r\nTime per request:       216.179 [ms] (mean, across all concurrent requests)\r\nTransfer rate:          4.02 [Kbytes/sec] received\r\n                        1.85 kb/s sent\r\n                        5.86 kb/s total\r\n\r\nConnection Times (ms)\r\n              min  mean[+/-sd] median   max\r\nConnect:        6    6   0.8      7       7\r\nProcessing:   426  426   0.2    426     426\r\nWaiting:      426  426   0.2    426     426\r\nTotal:        431  432   0.6    432     432\r\nWARNING: The median and mean for the initial connection time are not within a normal deviation\r\n        These results are probably not that reliable.\r\n\r\nPercentage of the requests served within a certain time (ms)\r\n  50%    432\r\n  66%    432\r\n  75%    432\r\n  80%    432\r\n  90%    432\r\n  95%    432\r\n  98%    432\r\n  99%    432\r\n 100%    432 (longest request)\r\n```\r\n\r\n### Environment Setup\r\n\r\n- **Server**\r\n  - parse-server version: 2.2.17\r\n  - Operating System:     ubuntu 14.04\r\n  - Hardware:             AWS EC2 c4.large\r\n\r\n- **Database**\r\n  - MongoDB version: 3.0\r\n  - Storage engine:  WiredTiger\r\n  - Hardware:        AWS EC2 m4.large\r\n\r\n### Logs/Trace\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/comments/240938701","html_url":"https://github.com/ParsePlatform/parse-server/issues/2539#issuecomment-240938701","issue_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2539","id":240938701,"user":{"login":"icalvete","id":3052093,"avatar_url":"https://avatars.githubusercontent.com/u/3052093?v=3","gravatar_id":"","url":"https://api.github.com/users/icalvete","html_url":"https://github.com/icalvete","followers_url":"https://api.github.com/users/icalvete/followers","following_url":"https://api.github.com/users/icalvete/following{/other_user}","gists_url":"https://api.github.com/users/icalvete/gists{/gist_id}","starred_url":"https://api.github.com/users/icalvete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icalvete/subscriptions","organizations_url":"https://api.github.com/users/icalvete/orgs","repos_url":"https://api.github.com/users/icalvete/repos","events_url":"https://api.github.com/users/icalvete/events{/privacy}","received_events_url":"https://api.github.com/users/icalvete/received_events","type":"User","site_admin":false},"created_at":"2016-08-19T06:27:45Z","updated_at":"2016-08-19T06:27:45Z","body":"I've tried the [bcrypt](https://github.com/ncb000gt/node.bcrypt.js) and works really fine.\r\n\r\nTo me this issue can be closed.\r\n\r\nThanks for all.\r\n\r\n"}}
{"actor":{"display_login":"icalvete"}}