Load test my server from terminal



I am trying to load test my server using the loadtest npm module. My server is up and running, I can get to it from my browser and it is serving web pages properly. However, when I run loadtest, I am getting 100% errors. I am running loadtest from a terminal in c9. Why are none of my requests getting through? The workspace is private, so I was thinking there may be a credential issue, but I am running it from my own.

Two commands I tried with loadtest:
~ loadtest -c 1 --rps 10 https://fantasy-football-myUserName.c9users.io/someRoute
~ loadtest -c 1 --rps 10 https://localhost:3000

Example of error:
[Tue Jan 19 2016 21:23:07 GMT+0000 (UTC)] INFO Requests: 196, requests per second: 10, mean latency: 0 ms
[Tue Jan 19 2016 21:23:07 GMT+0000 (UTC)] INFO Errors: 50, accumulated errors: 196, 100% of total requests


Why do you want to load test your Cloud9 workspace? Cloud9 is a development platform, and is not meant for hosting, so you should never have more than a few people at a time visiting your website.

We also have networking rules that prevent sending lots of data from your workspace to prevent people from using Cloud9 to DDOS other websites.


The reason you are seeing the errors however, is because the workspace is private, and you’re accessing it via the proxy that does authentication, which your workspace obviously isn’t authenticated.

Try testing against http://localhost:8080 if you’re just making sure your app can handle a few simultaneous connections, but as Tim said; C9 is a development platform, not a stress testing environment.

The reason you’re getting errors on the localhost one is likely because you’re using https instead of http and it will have a protocol error.