3. Intro - 이 세션에서 기대하는 것
처음으로 AWS를 시작하는 고객들에게
가장 효율적인 접근 방법을 비용 중심으로
소개
올바른 사이징, 구매옵션, 아키텍처, 그리고
각종 관리 등을 통한 실제 Cost
Optimization 사례 전달
비용에 대한 두려움 없애기
4. AWS 를 시작하면서…
1. 계정을 만들고, 기본 보안 설정을 함
2. AWS SA들과 최적 아키텍처 만듦
3. Elastic Compute Cloud (EC2) 생성해 봄
4. EC2 Backup 도 해보고 restore를 해봄
5. SNS 를 이용해서 필요한 알람을 걸기도 함
6. Amazon Simple Storage Service (S3) 에 object를
업로드 하고 public 웹서비스도 해봄
7. POC 하면서 마이그레이션 플랜도 짜봄
7. 총소유비용 TCO(Total Cost of Ownership)?
정의 : 특정 기술 혹은 서비스에 대한 구현비용을 결정하기 위해 드는
직간접적인 비용, HW & SW 획득, 설치, 교육, 지원, 유지보수, 기반구조,
가동중지, 공간 및 에너지
사용예:
1) 전체 혹은 일부 인프라를 운영하는데 드는 on-premise 혹은 co-loacation
비용을 AWS와 비교할 때
2) AWS로 마이그레이션할 예산작업(budgeting)이나 사업 보고서(business
case)를 작성할 때
9. On-Premises Cost 이해하기
비용최적화 마이그레이션
전략을 세우기 위해 현재
비용을 정확히 이해하는 것이
중요합니다.
It is important to accurately
understand your current costs
in order to know how to build
your migration model for
optimal cost efficiency.
10. TCO = acquisition costs + operations costs
Hardware – Server, Rack
Chassis PDUs, ToR
Switches (+Maintenance)
Software - OS,
Virtualization Licenses
(+Maintenance)
Facilities Cost
Hardware – Storage Disks,
SAN/FC Switches
Storage Admin costs
Network Hardware – LAN
Switches, Load Balancer
Bandwidth costs
Network Admin costs
Server Admin Virtualization Admin4
Diagram doesn’t include every cost item. For example, software costs can include database, management, and middle-tier
software costs. Facilities cost can include costs associated with upgrades, maintenance, building security, taxes, etc. IT labor
costs can include security admin and application admin costs.
Space Power Cooling
Facilities Cost
Space Power Cooling
Facilities Cost
Space Power Cooling
Server Costs
Storage Costs
Network Costs
IT Labor Costs
1
2
3
illustrative
11. 전통적인 인프라 준비 및 운영
전통적인 data center의 한계
비탄력적인 물리 자산 비용 일괄적으로 계산하기 쉽지 않음
높은 확장 및 이전 비용 예상치 못한 오류로 인한 비용
15. 비용최적화를 위한 4가지 축
Right Sizing
(적절한 용량산정)
Purchase
Option
(구매옵션)
Increase
Elasticity
(탄력적 아키텍처)
Measure,
Monitor, &
Improve
(지속적 관리)
16. Right sizing
Right sizing 적절한 용량산정
• 필요한 성능을 가진 instance 중 가장 저렴한
것을 고른다.
• CPU, RAM, storage, network utilization 등을
모니터링 하면서 down sizing할 인스턴스를
찾는다.
• Amazon CloudWatch metrics나 custom RAM
metrics으로 계속해서 모니터링 하면서 타입을
조정한다.
요령: 용량산정 후 Reserved Instance사용
17. • 현재 워크로드와 잘 맞는 instance type을 찾아야 함
– 필요한 성능 정의
– 현재 성능 모니터링
– Change Instance Type
Instance 선택 = Performance Tuning
18. Purchase Option(구매옵션) – 예약 인스턴스(RI)
계약기간
1 Year
3 Year
AWS Services Offering RIs
Amazon EC2
Amazon RDS
Amazon DynamoDB
Amazon Redshift
Amazon ElastiCache
* Dependent on specific AWS service, size/type, and region
19. Purchase Option(구매옵션) – 예약 인스턴스(RI)
Step 1: RI Coverage
• 항상켜져 있는 instance에 적용
Step 2: RI Utilization
• RI의 활용률을 높이기 위해 적용된 instance를
최대한 활용
• 필요하면 쪼개거나 합치는 것도 가능
20. Purchase Option(구매 옵션) - EC2 Spot Pricing
Users with urgent
computing needs or
large amounts of
additional capacity
Time or instance
flexible
Experiment and/or
build cost sensitive
businesses
21. * Compared to On Demand price based on specific EC2 instance type, region and availability zone
Purchase Option(구매 옵션) - Spot Instance
22. Increase elasticity – 탄력적 아키텍처
쓰지 않는 instance는 끄세요.
• dev/test, non-prod instances 인데 항상
켜져있는 것들
Autoscaling
• Auto Scaling을 통해 scale up and down
• Instance type을 작게 운용 가능
23. 적절한 용량과 탄력적 아키텍처의 적용
More smaller instances vs. fewer larger instances
29 m4.large @ $0.165/hr
$3,445.2 / mo*
59 t2.medium @ $0.080/hr
$3,398.4 / mo*
*기준 Linux instances in Seoul Region at 720 hours per month
24. 1. 24시간 켜놓아야 하는
workload들은 예약 인스턴스
2. Autoscaling 그룹을 통한
탄력적 대응
3. Spot로 먼저 생성, 필요하면
On-Demand로 대응
0
2
4
6
8
10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/Spot
On Demand
Spot
Reserved Instance
Autoscaling + Purchase Option(구매옵션)
25. Increase elasticity
Managed Service 사용하기 -ELB
Availability
Zone #1
Availability
Zone #1
EC2 Instance
+ 소프트웨어
LB
DNS
DNS
웹서버
웹서버
$ 0.025
시간당
$ 0.08
시간당 (t2.medium)
VS.
*기준 Linux instances in Seoul Region
26. Managed Service 사용하기 - SQS
Amazon
SES
Amazon
SNS
생산자
생산자생산자
EC2 인스턴스
+ 소프트웨어큐
SQS 소비자
소비자
$ 0.01
10,000 요청당(요청 당 $0.000001)
$ 0.08
시간당 (t2.medium)
VS.
*기준 Linux instances in Seoul Region
27. Managed Service 사용하기 – S3
$ 0.08
시간당 (t2.medium)
EC2 인스턴스
+ Web Server
+Streaming
Imaging
+Downloading
*기준 Linux instances in Seoul Region
web access
Streaming & image distributions
Download distributions
Amazon S3
$ 0.00
시간당 – 서버 없음
29. 실제사례
로드밸런서(이중화)
- HSRP based Active – Standby
appliance based balancer X 2
웹서버 10 대
- 4 core, 16GB ram X 10 EA
- 500GB SAS disks X 10 EA
DB 서버 2대 이중화(총 4대)
- 8 core, 32GB ram X 4 EA
- 1TB Raid 5 volumes per each
servers
- MySQL
AWS Balancer
- 1 Elastic Load Balancer ($18.3/month)
AWS EC2 Web servers:
- On-demand, m4.xlarge X 10, 100%
Utilization
- PIOPS 1500, EBS 500GB per instances
AWS RDS servers:
- On-demand, db.m4.2xlarge Multi-AZ X 2
- PIOPS 5000, 1TB Storage per instances
AWS Business level support
30. 비싸다고 생각되시나요? 이 숫자를 기억해주십시오.
$ 10,838.41/month
* Seoul Region 기준
34. 비용 VS. 실제 사용률
Money
Time
당신이 실제 쓰는 자원
당신이 내는 금액
WASTE!!
100%
10% 이하
사놓은 것 Vs. 쓰는 양
35. 인스턴스 타입 변경
EC2 – Change Instance Type 기능
수분 내에 타입 변경 가능
Down size your EC2
From m4.xlarge to t2.medium
Down size your RDS
From m4.2xlarge to m4.large
37. EBS용량은 필요한 만큼
Down size your EBS
From 500GB 1500 PIOPS to General Purpose(SSD) 50GB
Down size your RDS
From 1TB 5000 PIOPS to General Purpose(SSD) 50GB
38. 성능 및 용량만큼 조절한 결과….
to
/month
76.5% 절약!
$ 6,482.19/month
$ 1,526.45
42. Auto Scaling 적용
AWS Balancer
- 1 Elastic Load Balancer ($18.3/month)
AWS EC2 Web servers:
- On-demand, t2.medium X 2, 100% Utilization
- On-demand, t2.medium X 4, 50% Utilization
- On-demand, t2.medium X 4, 10% Utilization
- General Purpose 50 GB per instances
AWS RDS servers:
- On-demand, db.m4.large Multi-AZ X 2
- General Purpose 50 GB per instances
AWS Business level support
45. Reserved Instance 사용
AWS 로드 밸런서
- 1 Elastic Load Balancer ($18.3/month)
AWS EC2 웹서버 10대
- Partial RI 1 year , t2.medium X 2, 100% Utilization
- On-demand, t2.medium X 4, 50% Utilization
- On-demand, t2.medium X 4, 10% Utilization
- General Purpose 50 GB per instances
AWS RDS DB서버 4대
- Partial RI 1 year, db.m4.large Multi-AZ X 2
- General Purpose 50 GB per instances
AWS Business level support
46. 1 year RI 적용결과
to
/month
또 30.8% 절약!
$ 1,166/month
$ 806.4
47. 처음 그냥 계산기에 넣었던 숫자 기억하십니까?
$ 10,838.41/month
to
$ 806.4/month
$ 9,676.72/year
92.6% 절약!
48. 아직도 부담 되시나요? 꼭 기억해주세요.
API /SDK /CLI /Web Console
기술문서
표준 아키텍처
모니터링
몇 분안에 글로벌 진출
OS/ DB 라이선스 계약
Compliance/ Certificates
Network Bandwidth/ Peering
Huge number of references
초기투자 $0
Billing Options
IAM based Federation/ 보안
이중화
Hardware Security Module
…
직접 구축한다면 막대한 시간과 비용이 필요합니다.
49. 중간 요약
1. Over Provisioning 하지말자.
2. 가능한 Auto Scaling 적용.
3. Reserved Instance를 쓰자.
51. 비용최적화를 위한 지속적인 관리
Measure, Monitor, & Improve
(4번째 축 기억나세요?)
52. Measure, Monitor, & Improve - Metrics & targets
% Instances turned off daily
% of Instances Right-Sized
% Always on Resources
Covered by RIs
% RI Utilization
✔
✔
✔
✔
✘
✘
✘
✘
각 수치에 대한 기준 마련 및 추적
55. 비용은 모든 요소와 연결됨
Right Sizing
Purchase
Option
Increase Elasticity
Measure, Monitor, &
Improve
TCO
56. 요약 - 기억합시다!
1. 안쓰는 Instance는 끄고, EBS는 없애자.
2. Over Provisioning 하지말자.
3. AutoScaling 적극 활용 하자.
4. RI와 Spot을 쓰자.
5. 계속해서 Measure, Monitoring, Improve
6.Cloud에 맞는 사고 방식을 갖자.
7. AWS 와 상의하자