1
votes

I have my laravel application (which is serving Rest API's) configured in elastic beanstalk environment. currently i have configured 1 t2.medium Ec2 instance under application load balancer. how to load test to check the maximum number of concurrent users the environment can handle?

1
Side note: if your stress test is high volume and come in a large spike you will need to contact AWS to pre-warm the ELB.Gapton

1 Answers

1
votes

A load test could be as simple as pinging the healh-check URL of your Beanstalk application.

  1. Write a threaded/concurrent program in the language of your choice to bombard your Beanstalk application with HTTP requests to elicit HTTP 200 responses.

  2. At a sufficiently high request rate (which you could facilitate by increasing the degree of concurrency), you could observe auto-scaling kick in to launch newer instances of my environment.

  3. For every request from the concurrent program, you should check the response is a 200 OK, if not log that as an anomaly.

  4. Measure the mean time between request and response to give you an indication of whether your responses are lagging.

You could repeat the above process with the operations that you expect to be most popular for your application.

One such plausible operation is that of users logging in, for which you would need to have setup a large number of dummy users in the (development) database. Now, instead of requesting the health-check URL, you would perform POST requests with the authentication credentials per-user to the /login URL of your app.