본문 바로가기

분류 전체보기346

Retry - 출처: https://learn.microsoft.com/en-us/azure/architecture/patterns/retry Retry pattern - Azure Architecture Center Learn how to use the Retry pattern to enable an application to handle anticipated, temporary failures when the app tries to connect to a service or network resource. learn.microsoft.com - 개요 Application이 서비스나 네트워크 리소스에 접속할 때, 실패한 연산을 재시도 함으로써 일시적인 오류를 다룰 수 잇게 해주는 패턴이다. Application의.. 2023. 10. 31.
Debounce - 출처: 클라우드 네이티브 패턴 - 개요 Debounce는 함수 호출 빈도를 제한하여 여러 번 호출 발생시 처음이나 마지막 호출만 동작하도록 하는 패턴이다. - Context and Problem 시스템의 작업중에서는 속도가 느리고 비용이 많이 드는 작업이 존재한다. 이런 유사한 작업이 연속적으로 여러 번 발생할때마다 서버가 요청을 처리하면 무거운 작업을 계속 수행해야 한다. - Solution Front-end 개발을 해본적이 있다면 Debounce나 Throttle이라는 용어가 익숙할것이다. 가장 대표적인 예제가 자동완성검색이다. 이를 구현할 때 검색창에 입력 이벤트가 발생할때마다 요청을 서버로 보내면, 서버의 부하가 많이 걸릴 수 있다. 그래서 Debounce 패턴을 이용하여 일정 기간내의 마지막.. 2023. 10. 30.
사케동 간장소스 재료를 최대한 간단하게 하고 내 입맛에 맞게 조정한것입니다. - 재료 양에 비례해서 비율로 준비 -> 물 : 간장 : 설탕 : 맛술 = 2 : 1.7 : 0.5 : 0.5 양파 감자 -> 칼집내서 표면적을 크게 - 절차 물, 간장, 설탕, 맛술에 채썬 양파, 감자를 넣고 양파가 투명해질때까지 강불로 조진다. 양파가 투명해지면 중간불로 조진다. 감자는 건져내서 버린다. 2023. 10. 29.
Circuit Breaker 출처: https://learn.microsoft.com/en-us/azure/architecture/patterns/circuit-breaker Circuit Breaker pattern - Azure Architecture Center Handle faults that might take a variable amount of time to fix when connecting to a remote service or resource. learn.microsoft.com - 개요 Circuit Breaker는 원격 서비스나 자원에 접근할 때 오류가 발생하는 경우 복구에 어느 정도 시간이 걸리는지 알 수 없는데, 이런 경우를 다루는데 유용한 패턴이다. Application의 안정성과 탄력성을 향상 시킨다... 2023. 10. 27.
Docker compose - Tutorials - 출처: https://docs.docker.com/compose/gettingstarted/ Try Docker Compose Check out this tutorial on how to use Docker Compose from defining application dependencies to experimenting with commands. docs.docker.com - 목적 Docker Compose의 핵심 개념을 알아보기 위해 간단한 Python web app을 구성해본다. Docker Engine과 Docker Compose가 standalone binaries로 설치되어 있거나 Docker Desktop이 설치되어 있어야 한다. - Step 1: app 의존성 정의 1. project를.. 2023. 10. 12.
Docker compose - Overview and Feature - 출처: https://docs.docker.com/compose/ - 출처: https://docs.docker.com/compose/features-uses/ Docker Compose overview Learn how to use Docker Compose to define and run multi-container applications with this detailed introduction to the tool. docs.docker.com - Overview Compose는 multi container Docker application을 저의하고 실행하기 위한 도구이다. YAML file을 이용하여 application service를 설정한다. 그리고 단일 명령어로 설정한 모든 servi.. 2023. 10. 12.
Cloud Native의 구성요소 - 출처: 클라우드 네이티브 GO - 매튜 A. 티트뮤스 지음 - 확장성 (Scaleability) 요청량이 급격하게 증가했을 때 대응하는 시스템의 능력을 말한다. 수직적 확장(Vertical scaling, Scale up): 시스템의 할당된 하드웨어 자원을 늘리는것을 말한다. 예를 들어 DB 서버의 경우 성능 향상을 위해 메모리를 늘린다면 이는 수직적 확장에 해당한다. 직관적이고 관리가 쉽지만 요청량이 아주 커지면 한계점이 존재한다. 수평적 확장(Horizontal scaling, Scale out: 인스턴스를 추가하는 방식을 말한다. 늘어난 요청량을 처리하기 위해 장비 Node를 늘린다면 이는 수평적 확장에 해당한다. 관리가 어렵지만 서비스 규모가 아주 커진다면 수평적 확장은 피할 수 없다. 수평적.. 2023. 10. 10.
Swarm - routing mesh - 출처: https://docs.docker.com/engine/swarm/ingress/#publish-a-port-for-a-service Use swarm mode routing mesh Use the routing mesh to publish services externally to a swarm docs.docker.com - 개요 Docker Engine swarm mode는 외부 리소스가 사용할 수 있도록 service port를 노출하는 기능을 제공한다. 모든 node는 ingress routing mesh 에 참여한다. routing mesh는 node에서 수행중인 task가 없더라도 다른 node에서 실행중인 task의 service port로 연결해준다. routing mesh는 n.. 2023. 10. 8.
Swarm - drain node - 출처: https://docs.docker.com/engine/swarm/swarm-tutorial/drain-node/ Drain a node on the swarm Drain nodes on the swarm docs.docker.com - Drain 의 필요성 이전까지의 실습은 모든 node가 active 상태라고 가정하고 진행했다. swarm manager는 task를 active 상태인 node에 할당하므로 모든 node가 task 를 수신할 수 있었다. 하지만 실제 운영 환경에서는 특정 node가 유지보수 상태에 들어갈 수 있으므로 해당 node를 drain 상태로 유지해야하는 경우가 생긴다. drain 상태가 되면 swarm manager로 부터 더이상 새로운 task를 할당받지 않는다... 2023. 10. 2.
Swarm - Rolling update - 출처: https://docs.docker.com/engine/swarm/swarm-tutorial/rolling-update/ Apply rolling updates to a service Apply rolling updates to a service on the swarm docs.docker.com - Deploy test service, Redis 3.0.6 Redis 3.0.6 컨테이너 tag 기반의 서비스를 배포하고, 이를 rolling update 방식으로 Redis 3.0.7 로 갱신해보자. [ec2-user@ip-172-31-36-249 ~]$ docker service create --replicas 3 --name redis --update-delay 10s redis:3.0.6 .. 2023. 10. 2.