10 votes
Accepted

How can I manage changes in desired capacity due to scaling policies in AutoScaling Group state?

The desired_capacity in Terraform is marked in the documentation as optional. So with a proper min_size value, Terraform can wait until the minimum capacity is reached before continuing. The above, ...
Evgeny Zislis's user avatar
9 votes
Accepted

Does the "cattle not pets" distinction apply as equally to machine instances as to containers?

While technologically, containers and virtual machines are very different, there is no apparent difference from the perspective of your software. It seems like the argument in your question is that ...
James Shewey's user avatar
  • 3,724
7 votes
Accepted

How can I autoscale instances based on Kafka topic lag?

CloudWatch is absolutely the way to go on this front, you can surface Kafka Metrics in CloudWatch either by: Having a separate process that pushes the metrics into CloudWatch. Have your Producers, ...
Richard Slater's user avatar
6 votes
Accepted

How to manage Consul and its quorum in auto-scaling environments?

I would set the leave_on_terminate option to true. As per the documentation leave_on_terminate If enabled, when the agent receives a TERM signal, it will send a Leave message to the rest of the ...
Tensibai's user avatar
  • 11.4k
5 votes
Accepted

Are distributed distributions like NixOS able to replace docker in terms of autoscaling?

Autoscaling has nothing to do with NixOS or Docker. This is just the feature of cloud backed applications. However it is true that the best results are achievable using immutable infrastructure, but ...
Hauleth's user avatar
  • 456
4 votes

I have an custom AMI and want to run certain config commands at initial boot, depending on the autoscale instance that starts it. How do I do this?

If I am understanding you correctly, you have one AMI used in several autoscaling groups and want to run a specific “bootstrap” sequence on it depending on the autoscaling group it belongs to. This ...
Michaël Le Barbier's user avatar
4 votes
Accepted

Terminate single processing server based on SQS queue condition, but keep/ reinstate autoscaling size at 1

Disclaimer: this is certainly not the best solution for backend workers, I'm just trying to be creative within the given constraints. First, you'll need to be familiar with SQS's visibility timeout (...
Woodland's user avatar
  • 1,338
3 votes

Autoscaling on GoCD agents without terminating active builds?

Auto Scaling groups have a useful feature for this, named lifecycle hooks. Worflow taken from the documentation above: As you can notice there's a Scale in step, triggering a Terminating:Wait for ...
Tensibai's user avatar
  • 11.4k
3 votes

Autoscaling containers using local request counters

The problem can easily be solved using the following components: On the instances serving your webapp continue to monitor the number of incoming requests – and anything else you see fit. Publish the ...
Michaël Le Barbier's user avatar
3 votes

Where to start? Scaling PHP applications on AWS

Here's a rough approach to scaling any stateless app on AWS: Run the app in an Auto Scaling Group (ASG). An ASG makes it easy to manage multiple servers, will automatically replace failed servers, ...
Yevgeniy Brikman's user avatar
3 votes

Can large scale services use a public cloud managed database service?

Yes, it is certainly possible, but it entirely depends on the architectural design of the entire system. Separating application services into manageable components (i.e. microservices) is one approach ...
Preston Martin's user avatar
  • 3,278
2 votes

Autoscaling containers using local request counters

One possible approach is to allow such instances to make demands for new instances based on local request counters, but instead of directly reacting to those demands you would funnel them to a central ...
Dan Cornilescu's user avatar
2 votes

Cloudformation issue with target groups and ASG

Resources: ...
vissree's user avatar
  • 21
2 votes

Autoscaling on GoCD agents without terminating active builds?

My concern is that when scaling down, the ASG may terminate instances that are in the middle of a build. It the builds are running then one should prevent down scaling. When the build has been ...
030's user avatar
  • 13.2k
2 votes

Spread pods over cluster

You should look into affinity and anti-affinity as that allows you to control what pods go on which node. You can have it so that with anti-affinity there is only 1 pod of each deployment on a node. ...
joshk132's user avatar
  • 465
2 votes

