သဘောတရား
Immutable infrastructure and deployments
Replace servers with new, tested images instead of changing them in place, so every instance is identical.
ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။
- 1Build and test the image once, with the patch or release inside.
- 2Register it as a golden AMI.
- 3Create a new launch template version that points to the AMI.
- 4Auto Scaling replaces the old instances with new ones from that AMI.
အဆင့်ဆင့်
- 1Build and test the image once, with the patch or release inside.
- 2Register it as a golden AMI.
- 3Create a new launch template version that points to the AMI.
- 4Auto Scaling replaces the old instances with new ones from that AMI.
A new image replaces the old instances. Nothing is patched in place.
All at once
- Capacity during update
- Brief outage
- Rollback
- Redeploy
- Extra cost
- None
Rolling
- Capacity during update
- Reduced
- Rollback
- Redeploy
- Extra cost
- None
Rolling, extra batch
- Capacity during update
- Full
- Rollback
- Redeploy
- Extra cost
- Small
Immutable
- Capacity during update
- Full
- Rollback
- Terminate the new instances
- Extra cost
- A second fleet for a while
Blue/green
- Capacity during update
- Full
- Rollback
- Switch back, instant
- Extra cost
- A second full environment
| Method | Capacity during update | Rollback | Extra cost |
|---|---|---|---|
| All at once | Brief outage | Redeploy | None |
| Rolling | Reduced | Redeploy | None |
| Rolling, extra batch | Full | Redeploy | Small |
| Immutable | Full | Terminate the new instances | A second fleet for a while |
| Blue/green | Full | Switch back, instant | A second full environment |
1 / 3
All at once
- Capacity during update
- Brief outage
- Rollback
- Redeploy
- Extra cost
- None
Rolling
- Capacity during update
- Reduced
- Rollback
- Redeploy
- Extra cost
- None
| Method | Capacity during update | Rollback | Extra cost |
|---|---|---|---|
| All at once | Brief outage | Redeploy | None |
| Rolling | Reduced | Redeploy | None |
2 / 3
Rolling, extra batch
- Capacity during update
- Full
- Rollback
- Redeploy
- Extra cost
- Small
Immutable
- Capacity during update
- Full
- Rollback
- Terminate the new instances
- Extra cost
- A second fleet for a while
| Method | Capacity during update | Rollback | Extra cost |
|---|---|---|---|
| Rolling, extra batch | Full | Redeploy | Small |
| Immutable | Full | Terminate the new instances | A second fleet for a while |
3 / 3
Blue/green
- Capacity during update
- Full
- Rollback
- Switch back, instant
- Extra cost
- A second full environment
| Method | Capacity during update | Rollback | Extra cost |
|---|---|---|---|
| Blue/green | Full | Switch back, instant | A second full environment |
ဘာလဲ
In a mutable design you log in to a server and patch or edit it. Over time every server differs, which is called configuration drift, and a failed change is hard to undo. In an immutable design you never change a running server. You build a new image with the change (a golden AMI), start new instances from it and remove the old ones. To roll back, start the old image again.
ဘာလဲ
On AWS, bake the application and its patches into an AMI. Put the AMI ID in a launch template, which an Auto Scaling group uses to start instances. For a new version, create a new launch template version and replace the instances. Auto Scaling instance refresh does this in rolling batches and keeps a minimum percentage of instances healthy. Elastic Beanstalk offers deployment policies: all at once, rolling, rolling with an additional batch, immutable and traffic splitting. A blue/green deployment runs a full new environment next to the old one and switches traffic with a load balancer or Route 53 weights, so rollback is instant.
ဘာလဲ
Immutable designs need stateless servers whose settings come at launch from a parameter or secret store. They cut drift, make failures predictable and let you recreate an environment from code.
မှတ်ထားရန်
- Replace, do not patch. Never log in to fix a production server.
- Golden AMI + launch template + Auto Scaling group.
- Instance refresh replaces instances in rolling batches.
- Blue/green: two environments, switch traffic, roll back at once.
- Elastic Beanstalk: all at once, rolling, rolling with additional batch, immutable, traffic splitting.
မှတ်ထားရန်
- It needs stateless servers, with settings kept outside the image.
စာမေးပွဲမှာ
- “Prevent configuration drift between servers” points to immutable infrastructure: a new AMI and replaced instances.
- “Deploy a new version and roll back instantly” points to a blue/green deployment.
- “Replace every instance in an Auto Scaling group with a new AMI, keeping most healthy” points to instance refresh.
- “An Elastic Beanstalk update with the least risk” points to an immutable or blue/green deployment.
ဒါတွေနဲ့ မရောပါနဲ့
AWS Auto ScalingPick the scaling policy and metric, set warm-up, and know warm pools, lifecycle hooks and launch templates.
AWS Elastic BeanstalkDeploy code and let AWS run the platform. A deployment policy sets how updates roll out.
AWS CloudFormationChange sets, drift detection, StackSets, nested stacks and deletion policies keep infrastructure correct and repeatable.
ဒီ task ထဲမှာ · 2.2
- Regions and AZs as the HA building block
- Multi-Region designs
Route 53
- Disaster recovery strategies
Elastic Disaster Recovery
- Failover and distributed design patterns
- AWS Well-Architected Framework
- Immutable infrastructure and deployments
CloudFormation
- Database high availability
- Storage durability and replication
CloudWatch
Health Dashboard
X-Ray
- Service Quotas
- Making legacy apps reliable without code changes
- Migrating workloads to AWS
- Choosing purpose-built services
- Managed AI services recap
Backup
Load Balancing
RDS Proxy
- Throttling strategies