나의 이야기

Traffic Splitting for Service Deployments(서비스 배포를 위한 트래픽 분할)

효성공인 2021. 12. 6. 22:04

Traffic Splitting for Service Deployments(서비스 배포를 위한 트래픽 분할)

서비스 배포를 위한 트래픽 분할

When you deploy a new version of a service, you need a way to start using the new version without causing downtime for your end users. You can't just take the old version down and deploy the new one, because for a brief period you would cause downtime. This method runs the additional risk of being hard to roll back if there are unexpected problems with the new version of the service.

새 버전의 서비스를 배포할 때 최종 사용자에게 다운타임을 일으키지 않고 새 버전을 사용할 수 있는 방법이 필요합니다. 잠시 동안 다운타임이 발생할 수 있으므로 이전 버전을 중단하고 새 버전을 배포할 수 없습니다. 이 방법은 새 버전의 서비스에 예기치 않은 문제가 있는 경우 롤백하기 어려운 추가 위험을 실행합니다.

You can solve this problem by deploying the new service, making sure it works in your production environment with a small amount of traffic at first, then slowly shifting traffic over as you gain confidence (from monitoring) that it is performing as expected.

새 서비스를 배포하고 처음에는 소량의 트래픽으로 프로덕션 환경에서 작동하는지 확인한 다음 (모니터링을 통해) 예상대로 수행되고 있다는 확신을 얻으면 트래픽을 천천히 이동하여 이 문제를 해결할 수 있습니다.

Depending on the rate at which you shift the traffic and the level of monitoring you have in place, a deployment like this might be called a zero-downtime, blue-green, canary deployment, or something else.

트래픽을 이동하는 속도와 적절한 모니터링 수준에 따라 이러한 배포를 제로 다운타임, 블루-그린, 카나리아 배포 또는 다른 것으로 부를 수 있습니다.

In this tutorial you will deploy a new version of a service and shift HTTP traffic slowly to the new version.

이 자습서에서는 새 버전의 서비스를 배포하고 HTTP 트래픽을 새 버전으로 천천히 이동합니다.

»Prerequisites(전제 조건)

The steps in this tutorial use Consul’s service mesh feature, Consul Connect. If you aren’t already familiar with Connect you can learn more by reading Understand Consul Service Mesh.

이 자습서의 단계에서는 Consul의 서비스 메시 기능인 Consul Connect를 사용합니다. Connect에 아직 익숙하지 않은 경우 Consul Service Mesh 이해를 읽고 자세히 알아볼 수 있습니다.

We created a demo environment for the steps we describe here. The environment relies on Docker and Docker Compose. If you do not already have Docker and Docker Compose, you can install them from Docker’s install page.

여기에서 설명하는 단계에 대한 데모 환경을 만들었습니다. 환경은 Docker 및 Docker Compose에 의존합니다. Docker 및 Docker Compose가 아직 없는 경우 Docker의 설치 페이지에서 설치할 수 있습니다.

»Environment("환경)

This tutorial uses a two-tiered application made of of three services: a public web service, two versions of the API service, and Consul. The Web service accepts incoming traffic and makes an upstream call to the API service. At the start of this scenario version 1 of the API service is already running in production and handling traffic. Version 2 contains some changes you will ship in a canary deployment.

이 자습서에서는 공개 웹 서비스, 두 가지 버전의 API 서비스 및 Consul의 세 가지 서비스로 구성된 2계층 애플리케이션을 사용합니다. 웹 서비스는 들어오는 트래픽을 수락하고 API 서비스에 대한 업스트림 호출을 수행합니다. 이 시나리오를 시작할 때 API 서비스 버전 1은 이미 프로덕션에서 실행 중이며 트래픽을 처리하고 있습니다. 버전 2에는 카나리아 배포에서 제공할 몇 가지 변경 사항이 포함되어 있습니다