Are there serious problems with an EC2 auto-scaling AMI that automatically downloads newest server from git?

What you're going to do is only calling for inconsistencies between your nodes. I wouldn't do any deployment during the instance boot-up, instead install AWS CodeDeploy as part of your boot-up (or ...
MLu's user avatar
  • 1,001
2 votes

Custom Layer 4 Load Balancer

Historically, F5's Application Delivery Controller has been the enterprise-grade industry solution for doing this. With this solution you can: Use iRules LX to communicate with other software to auto-...
James Shewey's user avatar
  • 3,724
1 vote

When do I scale services on Azure DevOps?

Azure DevOps is already replicated across multiple Azure Data Centers. They did this after the south east data center hosting Azure Devops (then VSTS) went down for a few days, bringing down the ...
xtreampb's user avatar
  • 443
1 vote
Accepted

Spread pods over cluster

Take a look at the Descheduler. This project runs as a Kubernetes Job that aims at killing pods when it thinks the cluster is unbalanced. The LowNodeUtilization strategy seems to fit your case: This ...
Eduardo Baitello's user avatar
1 vote

Terminate single processing server based on SQS queue condition, but keep/ reinstate autoscaling size at 1

Use AWS Automation document on state change to modify autoscaling group to 0 and return to 1 after. It should terminate and recreate.
anVzdGFub3RoZXJodW1hbg's user avatar
1 vote

What are best practices for over-committing resources in a staging environment?

Very good question; I'm interested to see what comes up here. In terms of cost, obviously each company and team is different. Ideally, everyone should be resource and cost conscious... but most ...
John Humphreys's user avatar
1 vote
Accepted

private subnets in an Auto Scaling Group on aws?

There is a range of common scenarios when you want to use private subnets to be used in an auto scaling group: Your traffic is terminated by reaches your infrastructure on a Elastic Load Balancers ...
jdog's user avatar
  • 650
1 vote

How to run database migrations in an auto-scaled group

Many orm's store migration state in the DB itself, but if you do it 'manually' its not hard to build yourself either. Just have a "migrationstate" table where all executed migrations are stored. That ...
Trondh's user avatar
  • 381
1 vote

How to run database migrations in an auto-scaled group

How are you doing your deploys? Nuke + rebuild the ASG (whether one node at a time, or by replacing the whole group at once), or do you have a script that redeploys all of your active nodes? And ...
maplebird's user avatar
  • 676
1 vote

Aws autoscaling group in private subnet, private communication?

I am assuming that the backend application has been set up in its own subnet that has been configured for private IP addresses only. If not I would recommend that you do that as a starter for 10. ...
Marcus Adams's user avatar
1 vote
Accepted

Do I need an orchestration tool to autoscale/scale on demand my web service?

Yes. And there are tools out there covering this piece of functionality. Probably the most popular one is kubernetes (see also kubernetes): Kubernetes (k8s) is an open-source system for ...
Dan Cornilescu's user avatar
1 vote

Auto-scaling, how to securely get code from private repo

If the repo is on AWS Codecommit, you should be able to access it via a role setup for each type of instance. See under IAM role here https://docs.aws.amazon.com/codecommit/latest/userguide/auth-and-...
jdog's user avatar
  • 650
1 vote

Auto-scaling, how to securely get code from private repo

Another option is to use saltstack's product: salt This Configuration Management System (CMS) can protect sensitive data in three ways. 1) Pillars; these are securely stored and encrypted key:value ...
Alan-Cugler's user avatar
1 vote

Auto-scaling, how to securely get code from private repo

Option 1: You could place your private repo in the same VPC as the instance and then pull code from there. Just make sure the repo cannot be accessed from outside the VPC. Option 2: Ssh into the new ...
M. Oberauer's user avatar
1 vote

Kubernetes auto scaling in cloud environment

Recently Kubernetes started preview work on https://cluster-api.sigs.k8s.io which is meant to be the standard way to solve the way how High Availability clusters are deployed. The kubeadm tool has ...
Evgeny Zislis's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible