HPA HPA(Horizontal Pod AutoScale)은 CPU 등의 리소스 사용량을 관찰하여, 워크로드 리소스(Deployment, Statefulset)의 Pod 개수를 자동으로 확장합니다. Cluster Auto Scaler와 함께 설정하면 더욱 효과적으로 리소스를 관리할 수 있습니다. HPA -> 자동 수평 확장/축소를 지원부하 증가 시: 수평 확장부하 감소 시: 설정된 최소 파드의 수로 Scale down metrics-server 설치helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/helm upgrade --install metrics-server metrics-server/metrics-serve..
Event-Driven Architecture란이벤트 기반 아키텍처는 분산된 애플리케이션 서비스들이 이벤트를 기반으로 통신하는 패턴을 의미합니다. 주로 MSA 환경에서 각 서비스들의 결합도를 느슨하게 하기 위해 사용합니다.(ex: CQRS에서 각 서비스 책임(비즈니스, 조회 로직)을 분리하는 데 사용할 수 있음) Event란애플리케이션에서 발생한 모든 사건을 의미합니다.해당 이벤트(사건)의 기록은 변경되지 않습니다. MSA and Event-Driven-Architecture마이크로 서비스 아키텍처는 하나의 애플리케이션을 여러 서비스로 나누어 운영하는 설계 방법입니다. 서비스가 분산된 아키텍처에서는 서비스들 간의 협업을 위해 IPC(Inter Process Communication)을 통해 통신합니다. ..
Kafka ProducerProducer Acknowledgements (Acks)producer can choose to receive acknowledgment of data writes acks = 0 : producer won’t wait for acknowledgment (possible data loss)producers consider messages as “written successfully” the moment the message was sent without waiting for the broker to accept it at allif the broker goes offline or an exception happens, we won’t know and will lose dataU..
Kafka ConsumerAUTO_OFFSET_RESET_CONFIGConsumer가 어디서(offset)부터 읽을지 지정합니다.설정 값으로, latest, earliest, none이 있습니다. Delivery SemanticsKafka Consumer 메시지 전달 방법으로 'at-most-once'와 'at-least-once'가 있습니다. 아래 사진은 'at-most-once' 방식으로 메시지를 처리하고 있습니다.메시지를 최대 1번만 읽고, 커밋 처리합니다. consumer의 장애로 메시지를 정상 처리 못 했을 때 데이터 손실이 발생할 수 있습니다.At most onceoffsets are committed at soon as the message batch is received.If the pro..