• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/18

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

18 Cards in this Set

  • Front
  • Back

What is blue green deployment?


  • Shifting traffic between 2 different envs running 2 code versions
  • Blue is current, green is desired

How does it typically work with a DNS-Based approach? How is the DB affected?

  • Route 53 changed to point to an running app (usually the elb of this)
  • DB referenced by old app is no longer routed to since the app can't be reached from the outside world

Why are blue/green deployments more viable with cloud than on-premise?

Because you don't need dedicated hardware/software to do this - you pay per use on the cloud and then it's torn down and used for someone else.

What are 2 example of canary testing?

  • Diverting a small fraction of traffic through to the new version of the app
  • Hitting with your test traffic from outside of the ELB side before 'opening the front door' via ELB

How can blue green alleviate performance issues that are discovered?

You can provision a brand new set of (upgraded) resources on the next build to fix the issue

How can we make builds more cost effective during the deployment window?

  • Scale up resources as we scale up traffic to the new green env
  • Scale back blue traffic as it recedes, and then decommission blue

What are the AWS technologies that facilitate blue/green? How do they work?

  • Route 53 - switch to a different instance by using a short TTL record value
  • ELB - Allows you to route a portion of traffic, and to auto scale
  • Auto Scaling - lets you define policies/lets you keep apps on standby
  • Elastic Beanstalk - Can use auto scaling and ELB without worrying about managing the infrastructure - (abstracts it away)
  • Cloudformation - create templates, integrate with route 53 to switch them over
  • Cloudwatch - check the health of your deployment

How does ELB work with scale up?

Check an ec2 instance for signs of life (e.g by pinging) and bring them into the green pool once they reach a success threshold.

How does ELB work with scale down?

Check an instance for signs of life (e.g by pinging) and bring them out of the blue pool after a certain failure threshold.

How do Autoscale groups and ELB work together to phase in handling new traffic?

  • You set up a new autoscale group for your green deployment
  • You attach the new (green) auto scale group to the load balancer, leaving blue (old) alone

How does traffic reach the new version of the application gradually when we use an ELB/AutoScale approach?

The load balancer will favour sending the traffic to nodes in the new pool since they have the fewest requests in service (by definition since they're brand new)

How do we phase out the old group?


  • Wait for the green instances to be handling traffic without issue
  • You can start phasing out the blue group by putting instances on standby and eventually terminate them.

How does an auto-scaling approach work with blue/green deployments for services built from a launch configuration?

  • You can alter the launch configuration associated with an autoscaling group.
  • New instances use the new config, old ones retain the existing one
  • Set the auto scale group to use the new launch config
  • Set the size of the group to be double the original size, this will create a second set of instances, using the new launch config
  • Flip the group size back to normal once all the new instances are up and running - by default the oldest configs will be the ones that are removed.

With auto-scaling, what is an approach that allows you to quickly flip back to the blue config if something went wrong?

  • Instead of sizing up the group to double, you can revert the launch configuration of the ASG instead
  • Keep the instances with the old config to standby to be able to build an AutoScale group quickly.

How does elastic beanstalk work?

Upload a zip file of configuration and let ELB work out your actual required capacity.

How does OpsWorks support deployments?

  • Create a stack of related resources (EC2/DB/Elastic Load Balancing) and copy new set of resources.
  • Cut over to the new one

What technique does Route53 give for a gradual cutover?

Weighted routing

What's the best approach for managing database changes as part of a deployment?

  • De-couple the code changes from the schema
  • Whichever order you make the changes one must be backwards compatible with the other