Architecting to scale Flashcards
What is a loosely coupled architecture?
Where components can stand independently and require little or no knowledge of the inner workings of the other components
Why use a loosely coupled architecture for scalability?
4 points
1) provides abstraction
2) Interchangeable components
3) More atomic functional units
4) you can scale components independently
What is horizontal scaling? (4 points)
1) Where you add instances as demand increases
2) no downtime required to scale up or down
3) You can do this automatically using auto-scaling groups
4) theoretically unlimited
What is vertical scaling (4 points)?
1) Where you add more CPI and or RAM to an existing instance as demand increases
2) Requires restart to scale up or down
3) Would require scripting to automate
4) limited by instance size
Define scale out…
Where you add another instance
Define scale up…
Where you increase resources of an instance
Define scale in…
Where you remote an instance
Define scale down…
Where you decrease the resources of an instance
Why would you scale out over scaling up?
Because demand is never constant! So you will be wasting resources when scaling up…
What is the key benefit of scaling out?
Cost savings!
What are the 2 types of autoscaling offered by AWS?
1) EC2 autoscaling
2) Application autoscaling
What is AWS auto scaling? and why would you use it?
What- Provides a centralised way to manage scalability for whole stacks and can provide predictive scaling.
why- Gives you the ability to manage EC2 and application autoscaling from a unified standpoint
What are the 4 scaling options with EC2 autoscaling groups/types?
1) Maintaining- Keep a specific or min number of instances running
2) Manual- use max and min or specified number of instances
3) schedule- increase or decrease instances based on a schedule
4) Dynamic scale based on real-time metrics of the system
What is a launch configuration? and what 7 things do you include in this?
A launch configuration is an instance configuration template that an Auto Scaling group uses to launch EC2 instances. When you create a launch configuration, you specify information for the instances.
1) Include the ID of the Amazon Machine Image (AMI)
2) the instance type
3) a key pair
4) one or more security groups
5) a block device mapping
6) define a health check grace period
7) the scale type (how we want to scale)
What is a health check grace period?
A time period that the scaling policy will allow to let that system to spin up before checking the health of that service.
Which use case would be the most appropriate for a maintain scaling type?
When you always need X number of instances always
e.g. 3
Which use case would be the most appropriate for a manual scaling type?
My needs change so rarely that I can just manually add and remove instances
Which use case would be the most appropriate for a scheduled scaling type?
Every Monday morning we get a rush on our website
Which use case would be the most appropriate for a dynamic scaling type?
When CPU utilisation gets to 70% on current instances, scale up
Within the dynamic scaling type, we have EC2 autoscaling policies. Name and describe the 3 policies…
1) Target tracking policy- Scale based on a pre-defined or customer metric in relation to a target value
2) Simple scaling policy- wait until health checks and cold down period expires before evaluating new need
3) Step scaling policy- Responds to scaling needs with more sophistication and logic
Which use case would be the most appropriate for a target tracking policy…
When CPU utilization gets to 70% on current instances, scale up
Which use case would be the most appropriate for a simple scaling policy…
Let’s add new instances slowly and steadily
Which use case would be the most appropriate for a step scaling policy…
AGG add all the instances!
What is a scaling cooldown?
Configurable duration that gives your scaling a chance to “come up to speed” and absorb load.
Different than a health check!