terraform-aws-loadtest-distribuited icon indicating copy to clipboard operation
terraform-aws-loadtest-distribuited copied to clipboard

Locust listening port

Open sdarwin opened this issue 8 months ago • 0 comments

Hi, Thanks for this project, it is great.

An issue I have noticed, is that the Locust "leader" is listening on port 8080. Notice here --web-port=8080

https://github.com/locustio/locust/blob/master/examples/terraform/aws/main.tf

However the security group is opening ports 80,443

https://github.com/marcosborges/terraform-aws-loadtest-distribuited/blob/master/security.tf

Since 8080 doesn't match 80 or 443, the dashboard is inaccessible. right? or is that missing something?

Solution 1:

Add port 8080 in security.tf. When displaying terraform output, show port 8080 in the dashboard_url.

Solution 2:

Have terraform install an nginx proxy on the leader instance. Locust will still run on port 8080. Nginx proxies the request from 80 to 8080 in the background.

Let me know if you have a preference for solution 1 or 2. Maybe I could work on it, if there is time.

sdarwin avatar Nov 09 '23 22:11 sdarwin