Description
Our setup is as follows:
- Elastic Beanstalk
- 64bit Amazon Linux 2016.03 v2.1.1 running Node.js (v4.4.3)
- nginx proxy server
- m4.large single instance hosted in Virginia
- Parse Server (v2.2.11)
- Mongo DB driver (v2.1.18)
- mLab dedicated cluster (v3.0.10)
We are getting an average of only around 25 RPS and a peak of 40 RPS. When we exceed the peak, we see high latency and connection dropped errors in the logs.
An example error from the nginx log is as follows:
"2016/06/09 06:46:34 [error] 2684#0: *254 upstream prematurely closed connection while reading response header from upstream, client: , server: , request: "GET /1/classes/. . . host: “www.example.com""
With the same application, on the hosted Parse.com, we were able to scale to as high as required. We were able to request 70+ RPS successfully without any requests dropped.
Are there any configuration changes in any of the setup mentioned above (EB, Node.js, nginx, Parse Server, Mongo DB driver, mLab) or some other that we have not mentioned or missed to get a better performance?
If you have a better performance, what is your setup?
Any pointers / comments will be much appreciated.