scalable architecture

aws1. λͺ©ν‘œ

Autoscale κ°€λŠ₯ν•œ 아킀텍쳐

2. ν™˜κ²½

κΈ°λ³Έ ν™˜κ²½μ€ AWSλ₯Ό μ΄μš©ν•˜κ³ , κ΄€λ ¨ μžˆλŠ” μ£Όμš” μ„œλΉ„μŠ€λ“€μ€ λ‹€μŒ ν‘œμ™€ κ°™λ‹€.

Item

Description

VPC

virtual network environment

EC2

Compute instance(server)

AMI

Machine Image

Security Group

Network In/Outbound rule

ELB

Load Balancer

2.1 μƒ˜ν”Œ ꡬ쑰

[좜처] https://bit.ly/2UwnZcD

3. μ„€λͺ…

3.1 AutoScale

AutoScale의 경우 Scale Out을 ν†΅ν•œ μ„œλ²„ λŒ€μˆ˜λ₯Ό 늘렀 처리 λŠ₯λ ₯을 ν–₯상

AWS : EC2 Auto Scaling Azure : Virtual Machine Scale Sets

3.1.1 κ΅¬μ„±μš”μ†Œ

  1. Groups : μΈμŠ€ν„΄μŠ€ 수 μ§€μ •

  2. Configuration templates : AMI, μΈμŠ€ν„΄μŠ€ νƒ€μž…, ν‚€νŽ˜μ–΄, λ³΄μ•ˆκ·Έλ£Ή λ“±

  3. Scaling options : λ™μž‘ 쑰건 μ„€μ •

3.1.2 λ™μž‘

[좜처] https://craig.goddenpayne.co.uk/task-autoscaling-fargate/

3.2 AMI

AMI(Amazon Machine Image)λŠ” EC2λ₯Ό 처음 κ΅¬μ„±ν• λ•Œ μ§€μ •ν•˜λŠ” μ†Œν”„νŠΈμ›¨μ–΄κ°€ κ΅¬μ„±λœ μΌμ’…μ˜ ν…œν”Œλ¦Ώ

AMI μ’…λ₯˜ 1. AWS κΈ°λ³Έ 이미지 2. AWS Marketplace 이미지 3. Custom 이미지

3.3 ν”„λ‘œλΉ„μ €λ‹(Provisioning)

μ‚¬μš©μžμ˜ μš”κ΅¬μ— 맞게 μ„œλ²„λ₯Ό μ„€μ •ν•΄ λ‘μ—ˆλ‹€κ°€ ν•„μš” μ‹œ μ„œλ²„λ₯Ό μ¦‰μ‹œ μ‚¬μš©ν•  수 μžˆλŠ” μƒνƒœλ‘œ 미리 μ€€λΉ„ν•΄ λ‘λŠ” 것 (feat. wikipedia) ex) JDKλ‚˜ MySQL을 미리 μ„€μΉ˜ν•˜κ±°λ‚˜ μ„€μ •

3.3.1 도ꡬ

3.3.1.1 Packer

Build Automated Machine Images 1. Builder : 이미지 생성할 ν”Œλž«νΌ μ§€μ • (AWS, Azure, Google, docker, vmware, Hyper-V, Naver...) 2. Provisioner : 이미지 생성할 λ•Œ μ‚¬μš©ν•  λΉŒλ“œ 도ꡬ (Shell, Ansible, Chef, Salt, Puppet..) 3. Template : Builder + Provisioner μ„€μ • 파일 (output:json)

3.3.1.2 Ansible

Configuration Management Title Bar : Ansible is Simple IT Automation Automation for everyone

Packerμ—μ„œλ„ λ¬Όλ‘  shell scriptλ₯Ό ν†΅ν•΄μ„œ ꡬ성 관리가 κ°€λŠ₯ν•˜λ‚˜, script λŒ€λΉ„ ansibleμ—μ„œλŠ” νŒŒμΌκ΄€λ¦¬, νŒ¨ν‚€μ§€μ„€μΉ˜, μ‹œμŠ€ν…œκ΄€λ¦¬μ— λŒ€ν•œ λͺ¨λ“ˆ 지원

3.3.1.3 terraform

Infarstructure Provisioning Use Infrastructure as Code to provision and manage any cloud, infrastructure, or service

κ³„νšμ„ 톡해 ν΄λΌμš°λ“œμ— 배포(μ‹€μ œμ μš©)μ „ λ¦¬μ†ŒμŠ€μ˜ λ³€κ²½λ˜λŠ” λ‚΄μš©μ„ 사전 확인 κ°€λŠ₯

3.3.2 Pipeline

Stamp Pattern

[좜처] https://read.acloud.guru/immutable-ami-with-packer-a71694529d60
[좜처] https://blog.gofynd.com/how-we-rebuilt-fynds-infrastructure-3238ec757281

3.4 좔가사항

Blue/Green 배포 ν™œμš© Scale Out Pattern

[좜처] https://datacenterrookie.wordpress.com/2017/05/10/bluegreen-deployment-on-aws/

Weight Transition Pattern

[좜처] https://aws.amazon.com/blogs/startups/upgrades-without-tears-part-2-bluegreen-deployment-step-by-step-on-aws/

Last updated

Was this helpful?