NLB를 통한 로드 밸런싱 실습
NLB 생성
EC2 -> 로드밸런서 -> Load Balancer 생성
클릭
생성
클릭
1 |
|
![스크린샷 2021-07-22 오전 12 02 46](https://user-images.githubusercontent.com/87232411/126533037-4068dd8f-ca9e-4bf7-935b-3279c145bb0d.png)
![스크린샷 2021-07-22 오전 12 02 58](https://user-images.githubusercontent.com/87232411/126533040-bf7cfd0c-d018-4875-a2a7-100dfed4c9fb.png)
1 |
|
![스크린샷 2021-07-22 오전 12 03 29](https://user-images.githubusercontent.com/87232411/126533044-ebed91c0-c64b-41e3-8309-22586aa41ec3.png)
![스크린샷 2021-07-22 오전 12 03 55](https://user-images.githubusercontent.com/87232411/126533047-da274995-74ad-4530-be1a-b3060860cc02.png)
![스크린샷 2021-07-22 오전 12 04 34](https://user-images.githubusercontent.com/87232411/126533049-6af0c0eb-1812-44ed-a4b0-c032dc0fc265.png)
인스턴스 선택 후 -> Include as pending below
클릭
하단에 Create target group
클릭
대상 그룹 선택
Create load balancer
클릭
My-EC2 에서 확인
1 |
|
![스크린샷 2021-07-22 오전 12 06 28](https://user-images.githubusercontent.com/87232411/126533062-55008ca4-20a1-48ec-bc48-a9b5e2280215.png)
![스크린샷 2021-07-22 오전 12 06 36](https://user-images.githubusercontent.com/87232411/126533063-d4977ba3-e942-42c4-88c5-fdf081309e54.png)
![스크린샷 2021-07-22 오전 12 08 44](https://user-images.githubusercontent.com/87232411/126533065-6e30202b-22a5-489b-8a2a-9717c4861ea4.png)
![스크린샷 2021-07-22 오전 2 08 13](https://user-images.githubusercontent.com/87232411/126533066-2b7895f6-48fb-457e-9024-fb8e364b8a21.png)
![스크린샷 2021-07-22 오전 2 08 53](https://user-images.githubusercontent.com/87232411/126533070-a1d48b69-a36f-4210-acaa-c3b2a60e6be6.png)
![스크린샷 2021-07-22 오전 2 09 08](https://user-images.githubusercontent.com/87232411/126533073-43ffa4d2-9086-4264-9bff-a8085ca1b138.png)
![스크린샷 2021-07-22 오전 2 09 19](https://user-images.githubusercontent.com/87232411/126533074-9d45ae31-d4ed-4ca6-b743-f22edab86b37.png)
![스크린샷 2021-07-22 오전 2 09 30](https://user-images.githubusercontent.com/87232411/126533076-d275ff6d-afa2-4134-b561-cfd4b186b0ad.png)
ELB-EC2-1/2 에서 확인
1 |
|
오류 수정 완료!
잘 나온다 ㅎㅎ 만약에 어쩌고 저쩌고 bytes 하는 글만 나온다면 My-EC2에 위에 for문 첫 번째 코드를 다시 돌려보자.
NLB Cross Zone Load Balancing 활성화
EC2 -> 로드밸런서 -> 작업 클릭 -> 속성 편집 클릭
교차 영역 로드 밸런싱 활성화 클릭
My-EC2 에서 확인
1 |
|
오류 수정 완료!
요즘에 오류를 고치고 성공적인 결과가 나올 때 제일 행복한 거 같다 ㅎㅎ
자원 삭제(중요!)
로드 밸런서 삭제 (EC2 → 로드 밸런싱 → 로드 밸런서 → 작업 → 삭제)
대상 그룹 삭제 (EC2 → 로드 밸런싱 → 대상 그룹 → 작업 → 삭제)
CloudFormation 스택 삭제 (CloudFormation → 스택 → 스택 삭제)
참고 자료 : AFOS[2기] 노션 내용
[AWS] 7주차-3 NLB를 통한 로드 밸런싱 실습
http://example.com/2021/07/22/2021-07-21-AFOS-3/