{"id":"IL-0584","org":"Monicle","date":"2024-12-04","docs":[],"title":{"en":"Cloud CDN at Osaka served corrupted JavaScript files, and a single-page app failed with a SyntaxError in western Japan","ko":"Cloud CDN 이 서일본 사용자에게 손상된 JavaScript 파일을 내보내 일부 사용자의 SPA 가 SyntaxError 로 멈췄다"},"domain":["gcp","networking"],"impact":{"scope":"A single-page app served through Cloud Load Balancing and Cloud CDN stopped working in the browser with a SyntaxError for some users","users":"Some users in western Japan","region":"Western Japan (Cloud CDN at KIX, Osaka)"},"review":{"written_by":"session","reviewed_at":null,"reviewed_by":null},"lessons":{"en":"The author states that there is no specific countermeasure for this incident yet. The lesson drawn is to keep in mind which parts of the service are single points of failure and to be ready to act quickly on failures in PaaS and SaaS products.","ko":"글쓴이는 이 장애에 맞춘 구체적인 대책은 아직 없다고 했다. 대신 서비스 운영에서 단일 장애 지점이 된 곳을 파악해 두고, PaaS 나 SaaS 에서 난 장애에도 기민하게 대처할 수 있도록 준비해야 한다고 정리했다."},"related":[],"sources":[{"url":"https://zenn.dev/monicle/articles/212f522c24662e","kind":"blog","archived":"https://web.archive.org/web/20260115023642/https://zenn.dev/monicle/articles/212f522c24662e"}],"summary":{"en":"Monicle served a single-page app through Google Cloud Load Balancing and Cloud CDN, with Cloud Run as the backend. The app delivers a large JavaScript bundle and HTML with some initial data rendered on the server, and provides its APIs over GraphQL. In 2024 some users in western Japan could not use the app because the JavaScript files they received were corrupted, while the files in the container image were correct. A war room was opened as soon as the reports came in. Redeploying the container images did not help. Comparing CDN locations showed the corruption at KIX (Osaka) and not at NRT (Tokyo).\n\nThe team first purged the Cloud CDN cache. While investigating, the team noticed that Cloud CDN was enabled on Cloud Load Balancing but content compression was not. Reasoning that compression could change the outcome if the fault was in the transfer from Cloud Load Balancing to Cloud CDN or in how Cloud CDN stored objects in its cache, the team enabled compression_mode. After that the system worked for users again and the incident was closed; users also reported faster page loads because the JavaScript transfer was smaller. The team searched Issue Tracker and Cloud Forums and found no matching reports, and enabling compression resolved the problem as a result.","ko":"Monicle 은 Google Cloud 의 Cloud Load Balancing 과 Cloud CDN 을 앞에 두고 Cloud Run 을 백엔드로 서비스를 제공했다. 애플리케이션은 SPA 였고, 큰 JavaScript 파일과 초기 데이터 일부를 SSR 한 HTML 을 내보내며 GraphQL 로 API 를 제공했다. 2024년에 일부 사용자가 시스템을 쓸 수 없다고 알려 왔고, 대상 제품과 영향 범위를 보고 바로 워룸을 열었다. 서일본 사용자의 브라우저에서 SPA 가 SyntaxError 로 멈췄고 동일본 사용자는 영향이 없었다.\n\n개발팀이 Cloud Run 컨테이너 이미지를 다시 만들어 배포했지만 복구되지 않았다. 오키나와에 있던 개발자가 문제를 재현해 JavaScript 파일을 받아 냈고, 파일을 눈으로 훑어 같은 코드가 두 번 들어 있는 등 파일이 손상된 것을 찾았다. 컨테이너 안의 파일은 정상이었다. Cloud CDN 의 오리진이 도쿄의 NRT 일 때는 재현되지 않고 오사카의 KIX 일 때 재현돼서 팀은 먼저 Cloud CDN 캐시를 퍼지했다.\n\n조사를 이어 가던 팀은 Cloud Load Balancing 에서 Cloud CDN 은 켜 두었지만 콘텐츠 압축은 꺼져 있다는 것을 발견했다. 팀은 문제가 Cloud Load Balancing 과 Cloud CDN 사이의 데이터 전송이나 Cloud CDN 캐시 저장소에 쓰는 과정에 있다면 압축이 어떤 식으로든 영향을 줄 수 있다고 봤다. 그래서 compression_mode 를 켰다. 그 뒤 사용자 쪽에서도 시스템이 정상으로 동작해 장애가 끝났다. 압축으로 JavaScript 파일의 전송량이 줄어 화면이 빨라졌다는 의견도 받았다. 팀은 조사 중에 Issue Tracker 와 Cloud Forums 도 찾아봤지만 관련된 정보는 없었다. 결과적으로 압축을 켠 것이 문제를 없앴다."},"trigger":null,"severity":"unknown","symptoms":["response-quality-degraded"],"timeline":{"detected_after":null,"resolved_after":null},"date_kind":"published","detection":{"en":"Some users reported that they could not use the system, and a war room was opened right away because of the product and the extent of the impact.","ko":"일부 사용자가 시스템을 쓸 수 없다고 알려 와서 알았다. 대상 제품과 영향 범위를 보고 바로 워룸을 열었다."},"components":["cdn"],"root_cause":"cloud-provider","remediation":[{"text":{"en":"Purged the Cloud CDN cache after the corruption was seen at KIX (Osaka) but not at NRT (Tokyo)","ko":"Cloud CDN 의 오리진이 도쿄의 NRT 일 때는 재현되지 않고 오사카의 KIX 일 때 재현돼서 우선 Cloud CDN 캐시를 퍼지했다."}},{"text":{"en":"Enabled compression_mode for Cloud CDN content on Cloud Load Balancing, after which the app worked for users again","ko":"Cloud Load Balancing 에서 꺼져 있던 Cloud CDN 의 콘텐츠 압축을 compression_mode 로 켰고, 그 뒤 사용자 쪽에서 시스템이 정상으로 동작했다."}}],"action_items":[{"text":{"en":"Stay aware of which parts of the service are single points of failure, remove them where the cost is justified, and prepare to respond quickly to failures in PaaS and SaaS products","ko":"서비스 운영에서 단일 장애 지점이 된 곳을 파악해 두고, 비용을 감당할 수 있으면 그런 곳을 없앤다. PaaS 와 SaaS 에서 난 장애에도 기민하게 대처할 수 있게 준비한다."}}],"contributing":[],"recurrence_of":null,"symptoms_text":{"en":"Some users reported that a Monicle web service could not be used. The service is a single-page app (SPA) served through Google Cloud Load Balancing and Cloud CDN, and in the affected browsers the app stopped with a SyntaxError. Users in eastern Japan were not affected; users in western Japan were.\n\nThe JavaScript files the system delivered were corrupted: the same code appeared twice in a file. The files inside the container image were intact. The file sizes recorded in the logs, among other signs, pointed the team at the CDN. A developer who happened to be working remotely in Okinawa could reproduce the failure, confirmed that the problem was in the SPA's JavaScript files and saved a copy of a corrupted file.\n\nThe failure reproduced when the files came from Cloud CDN at KIX (Osaka) and did not reproduce when they came from NRT (Tokyo).\n\nBefore the CDN was suspected, the product's development team rebuilt and redeployed the Cloud Run container images and examined the images that might be faulty. This neither restored the service nor showed the cause.","ko":"일부 사용자가 시스템을 쓸 수 없다고 알려 왔다. 그 사용자들의 브라우저에서 SPA 가 SyntaxError 를 내며 동작하지 않았다. 동일본 사용자는 문제가 없었고 서일본 사용자만 영향을 받았다.\n\n시스템이 내보내는 JavaScript 파일이 손상돼 있었다. 같은 코드가 파일 안에 두 번 들어 있는 식이었다. 컨테이너 이미지 안의 같은 파일은 정상이었다. 팀은 로그에 적힌 파일 크기 같은 값을 보고 CDN 을 의심했다.\n\n개발팀은 처음에 Cloud Run 의 컨테이너 이미지를 의심했다. 이미지를 다시 만들어 배포하고 문제가 될 만한 이미지를 조사했지만 복구되지 않았고 원인도 나오지 않았다. 마침 오키나와에 머물며 일하던 개발자가 문제를 재현했다. 그 개발자는 원인이 SPA 가 쓰는 JavaScript 파일에 있다는 것을 찾아 그 파일을 받아 냈다.\n\nCloud CDN 의 오리진이 도쿄의 NRT 일 때는 문제가 재현되지 않았고 오사카의 KIX 일 때는 재현됐다."},"updated_at":"2026-11-14T12:34:22.978112Z","url":"https://benchlet.com/incidentlib/app/cases/IL-0584","org_slug":"monicle"}