구글 프로페셔널 클라우드 아키텍트 자격증 대비 교육자료 (6편) [Google Professional Cloud Architect]
구글 클라우드 자격증 중 하나인 Google Cloud Certified - Professional Cloud Architect 를 취득하였습니다. 공부 자료가 많지 않고 전부 영어로 되어 있어서 클라우드 아키텍트 자격증을 준비하시는 분들께 조금이라도 도움을 드리고자 준비해보았습니다.
관련 내용 :
- You set up an autoscaling instance group to serve web traffic for an upcoming launch. After configuring the instance group as a backend service to an HTTP(S) load balancer, you notice that virtual machine (VM) instances are being terminated and re-launched every minute. The instances do not have a public IP address. You have verified that the appropriate web response is coming from each instance using the curl command. You want to ensure that the backend is configured correctly. What should you do?
A. Ensure that a firewall rule exists to allow source traffic on HTTP/HTTPS to reach the load balancer.
B. Assign a public IP to each instance, and configure a firewall rule to allow the load balancer to reach the instance public IP.
C. Ensure that a firewall rule exists to allow load balancer health checks to reach the instances in the instance group.
D. Create a tag on each instance with the name of the load balancer. Configure a firewall rule with the name of the load balancer as the source and the instance tag as the destination.
보통 많은 트래픽을 감당하기 위해서 HTTP 로드밸런서를 사용합니다. 로드발란서(Load Balancer)는 줄여서 LB라고도 합니다. network 레벨(3계층)의 LB와 HTTP LB (7계층)를 구분하는 문제가 나오기도 합니다. HTTP LB는 부하 분산을 위해서 인스턴스 그룹으로 트래픽을 보내게 됩니다. 인스턴스 그룹은 여러 VM이 모인 것이라고 보면 됩니다. auto-scaling과 auto-healing의 기능이 있습니다. 조건에 따라서 자동적으로 인스턴스 수를 늘리고 줄입니다. 그리고 상태가 안 좋은 애들은 자동치유(auto-healing)
instance group은 GCP 콘솔에서 아래와 같이 만듭니다.
![]()
| ||
![]() |
Instance Group 생성시 설정들 |
![]() |
Autoscaling 설정 |
*** HTTP 로드발란서의 이용률(사용률,활용률)에 따라 스케일되게 설정도 가능합니다.
![]() |
Autohealing No health check 옵션 선택시 |
![]() |
Autohealing Health check 옵션 선택시 |
위의 이미지들을 보시면 Autohealing 기능이 있습니다. No health check 옵션을 선택하면 Compute Engine은 오로지 VM 인스턴스가 동작을 안할때 VM 인스턴스를 새로 생성합니다. Health Check 선택하면 어느 프로토콜 어느 포트를 사용할 것인지, 얼마나 자주 체크할 것인지를 설정합니다. 그러면 예를 들어 TCP 프로토콜로 80번 포트에 10초마다 신호를 보내고 응답하는지 확인합니다. 응답 오는 것이 실패하면 설정에 따라 (위의 경우는 3번) 연속적으로 실패하면 해당 vm 인스턴스는 건강하지 않은 놈이라 판단하고 vm 인스턴스를 새로 생성합니다. 위의 이미지 autohealing 부분에 느낌표 메세지를 보시면, autohealing을 사용하기 위해서 방화벽 규칙을 설정해야 한다고 나옵니다. 이 부분이 핵심입니다. 방화벽 때문에 health check를 하지 못하면 vm이 정상인데도 불구하고 아픈놈이라고 판단하고 새로 만들게 됩니다. 근데 새로 만들어도 신호를 보내고 받지를 못하니 계속 아픈놈이라 판단해서 계속해서 다시 만들게 됩니다. 문제에서 시스템은 정상적인데 뭔가 안된다 그러면 보통 firewall이 정답입니다. firewall 규칙에서 특정 프로토콜의 특정 포트를 열어주어야 합니다.
방화벽 설정은 아래와 같은 방식으로 할 수 있습니다.
위의 내용을 이해하셨다면 아래 문제를 도전해 봅시다.
- Your business is connected to a VPN connection to GCP. On GCP, you are hosting an internal website using an HTTP load balancer which serves traffic to a managed instance group. Your users are unable to access the internal website, though all systems are up. What is a possible cause for this problem?
A. You've enabled static IP address for the managed instance group servers.
B. Your load balancer is not set for the correct region.
C. Firewall rules are not correctly configured.
D. You need to enable Stackdriver debugger to collect more information.
내부 웹사이트 접속이 안된다. 근데 웹사이트 서버는 정상 기동중이다. 로드발란서랑 instance group을 쓴다. 뭐가 문제냐?는 질문입니다. 키워드는 HTTP load balancer, managed instance group, '시스템이 잘 기동 중인데 접속이 안된다'라는 내용입니다. 정답은 C, 방화벽 관련 내용입니다.
Comments
Post a Comment