ECS instance type upgrade: As the instance type replacement will kill the running instance randomly, use AB deployment model.
ECS Autoscaling: Always use step scaling https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-autoscaling-stepscaling.html
Load balancing with EC2/ECS: It is a round robin algorithm on load balancers (you can not control the algorithm yet) and if you have a slow running instance or other instance available which can serve he request, it is not possible to distribute the load.
Auto Scaling with Dynamodb: Even though autoscaling is supported to minimize the cost of read and write index provisioning, the autoscaling does not kick in immediately. Be sure to provision 1x capacity upfront. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/AutoScaling.html
Lambda throttling: Each AWS account has the lambda concurrency limits but the lambda capacity is available in batches i.e. lambda's will be throttled for a brief time and then the capacity will be available for further scale. Choose ECS if you are running mission critical services.
Lambda function concurrency limits: Remember to leverage the lambda function concurrent execution limits, so that you don't utilize the entire lambda concurrency capacity on one or few function(s). https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html
Cross-Zone load balancing: If you have one availability zone having more instance provisioned than other availability zones, the load will not be evenly distributed until you turn on Cross-Zone load balancing https://aws.amazon.com/about-aws/whats-new/2013/11/06/elastic-load-balancing-adds-cross-zone-load-balancing/
Two critical metrics - SurgeQueueLength https://aws.amazon.com/premiumsupport/knowledge-center/elb-capacity-troubleshooting/ and ELB_5xx https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/ts-elb-http-errors.html#ts-elb-error-metrics-ELB_5XX
Have fun Scaling
No comments:
Post a Comment