3-tier Architecture 란?
1계층: clinet-tier : presentation layer
2계층: Application Tier
3계층: Data Tier
이 세가지를 각각 다른플랫폼상에서 구현한 것
3-tier 사용 목적
사용자 어플리케이션과 물리적인 데이터베이스의 계층간 분리를 통해 역할을 분담시켜 일을 효율적으로 할 수 있다.
각 계층간의 독립성이 높아져 문제가 생겼을 때, 문제가 되는 부분만 해결하면 된다
3-tier 아키텍쳐

네트워크 구성
1. VPC
| HY-VPC | 10.0.0.0/16 |
2. 서브넷
| NAME | Avaliability Zone | IPv4 CIDR | VPC |
| Public01 | ap-northeast-2a | 10.0.1.0/24 | HY-VPC |
| Public02 | ap-northeast-2c | 10.0.3.0/24 | HY-VPC |
| Private01 | ap-northeast-2a | 10.0.2.0/24 | HY-VPC |
| Privaet02 | ap-northeast-2c | 10.0.4.0/24 | HY-VPC |
| Private03 | ap-northeast-2a | 10.0.5.0/24 | HY-VPC |
| Private04 | ap-northeast-2c | 10.0.6.0/24 | HY-VPC |
3. 인터넷 게이트웨이
| HY-IGW | 0.0.0.0/0 |
4. 라우팅 테이블
퍼블릭 서브넷: 인터넷 게이트웨이가 연결되어있는 서브넷
프라이빗 서브넷: 인터넷 게이트웨이가 연결되어있지 않은 서브넷
- 서브넷 연결
Public - Public 서브넷 연결
Private - Private 서브넷 연결
- 라우팅 연결
1) Public: 인터넷 게이트웨이 연결
| Destination | Target |
| 10.0.0.0/16 | local |
| 0.0.0.0/0 | HY-IGW |
2) Private : Nat Gateway연결 - 추후에 Nat Gateway 생성 후 연결
5. 보안그룹 생성
Bastion 보안그룹
| SG-BASTION | Type | Protocol | Port range | Source |
| Inbound rules | SSH | TCP | 22 | 내 IP |
| Outbound rules | All traffic | All | All | 0.0.0.0/0 |
WEB 보안그룹
| SG-WEB | Type | Protocol | Port range | Source |
| Inbound rules | SSH | TCP | 22 | SG-BASTION |
| HTTP | TCP | 80 | SG-External_ALB | |
| Outbound rules | All traffic | All | All | 0.0.0.0/0 |
WAS 보안그룹
| SG-WAS | Type | Protocol | Port range | Source |
| Inbound rules | SSH | TCP | 22 | SG-BASTION |
| Custom TCP | TCP | 8080 | SG-Internal_ALB | |
| Outbound rules | All traffic | All | All | 0.0.0.0/0 |
External ALB 보안그룹
| SG-External_ALB | Type | Protocol | Port range | Source |
| Inbound rules | HTTP | TCP | 80 | 0.0.0.0/0 |
| HTTP | TCP | 80 | ::/0 | |
| Outbound rules | All traffic | All | All | 0.0.0.0/0 |
Internal ALB 보안그룹
| SG-Internal_ALB | Type | Protocol | Port range | Source |
| Inbound rules | Custom TCP | TCP | 8080 | SG-WEB |
| Outbound rules | Custom TCP | TCP | 80 | SG-WEB |
RDS 보안그룹
| SG-RDS | Type | Protocol | Port range | Source |
| Inbound rules | MYSQL/Aurora | TCP | 3306 | SG-WAS |
| Outbound rules | All traffic | All | All | 0.0.0.0/0 |
Redis 보안그룹
| SG-Redis | Type | Protocol | Port range | Source |
| Inbound rules | Custom TCP | TCP | 6379 | SG-WAS |
| Custom TCP | TCP | 6379 | SG-RDS | |
| Outbound rules | All traffic | All | All | 0.0.0.0/0 |
'공부 > AWS 3-tier' 카테고리의 다른 글
| 3-tier (3)ELB 설정, Route 53 (0) | 2022.01.20 |
|---|---|
| 3-tier (2)네트워크 설정(VPC, EC2) (0) | 2021.06.06 |