{"id":"IL-0363","org":"Rust Project","date":"2023-01-25","docs":[],"title":{"en":"static.crates.io did not resolve for 10-15 minutes during a Terraform deployment, so Rust builds could not fetch crates","ko":"static.crates.io 의 DNS 레코드가 10~15분 동안 해석되지 않아 crate 를 받지 못했다"},"domain":["networking"],"impact":{"scope":"Name resolution of static.crates.io; builds failed because crates could not be downloaded","users":"unknown","region":"unknown"},"review":{"written_by":"session","reviewed_at":null,"reviewed_by":null},"lessons":{"en":"Deploying the TLS certificate change and the DNS record change separately would have avoided the outage. Changes tested one at a time on staging need to reach production one at a time and in order, the production deploy process needs to be written down so it can be improved, and merged changes need to be deployed promptly so Git and production do not drift apart.","ko":"TLS 인증서 변경과 DNS 레코드 변경을 따로 배포했다면 이번 장애를 피할 수 있었다. 운영 환경을 master 의 최신 커밋에 고정하면서 여러 변경이 한꺼번에 들어갔고, 병합한 변경을 그때그때 배포하지 않아 운영과 스테이징이 너무 벌어졌다. 팀이 얻은 교훈은 세 가지다. 배포 절차를 문서로 정해야 한다. 스테이징에서 따로 시험한 변경은 운영에도 하나씩 차례로 배포해야 한다. 병합한 변경은 운영에도 배포해야 한다."},"related":[],"sources":[{"url":"https://blog.rust-lang.org/inside-rust/2023/02/08/dns-outage-portmortem/","kind":"blog","archived":"https://web.archive.org/web/20260103013918/https://blog.rust-lang.org/inside-rust/2023/02/08/dns-outage-portmortem/"}],"summary":{"en":"The Rust infrastructure team manages its infrastructure with Terraform and had recently separated the staging and production environments of crates.io so that each can be deployed on its own. The staging environment was used to build and test a second CDN for static.crates.io, and the rollout to production was scheduled and announced for 25 January 2023. The production deployment carried two changes that had each been developed, deployed and tested separately on staging: a new TLS certificate for the current CDN and updated DNS records. In production, Terraform first deleted the current certificate and the DNS records, then spent about 10 minutes issuing the new certificate, during which static.crates.io had no DNS record, and only then recreated the records. The outage ended by itself when Terraform finished.\n\nThe team names two reasons the changes went out together. It was one of the first uses of the new environment tooling, which locks production to a specific Git commit, and the team set it to the latest commit on master as in the past, so several changes were applied at once. And production had drifted away from staging because changes were not deployed when they were merged, partly because the team was reluctant to deploy crates.io several times without announcing each change to the community first.","ko":"Rust 인프라는 인프라를 코드로 구성하고 프로비저닝하는 도구인 Terraform 으로 관리한다. 인프라 팀은 최근 crates.io 의 스테이징 환경과 운영 환경을 나눠 따로 배포할 수 있게 했고, 이 기능으로 static.crates.io 의 두 번째 CDN 인프라를 스테이징에서 만들고 시험했다. 준비가 끝나자 1월 25일 배포를 공지했다. 운영 배포에는 스테이징에서 따로 만들고 배포하고 시험한 변경 두 가지가 함께 들어 있었다. 현재 CDN 의 새 TLS 인증서와 바뀐 DNS 레코드였다.\n\n2023-01-25 09:15 UTC 에 이 구성을 운영에 배포하자 Terraform 은 기존 인증서와 DNS 레코드를 먼저 지우고 새 인증서 발급을 시작했다. 발급에 약 10분이 걸렸고, 그동안 static.crates.io 의 DNS 레코드가 없어 사용자의 빌드가 실패했다. 새 인증서가 준비되자 Terraform 이 DNS 레코드를 다시 만들었다. 09:30 무렵 레코드가 다시 전파되기 시작해 09:40 에는 트래픽이 평소로 돌아왔고, 일부 사용자는 DNS 서버 캐시 때문에 몇 분 더 영향을 받았다.\n\n이번 배포는 새 환경 도구로 운영에 변경을 배포한 첫 경우 가운데 하나였다. 이 도구는 운영 환경을 특정 Git 커밋에 고정한다. 팀이 예전처럼 master 의 최신 커밋을 지정하면서 여러 변경이 한꺼번에 적용됐다. 또 변경을 main 브랜치에 병합할 때 바로 배포하지 않아 운영과 스테이징이 오랫동안 벌어져 있었다. crates.io 가 Rust 생태계에 중요하기 때문에, 팀은 커뮤니티에 먼저 알리지 않고 여러 번 배포하기를 꺼렸다."},"trigger":{"en":"A Terraform deployment to production contained a new TLS certificate for the current CDN of static.crates.io and updated DNS records; Terraform removed the current certificate and DNS records first and recreated the records only after the new certificate had been issued.","ko":"Rust 인프라 팀이 Terraform 으로 운영 환경에 현재 CDN 의 새 TLS 인증서와 바뀐 DNS 레코드를 함께 배포했다. Terraform 은 기존 인증서와 DNS 레코드를 먼저 지운 뒤 새 인증서를 발급했다."},"severity":"unknown","symptoms":["dns-resolution-failures"],"timeline":{"detected_after":null,"resolved_after":"25m"},"date_kind":"incident","detection":null,"components":["terraform","dns-server","cdn"],"root_cause":"config-change","remediation":[{"text":{"en":"Terraform finished the deployment and created a new DNS record for static.crates.io, which ended the outage","ko":"Terraform 이 배포를 마치고 static.crates.io 의 새 DNS 레코드를 만들자 장애가 저절로 풀렸다."}}],"action_items":[{"text":{"en":"Document the process of deploying changes to production, including how to pick the Git commit and how to review the changeset","ko":"운영에 변경을 배포하는 절차, 특히 Git 커밋을 고르는 방법과 변경 내역을 검토하는 방법을 문서로 남긴다. 절차를 정해 두고 계속 고쳐 나가 같은 문제를 피한다."}},{"text":{"en":"Deploy changes developed and tested in isolation on staging individually and in sequence to production, and add this to the documentation","ko":"스테이징에서 따로 만들고 시험한 변경은 운영에도 하나씩 차례대로 배포하고, 이 규칙을 문서에 넣는다."}},{"text":{"en":"Deploy changes to production when they are merged into the main branch, so the configuration in Git and what is deployed do not drift","ko":"main 브랜치에 병합한 변경은 운영에도 반드시 배포해, Git 에 있는 구성과 실제로 배포된 것이 벌어지지 않게 한다."}}],"contributing":["no-safeguard-on-destructive-change","staging-not-representative"],"recurrence_of":null,"symptoms_text":{"en":"On 25 January 2023, shortly after a deployment to the crates.io production infrastructure at 09:15 UTC, the DNS record for static.crates.io failed to resolve for an estimated 10-15 minutes. Builds failed for users because crates could not be downloaded.\n\nThe record started to propagate again around 09:30 UTC and traffic was back to normal levels by 09:40 UTC. For some users the failures lasted a few minutes longer because of caches in their DNS servers.","ko":"2023-01-25 09:15 UTC 에 crates.io 운영 인프라에 변경을 배포하는 동안 static.crates.io 의 DNS 레코드가 해석되지 않았다. 사용자는 crate 를 내려받지 못해 빌드가 실패했다.\n\n이름 해석 실패는 10~15분쯤 이어졌다. 09:30 UTC 무렵 DNS 레코드가 다시 전파되기 시작했고, 09:40 UTC 에는 트래픽이 평소 수준으로 돌아왔다. 일부 사용자는 자기 DNS 서버의 캐시 때문에 몇 분 더 장애를 겪었다."},"updated_at":"2026-11-14T12:34:01.605806Z","url":"https://benchlet.com/incidentlib/app/cases/IL-0363","org_slug":"rust-project"}