Please enable JavaScript.
Coggle requires JavaScript to display documents.
Auto Scaling: Gain Elasticity and Scaling your Architecture - Coggle…
Auto Scaling: Gain Elasticity and Scaling your Architecture
consideration: you need consider to combine multiple types of autoscaling
DynamoDB
2 Ways
default for all new tables
a new DynamoDB table created using the console Auto Scaling enabled by default.
general cases
specify up and lower bounds
on-demand
pay for request
adapts rapidly to accommodate the workload.
workload: difficult to predict, or has large spikes over a short duration.
an elastic infra instructure can intelligently expand and contract as its capacity needs change
EC Auto Scaling
automatically register new instances with load balancers when specified
Can lauch accross AZ
Auto Scaling integrates with ELB to enable you to attach one or more load balancers to an existing Auto Scaling group. After you attach the load balancer, it automatically registers the instances in the group and distributes incoming traffic across the instances.
Purchasing options
On-demand instances
spot instances
é uma ferramenta, n é um serviço, que vai permitir que lance mais instâncias ec2
lauch or terminate instances based on specified conditions
Amazon EC2 Auto Scaling is a service designed to launch or terminate Amazon EC2 instances automatically based on user-defined policies, schedules, and health checks.
It also automatically distributes instances across multiple Availability Zones to make applications Highly Available
Auto Scaling group that deploys Amazon EC2 instances across your Private Subnets.
This is best practice security for deploying applications because instances in a private subnet cannot be accessed from the Internet.
Instead, users will send requests to the Load Balancer, which will forward the requests to Amazon EC2 instances in the private subnets.
a Launch Configuration, which defines what type of instances should be launched by Auto Scaling. It simply stores the configuration for later use
Ways
Scheduled
use case: turn off your dev and test at night
Dynamic
use case: cpu utilization
Predictive
use case: no longer need manually adjust rules
Scaling your RDS Database
horizontal scaling: read replicas
scale node vertically up or down.
RDS requires a short downtime of 1-2 minutes when scaled, but aurora serverless can scale without any downtime.
often with no downtime, desde que tenho o secundário
AWS escala o secundário, eu aponto para ele. Depois AWS escala o master e eu aponto de novo para o master
Storage can be increased with no downtime. However, changing instance type requires downtime.
Aurora DB Cluster
Primary instance – Supports read and write operations, and performs all of the data modifications to the cluster volume. Each Aurora DB cluster has one primary instance.
Aurora replica – Supports only read operations. Each Aurora DB cluster can have up to 15 Aurora replicas in addition to the primary instance.
Note that you can have a read replica in the same region as the master.
Aurora Serveless: RDS Serveless
pay for number of ACUs (Aurora Capacity Units) used
good for spiky (pontiagudo), unpredictable workloads
provides a relatively simple, cost-effective option for infrequent, intermittent, or unpredictable workloads. It automatically starts up, shuts down, scales capacity to match your application's usage.
Aurora Serverless is an on-demand, auto scaling configuration for Aurora as a relational database without the need for managing database server infrastructure
escala e retrai automaticamente, n se preocupo com isso mais.
uma read replica é assincrona, logo no sync master/replica não é real time
mas o banco secundário é sincrono com o master
a replica do Aurora pode até ser considerada sincrona por propagação do dado é bem mais rápida que outros RDS
3 Types of Escalabilty
Time-based
turn off resources when they are not being used (dev and test environments)
Volume-based
match scale to the intensity of your demand (making sure you have enough compute power)
Predict-based
predict future traffic based on daily or weekly trends (including regular-occuring spikes)
DynamoDB: Two ways
default: escala automático a medida da necessidade
o custo pode ser alto se tiver um problema na app de muito acesso
max e min configuráveis