Questions tagged with AWS Auto Scaling
Content language: English
Sort by most recent
Uncaught RedisClusterException: Can't communicate with any node in the cluster in /home/cloudpanel/public_html/RedisCache.php
Hello Everyone, We are getting "Uncaught RedisClusterException: Can't communicate with any node in the cluster in" this error. We are using Elastic Cache redis cluster with 2 node and cluster mode was enable PHP library ==>https://github.com/cheprasov/php-redis-client we are using this library. This error randomly occurs in our websites. At the time of error Elastic cache load was normal. Is there any way to trouble shoot this issue.
ASG - Instance purchase options and Allocation strategies missing
I try to create ASG but there is Instance purchase options and Allocation strategies sections missing. It's not there either during create, edit or review. I've some ASG created >1 month ago and it contains Instance purchase options and Allocation strategies sections. However when in this old ASG I try to edit Instance purchase options it goes to editor view with Instance purchase options and Allocation strategies missing. Also when I tried to create ASG similar to the one created >1 month ago it still doesn't have Instance purchase options and Allocation strategies sections. What's going on?
Elasticbeanstalk stuck in update
Hi everyone, thanks for your help After changing the type of instance of one of our elasticbeanstalk this one is block on the event "Created Auto Scaling launch configuration named: awseb-e-guthbfkdfe-stack-AWSEBAutoScalingLaunchConfiguration-xxxx" and the option to cancel is unavailable. what can I do to unblock this situation.
KDA failover strategy
Currently I am trying out a KDA + Flink setup and first thing that stops me a little bit is failover strategy. There is only one option for a failover: take savepoint -> destroy cluster -> start new cluster -> start job from savepoint, and this option ends up in few minutes downtime. I am aware that aws uses a bit different strategy for maintenance window where both clusters run at the same time and only job stop, start creates a downtime which is way shorter then the only available option. Does anyone know if this and when this second option will be available for cases like autoscale/ user maintenance/ etc.? And will it be compatible with custom autoscaling rules?
Auto scaling group: Terminate burstable instance with lowest CPU credit balance first
Hi, How can we update our Elastic Beanstalk environment to terminate - during an automatic down-scaling event - the instance with the lowest amount of CPU credit balance? Currently, when scaling down, it terminates the oldest instance, leaving new instances in place that may have only just started to accumulate CPU credits. Thank you for any help in this regard.
AWS Batch: How to enable metrics on EC2 auto scaling groups?
AWS Batch creates auto scaling groups for managed EC2 compute environments. I would like to monitor the auto scaling behavior but these auto scaling groups are created with CloudWatch metrics disabled. I have not found a way to configure a compute environment such that its auto scaling groups get created with **metrics enabled**. Is there a way to do this?
Elastic beanstalk custom scaling policy
Currently i'm working on scaling my elastic beanstalk environment based on memory_used metric. Based on research i found out that i need to create the scaling policy and attach it to the alarm in the postdeploy hooks, as cloudwatch agent is needed to collect the mem_used_percent metric. So this is what i've done so far: 1- In the .ebextentions i created a config file for the clowdwatch agent. 2- In the .platform/hooks/postdeploy i created a .sh script to create the policy and clowdwatch alarm note: I'm using Immutable updates for the elastic beanstalk environment The issue i have is that when i print the Autoscaling group name i find out that it prints the temporary autoscaling group name not the permanent one so the policy isn't created. How i can fix it ? ``` #!/bin/bash sudo yum install jq INSTANCE="`wget -qO- http://169.254.169.254/latest/meta-data/instance-id`" Region="`curl --silent http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region`" Account="`curl -s http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r .accountId`" AutoScalingGroup="`aws autoscaling describe-auto-scaling-instances --instance-ids $INSTANCE --query 'AutoScalingInstances.AutoScalingGroupName' --region $Region`" echo "Printing AutoScalingGroup - Create_scaling" echo "$AutoScalingGroup" #Create scale up policy aws autoscaling put-scaling-policy --auto-scaling-group-name $AutoScalingGroup --policy-name my-simple-scale-up-policy-2 --policy-type SimpleScaling --adjustment-type ChangeInCapacity --scaling-adjustment 1 --cooldown 60 --region $Region PolicyUp="`aws autoscaling describe-policies --auto-scaling-group-name $AutoScalingGroup --region $Region --query 'ScalingPolicies[?PolicyName==`my-simple-scale-up-policy-2`].PolicyARN |  ' `" #Create alarm on memory and link with scale up policy aws cloudwatch put-metric-alarm --region=$Region \ --alarm-name 1ScalingMemSpaceUtilization\ --alarm-description "Alarm when MemSpaceUtilization exceeds 80 percent" \ --metric-name mem_used_percent --namespace CWAgent --statistic Average \ --period 300 --threshold 80 --comparison-operator GreaterThanThreshold \ --dimensions Name=AutoScalingGroupName,Value=$AutoScalingGroup Name=InstanceId,Value=$INSTANCE --evaluation-periods 1 \ --alarm-actions $PolicyUp --unit Percent ``` * The AutoScalingGroup varaible is used to get the name of the current autoscaling group. * The PolicyUp variable is used to get the ARN of the created policy to be linked with the alarm, so when the alarm is "IN ALARM" state it triggers the scaling policy.
Handling Java RMI in AWS ASG
We have 2 services front end api service and a backend service. In order to get high tps we are using async calls. 1. End user http call lands on one of the tomcat servers in frontend 2. The frontend calls backend in Async with the context of the server ip and puts the request thread to sleep 3. Once backend finishes the job it makes a callback to frontend using rmi with the server ip it got in context 4. In the callback the original http thread is invoked. 5. The invoked http request thread consumes the prepared data from cache and completes the response. This was fine till we were in physical DC as we used to not scale or de-scale. With AWS ASG the server ip might not exist by the time backend service tries to make a callback. Due to this the request at the user end needs to get requests retried. We want to get out of RMI here and still remain async. Would like to get any solutions for this
aws auto scaling routing
Did auto scaling setup and using Step scaling policy to scaleout and scalein. when CPU Max reaches 40 above Scaling is happening and another server came to available also but sometimes request is going to the first server which has high CPU utilization because of that server is crashing. Using round robin in load balancer still its not routing properly. How to solve it?
Slow down ASG target tracking scale out
From what I can tell, ASG with target tracking does not define a cooldown period. As a result, if instances are slow to initialize, the ASG could scale out again, before the new instances join the work. Is there a way to make it wait longer before scaling out again?