ReportNotes Module10 YMNO
ReportNotes Module10 YMNO
Service တ ျားတအ
ဲ့ ခေါ users တတွေလိုခ
ိ င်တဲ့ text တတွေ image တတွေ video တတွေ မမန်ဆန် ီျား reliable မြစ်တဲ့
way န ဲ့website တတွေ serve တ ျားရတယ်
Elastic load balancing က AWS service တစ်ခိုမြစ် ီျားတတ ဲ့ ဝင်လ တဲ့ network traffic ကိို multiple
targets တတွေမြစ်တဲ့ EC2 instance, containers, IP address တတွေမ distribute လို ်တယ်.
Distribute လ ို်တ
် တ
ဲ့ နရ မ Single availability zone or multiple availability zone မြစ်နင
ိို တ
် ယ်.
Protocol data တ ေါ်အတမခ ခံ ီျား Connections တတွေကိို Target ဆီ route လို ်တ ျားတယ် TCP UDP
Traffic တတွေအတွေက် တက င်ျားတယ်
အလ
ဲ့ ိိုမ ိ ျား load balancers န target
ဲ့ ဆီသွေ ျားတဲ့ connections အတွေက်လည်ျား protocol န ဲ့port
number ကိိုသျားံို ီျား configure လို ်ထ ျားတယ်
တကယ်လိို load
ဲ့ balancerက unhealthy မြစ်တနတဲ့ target တတွေကိို တတွေွေ့ရတအ
ဲ့ ခေါ သူက အဒ
ဲ့ ီ target
ကိိုသွေ ျားတနတဲ့ traffic ကိိုရ ်လိိုက်တယ် အဒ
ဲ့ ီ target က မ န် ီျား healthy မြစ်တနမ load balancer က
traffic ကိိုမ န် ီျား route လို ်တ ျားတယ်
1. High Availability
အမမတမ်ျားလိိုလိို downtime နည်ျား ီျား Available မြစ်တစြိိုနဲ့ ဲ့ကိိုယ်ဲ့ applications တတွေအတွေက် fault
tolerance ိတ
ို က င်ျားတစြိိုသံ
ဲ့ ျားို နိင
ို တ
် ယ် သူက traffic တတွေကိို Availability zone အမ ျားကကီျားက
healthy targets အမ ျားအမ ျားမ balance ညီတအ င် distribute လို ်တ ျားထ ျားတအ
ဲ့ တွေက်မြစ်တယ်
Amazon Elastic container serverကိို ထထဝင်ဝင် intergate လို ် ီျားတတ ဲ့ သူတ ျားတဲ့ အကိုန ်
စီစဥ်ထ ျား ီျားသ ျား container offering လိိုမ ိ ျား အက ိ တက ျားဇူျားတတွေရိနင
ိို ်
ကိိုယ်လို ်ြိိုလိ
ဲ့ ိုတ က service တစ်ခက
ို ိို load balancer သံျားို ီျား register လို ်ရို ံ Amazon ec 2က အဲ့
registration တတွေကိို manage လို ်တ ျားတယ် dock containers တတွေရ deregistration
ဲ့ ကိို ေါ လို ်တ ျား
တယ်
Load balancerက auto အတနန ဲ့portတတွေကိို detectလို ်တ ျားတယ် သူဘ သူ configure မ န်လို ်တ ျား
သွေ ျားတယ် တမခ ျား use csaes တတွေအမ ျားကကီျားလည်ျားရိနင
ိို ် ေါတယ်
CloudWatch ကအဒ
ဲ့ ီ datapoints တတွေကိို order စီထ ျားတဲ့ metrics တတွေမြစ်တဲ့ time series data
တတွေကိို statistics ံိုစံန ထို
ဲ့ တ်တ ျားတယ် ဒီ metrics တတွေကတနတစ်ဆင်ဲ့ ကိိုယ်က ကိိုယရ
်ဲ့ system
ဲ့
ကကီျားတကယ်တမ်ျား ထင်တအ
ဲ့ တိိုငျား် တက င်ျားတက င်ျားလို ်တနရလ
ဲ့ ျားဆိတ
ို ကိို အတည်မ ီျားစစ်လိူရတယ်
ဲ့
တကယ်လိို ကိ
ဲ့ ိုယ်ကကိိုယရ
်ဲ့ Load
ဲ့ balancers ကိိုလ လို ်တဲ့ requests တတွေရ detailed
ဲ့ info
တတွေကဘယ်လိိုတတွေလဆိတ
ို သိြိို Access
ဲ့ logs ကိိုသျားံို လိိုရတယ်
ဲ့ ီျားရင်အဒ
ဲ့ ေါကိို Amazon s3 မ log file
အတနနသိ
ဲ့ မ်ျားထ ျားလိိုရတယ်
ဲ့
အဒ
ဲ့ ီ Access logsတတွေကိို Traffic patterns တတွေကိို Analyze လို ်ြိိုကိ
ဲ့ ိုယရ
်ဲ့ backend
ဲ့ applications
တတွေ Target တတွေရ issue
ဲ့ တတွေကိူအတမြရ ြိိုအတွေ
ဲ့ က်သျားံို လိိုရတယ်
ဲ့
တန က်ဆျားံို တနန ဲ့AWS CLOUDTrailကိို Elastic cloud Balancing APIကိိုလ request တဲ့ callsတတွေရ ဲ့
detailed infoတတွေကိိုသရ
ိ ြိိုအတွေ
ဲ့ က်သျားံို လိိုရတယ်
ဲ့ ီျားရင် Amazon s3မ log file အတနန ဲ့store
ထ ျားတယ်
-------------------------------------------------------
Section 2 - Amazon cloud watch
What is Amazon cloud watch?
ဥ မ အတနနဆိ
ဲ့ ိုရင် CloudWatch metric မ ကိိုယ်တိိုငျား် တ ခ င်တ က ဒေါတတွေလည်ျားမြစ်နင
ိို တ
် ယ်
EC2 instance CPU Utilization, Elastic Load Balancing request latency, Amazon
DynamoDB table throughput, Amazon Simple Queue Service queue length တတွေ even
တကယ်လိို ကိ
ဲ့ ိုယ်ရ
ဲ့ ကိ
ဲ့ ိုယ် ိိုင ် apps တတွေ IT infrastructure တတွေအတွေက် ကိိုယ်ကိိုတိိုင ် specify
လို ်ထ ျားတဲ့ Custom metrics တတွေအတွေက်လည်ျား Alarm တစ်ခိုကိို create လို ်ထ ျားလိိုရတယ်
ဲ့
streams, Amazon ECS tasks, Step Functions state machines, Amazon SNS topics,
Amazon SQS queues and built-in targets within CloudWatch events.
CludWatch events တတွေကoperational changes တတွေမြစ်လ ရင် aware ရိတယ် ဘ လိိုလ
ဲ့ ဆိတ
ို တ ဲ့
သူက မြစ်လ တဲ့ changes တတွေ မ န်လည်တံိုမ ဲ့ န်ရတယ် မန်ကန်တဲ့ လို ်တဆ င်သင်တ
ဲ့ ဲ့ actions
အဒ
ဲ့ ေါကိိုစသံျားို ြိို ဲ့cost တတွေဘ တတွေ တမခ ျားထ ် ီျား တ ျားစရ မလိိုဘျားို ကိိုယ်သျားံို သတလ က် တ ျားြိို လိ
ဲ့ ိုအ ်
တယ်
တစ်ခိုကိိုတရွေ ျားရမယ်
အဒ
ဲ့ ီ metric က threshold ကိို breach ခ ိ ျားြ က်ဝင်တရ က်လိိုက်တအ
ဲ့ ခေါမ အဒ
ဲ့ ီ Alarm ကိို
အကမြတ်စစ်တဆျားခ ိနတ
် ခ ိ ွေ့အတွေက် trigger လို ်လိိုက်တယ်
ကကိိုယ်လိိုခ င်တC
ဲ့ loudWatch metric ကိိုတမ တ မြစ်တယ် ဥ မ ဆိရ
ို င် AWS/EC2
လိိုမ ိ ျားမြစ်တယ်
equal to ဒေါမမဟိုတ် ကိိုယ်တ ျားထ ျားတဲ့ threshold value ထက်ငယ်တနတ မ ိ ျားတတ်ွေ ဘယ်အတမခအတန
မဆိို သတ်မတ်လိိုရတယ်
ဲ့
Additional configuration: တမခ ျား configure အတနန ဲ့information တတွေထ ် ီျားမ င်လိိုရတသျားတယ်
ဲ့
အမ
ဲ့ ဆိို Alarm ကိို trigger လို ်နင
ိို ြ
် ိို evaluation
ဲ့ လို ်တနတကဲ့ က ခ ိနအ
် တွေငျား် မ သူတက ်လွေနရ
် မယ်ဲ့
သတ်မတ်တ ျားရမယ်
---------------------------------------------------------------------------------------------------------------------
ဒေါတကက င်က
ဲ့ ိိုယ်က Wednesday မ အရမ်ျား demandတတွေ workload တတွေမ ျားတ ကိို တမြရင်ျားြိိုအတွေ
ဲ့ က်
Capacity ကိိုလံိုျားဝအမမင်ဆ
ဲ့ ျားံို ထ ျားလိိုက်တယ်
မ သန က တမခ ျားတနတတွေ
ဲ့ မ က Workloadတတွေ demand တတွေသိ ်မမ ျားတတ ဲ့ အဒ
ဲ့ ီ resource တတွေက
ကိုနက
် စရိတ်တတွေက မလိိုအ ် ကိုနလ
် မယ် တကယ်လိိုကိိုယ်က ကိုနက
် စရိတ်တတွေတလ ခ
ဲ့ င်လိို ဲ့
တတွေလံိုျားဝတနျားသွေ ျားမယ်
မြစ်လ နိင
ို တ
ိ ယ် Users တတွေက ကိိုယ်ဲ့ app ကိိုသျားံို ရအဆင်မတမ နိင
ို ဘ
် ျားူ
Amazon EC2 auto scaling က AWS service တစ်ခိုမြစ်တယ် ကိိုယ်ဲ့ application ကိိုအမမ
available မြစ်တစြိိုအတွေ
ဲ့ က် လို ်တ ျားထ ျားတယ် EC2 instances တတွေကိို ကိိုယ်လိိုတဲ့ အတမခအတန
ရလိ
ဲ့ ိုအ ်ခ က်တ ေါ်မူတည် ီျားတတ ဲ့ manual လို ်ထ ျားတဲ့ schedule အလိိုက် demand
တမ င်ျားရင်တမ င်ျားသလိိုမ ိ ျား Ec2 instances တတွေကိို add လို ်တ ျားတယ် remove လို ်တ ျားတယ်
သူက Predictive scaling အတွေက် လည်ျား AWS auto scaling နတဲ့ ေါင်ျား ီျားသံျားို လိိုရတယ်
ဲ့
Amazon မ weeklyအလိိုက် network traffic တတွေရိမယ် သူက November လကိုန ် Friday တတွေ
မြစ်သွေ ျားတယ်
တကယ်ဆိို Amazon
ဲ့ ကသ အဒ
ဲ့ ီ မသံျားူ မ ျားဆံျားို အတမခအတနအတွေက် fixed capacity ကိိုသျားံို မယ်ဆိိုရင်
စိုထ ျားတအ
ဲ့ ရ ကိိုတမ တ group ရ size
ဲ့ က ကိိုယ်လိိုခ င်တဲ့ capacity အတိိုငျား် configure လို ်ထ ျားတဲ့
Demand တ ေါ်မူတည် ီျား manually or automatic scaling ကိိုသျားံို ီျားတတ ဲ့ size ကိိုညလ
ိ ိိုရတယ်
ဲ့
တအ
ဲ့ ခေါတိိုငျား် မ Amazon ec2 scaling က အလိိုအတလ က် size ကိိုခ ိနည
် ိတ ျားတယ် အဒ
ဲ့ ေါဆိိုရင်
instances ရအတရအတွေ
ဲ့ က်တတွေကိိုသတ်မတ် ီျားသ ျားမြစ်သွေ ျားမယ်
Auto scaling policies ကိိုြန်တီျားမယ်ဆိိုရင် Amazon ec2 auto scaling က application ရ Demand
ဲ့
မ ျားလ ရင် ဒေါမမဟိုတ်နည်ျားလ ရင် instances တတွေကိို launch ဒေါမမဟိုတ် Terminate တတွေလို ်တ ျား
သွေ ျားတယ်
လိိုတခေါ်
ဲ့ တဲ့ configuration templateတစ်ခိုကိိုသျားံို တယ် Launch configuration ကိို create
လိိုက်တအ
ဲ့ ခေါမ ကိိုယ်က scaling လူ ်တအ
ဲ့ ခေါမ ဘယ် information instances တတွေကိိုအသံျားို မ မလ
တန က်တစ်ဆင်မ
ဲ့ Instances တတွေရ အနည်
ဲ့ ျားဆံျားို အမ ျားဆံျားို limit ကိိုသတ်မတ်ရမယ် ီျားရင် Auto
scaling group ရ လိ
ဲ့ ိုခ င်တဲ့ capacity ကိိုသတ်မတ်ရမယ် ီျားရင် VPC အတွေငျား် မ ရိတဲ့ Subnet
Amazon EC2 Auto scalingက Elastic load balancing နတဲ့ ေါင်ျား ီျားတတ ဲ့ ရိ ီျားသ ျား auto scaling
Attach လို ် ီျားရင် သူက instances တတွေကိို auto register လို ်တ ျားသွေ ျားတယ် ီျားတ နဝင်
ဲ့ လ တဲ့ traffic
scaling groupမ runတနတဲ့ instances တတွေကိို ံိုမန် health check လို ်တ ျားတယ် တကယ်လိို ဲ့
unhealthy instance ကိိုတတွေွေ့မယ်ဆိိုရင် terminate လို ်လိုိက် ီျား instance ကိိုတမခ ျားအသစ်တစ်ခိုန ဲ့
အစ ျားထိျားို လိိုက်တယ်
လစဥ်တနစဥ်
ဲ့ အ တ်စဥ် ဆိို ီျားအတိအက ထ ျားလိိုရနိ
ဲ့ ငို တ
် ယ်
Demandတ ေါ်မူတည်တဲ့ Scaling ကScaling events တတွေအတွေက် Amazon cloudwatch ကိို CPU
option ကအဒ
ဲ့ တ
ီ မ င်ျားတနတဲ့ condition တတွေမ scale လို ်နင
ိို ြ
် ိို ဲ့တတ ်တတ ်အသံျားို ဝင်တယ်
ကိိုယ်သခ
ိ င်တဲ့ traffic တတွေ တနစဥ်
ဲ့ အ တ်စဥ် အသံျားို မ တနတဲ့ EC2 usage pattern တတွေကိိုကကိ တင်
ခန်မဲ့ န်ျားလိိုရမယ်
ဲ့
အဒ
ဲ့ ီ model က စ ီျားpredict လို ်နင
ိို ြ
် ိိုအတွေ
ဲ့ က် အနည်ျားဆံျားို historical data တစ်ရက်စ လိိုအ ်တယ်
မြစ်လ နိင
ို တ
် ခ တတွေကိိုြန်တီျားတ ျားတယ်
instances န ဲ့load balancers ဆီက ရထ ျားတဲ့ information ကိိုအတမခ ခံထ ျားတဲ့ CloudWatch alarm
တကယ်လိို Threshold
ဲ့ ကိိုခ ိ ျားတြ က်လိိုက် ီဆရ
ိို င် Cloud Watch alarm က Automatic scaling
event ကိိုတခေါ်လိိုက်တယ် ီျားရင် auto scaling grupo မ ရိတဲ့ ec2 instances တတွေကိို Scale in တတွေ
Amazon cloudwatch ကိို create လို ်တ ျားတယ် ီျားတ န ဲ့automatic scaling policies တတွေကိို
runတယ်
တကယ်လိို fleet
ဲ့ တစ်ခိုလျားံို ရ ဲ့ မ်ျားမျှ CPU Utiluzation က 60% ကိို 5မိနစ်ထက် ိို ီျား တက ်သွေ ျား
မယ်ဆိိုရင် ec2 auto scaling က auto scaling group ကိူ Ec2 instance တစ်ခိုကိို
ီျားရင် ec2 auto scaling က Auto scaling group ထကိို Ec2 insntace ကိိုထည်လ
ဲ့ ိိုက်ြိို သူ
ဲ့ က Elastix
load balancing ကိိုတခေါ်လိိုက်တယ် ီျားရင် load balancing ကလိိုအ ်တဲ့ health checks
တတွေမ လို ်တယ် ီျားတ န ဲ့health အဆင်တမ ရင် traffic ကိိုအဲ့ instance ဆီကိို distribute
လို ်လိုိက်တယ်
Elastic load balancing က traffic ကိို EC2 instances ကက ျားထမ route လို ်တ ျား ီျားတတ ဲ့ Metric
ကိိုယ်အ
ဲ့ တွေက် အဒ
ဲ့ ီ service က ရိိုျားရင် ီျား တကယ်သျားံို နိင
ို တ
် ဲ့ user interface ကိိုတ ျားထ ျားတယ် အဒ
ဲ့ ီ
interface ကတနမ Amazon EC2 instances and Spot fleets, amazon elastic container
services, Amazon DynamoDB tables and indexes and Amazon Aurora replicas တတွေလိုိ
ကိိုယ်ရ
ဲ့ Ec2
ဲ့ instances တတွေကိို dynamically scale လို ်ခ င်ရင် တမခ ျား AWS service တတွေအတွေက်
additional resources တတွေကိို scale လို ်ခ င်တ မ ိ ျားမ We can use Amazon EC2 auto scaling
service.