Reputation: 2254
I know it will sound weird but here is my question:
When I tested my app in Cloud9 it worked just fine. Then, right after I deployed my app in an ECS Fargate container behind the Application Load Balancer and went to my ALB DNS name I saw that my app was buggy (it seems like my TCP connection (socket.io) latency was very high and my ALB couldn't handle the load). It happened late in the evening.
Then, the next day when I went to my website it worked great! It seems like my ALB scaled up somehow and that is the reason why my app became normal.
Am I guessing right? Did my ALB indeed scale up? How can I monitor or read about this?
Upvotes: 0
Views: 1822
Reputation: 176
AWS load balancers will scale up/down depending on the traffic. It, however, can take a few minutes for AWS to adjust capacity to the demand. If you are expecting increase in traffic, you can contact AWS in advance to let them know that Load balancer would need scaling - obviously that makes sense only if you anticipate increase due to scheduled event/sale/etc and scaling on-demand is unacceptable.
AWS docs for reference: AWS-LB-Details
Elastic Load Balancing scales your load balancer as traffic to your application changes over time.
You could try to resolve the dns name with "nslookup" command to check what IP addresses are assigned. I believe there's no way o keep track of scaling activity, as it happens behind the scenes within AWS.
Make use of Access logs, those can be stored on s3 for further analysis. You can query for data to see how many requests were rejected, or whats the processing time. For the details and available metrics take a look at the docs: AWS-access-logs
Upvotes: 1