top | item 11591190

(no title)

earless1 | 9 years ago

I don't really see a benefit in updating existing instances in this manner. Launching replacement instances with the new code is much easier for us, and it also provides a super fast means of rollback.

discuss

order

gighi|9 years ago

Both approaches are reasonable (and there's also a third one, ship your application in containers and replace containers instead of instances).

We update existing instances because in our test environment we deploy at every single new commit (we absolutely love that), and we have hundreds (or more) a day. At that pace, replacing instances would be more time consuming (again, for our specific use case) and less cost efficient.

Plus, updating existing instances is handled automatically by AWS Code Deploy, which provides a very good deploying pipeline that you can control using the aws cli tool.

There are other minor advantages but those are the two main ones.

nzoschke|9 years ago

That's an awesomely aggressive deployment rate and a great reason to do instance mutation.

Does something verify every commit in the testing environment too?

nzoschke|9 years ago

It's really hard to replace the simplicity and reliability of letting ASG (and generally CloudFormation) roll out new instances.

However best practices always evolve...

I'd say that rolling out containers on ECS is starting to really show advantages.

It is now generally:

- easier to build and push an image than burn an AMI - faster to boot a container than an instance - faster to finish a deploy with options like min containers in service and a slack instance or two

To be honest most teams don't actually need the extra agility that containers promise.

But if I was starting an AWS setup from scratch I'd strongly consider containers on ECS.

In addition to the speed there is more portability with containers and a whole new generation of tools coming in the ecosystem.

jeffasinger|9 years ago

One potential issue with spinning up new instances on EC2 is that for larger instance sizes, if you care about the instances being in a certain AZ, there may not be enough available to do this.