콘텐츠가 온프레미스 또는 다른 클라우드에 호스팅되고 Google의 고성능 분산 에지 캐싱 인프라를 통해 콘텐츠를 제공하려는 경우 Cloud CDN(Content Delivery Network)에 외부 백엔드(일명 커스텀 원본)을 사용합니다.
용어
다음 용어는 의미가 동일하거나 유사하기 때문에 구분 없이 사용되는 경우가 많습니다.
외부 백엔드: Google Cloud 외부에 위치하며 인터넷을 통해 연결할 수 있는 백엔드입니다. 인터넷 NEG의 엔드포인트입니다.
인터넷 네트워크 엔드포인트 그룹(NEG): 외부 백엔드를 지정하는 데 사용하는 Google Cloud API 리소스입니다.
외부 엔드포인트:외부 백엔드와 동일합니다.
부하 분산 문서의 일관성을 유지하기 위해 이 문서에서는 인터넷 NEG API 리소스를 참조하는 경우를 제외하고 외부 백엔드라는 용어를 사용합니다.
Cloud CDN에 지원되는 백엔드 유형
Cloud CDN은 외부 애플리케이션 부하 분산기와 함께 작동하여 사용자에게 콘텐츠를 제공합니다. 외부 애플리케이션 부하 분산기는 요청을 수신하는 프런트엔드 IP 주소와 포트를 제공합니다. Cloud CDN 콘텐츠는 다음과 같은 다양한 유형의 백엔드에서 가져올 수 있습니다.
외부 백엔드는 온프레미스 인프라 또는 제3자 제공업체가 제공하는 원본 내에서 호스팅될 수 있습니다. 다음 섹션에서는 외부 백엔드에 대해 자세히 설명합니다.
하이브리드 및 멀티 클라우드 아키텍처
서비스를 Google Cloud로 이전할 때 단계적으로 진행해야 할 수 있습니다. 경우에 따라 특정 콘텐츠는 클라우드 환경으로 즉시 이전할 수 없으며 온프레미스를 유지해야 할 수도 있습니다. 또는 콘텐츠가 다른 클라우드에 호스팅되는 경우도 있습니다. Cloud CDN에서 외부 백엔드를 지원하면 해당 콘텐츠에 Google의 전역 분산 에지 캐싱 인프라를 사용할 수 있습니다.
하이브리드 및 멀티 클라우드 아키텍처
이 다이어그램에서 images 콘텐츠는 Google Cloud에 있지만 video는 도쿄 데이터 센터에 있으며 데이터 센터는 온프레미스에 있을 수도 있고 다른 클라우드에 있을 수도 있습니다.
외부 백엔드를 사용하면 도쿄 데이터 센터의 원본이 Cloud CDN 및 외부 애플리케이션 부하 분산기를 통해 사용자에게 콘텐츠를 제공하는 video 콘텐츠의 백엔드 소스가 될 수 있습니다.
이 배포는 URL 맵을 사용하여 동영상 트래픽에 대한 원본 pull 요청을 도쿄의 외부 백엔드로 전달할 수 있습니다.
이 매핑은 요청 URL인 /video에 따라 결정됩니다.
요청 URL(/images)에 따라 결정된 이미지의 경우 콘텐츠가 Google Cloud 에서 제공되며 Cloud CDN 에지 인프라에서 제공됩니다.
외부 백엔드 지정
Google Cloud에 배포된 엔드포인트로 Cloud CDN을 구성하는 것과 마찬가지로 NEG(네트워크 엔드포인트 그룹) API를 사용하여 Cloud CDN의 외부 백엔드로서 서버를 추가할 수 있습니다.
외부 백엔드를 지정하려면 인터넷 NEG를 사용합니다. 인터넷 NEG에는 다음 표에 나와 있는 엔드포인트 유형 중 하나가 있습니다.
엔드포인트 주소
유형
정의
사용 시기
호스트 이름 및 선택적 포트
INTERNET_FQDN_PORT
공개적으로 확인할 수 있는 정규화된 도메인 이름 및 선택적 포트로, 예를 들어 backend.example.com:443입니다(기본 포트는 HTTP의 경우 80 HTTPS의 경우 443).
공개 DNS와 함께 FQDN을 사용하여 외부 백엔드를 확인할 수 있는 경우 이 엔드포인트를 사용합니다.
IP 주소 및 선택적 포트
INTERNET_IP_PORT
공개적으로 액세스할 수 있는 IP 주소 및 선택적 포트로, 예를 들어 192.0.2.8 또는 192.0.2.8:443입니다(기본 포트는 HTTP의 경우 80 HTTPS의 경우 443).
이 엔드포인트를 사용하여 공개적으로 액세스할 수 있는 IP 주소와 연결할 포트를 지정합니다.
가장 좋은 방법은 INTERNET_FQDN_PORT 엔드포인트 유형과 FQDN 값을 원본 호스트 이름 값으로 사용하여 인터넷 NEG를 만드는 것입니다. 이렇게 하면 원본 인프라의 IP 주소 변경사항에서 Cloud CDN 구성이 격리됩니다. FQDN을 사용하여 정의된 네트워크 엔드포인트는 공개 DNS를 통해 확인됩니다. 구성된 FQDN을 Google Public DNS를 통해 확인 가능한지 확인하세요.
인터넷 NEG를 만든 후에는 INTERNET_FQDN_PORT 및 INTERNET_IP_PORT 간에 유형을 변경할 수 없습니다. 새 인터넷 NEG를 만들고 새 인터넷 NEG를 사용하도록 백엔드 서비스를 변경해야 합니다.
HTTP 요청의 Host 헤더로 특정 값을 예상하는 외부 백엔드를 사용하는 경우 백엔드 서비스에서 Host 헤더를 예상되는 값으로 설정하도록 구성해야 합니다. 사용자 정의 요청 헤더를 구성하지 않으면 백엔드 서비스는 클라이언트가 Google Cloud 외부 애플리케이션 부하 분산기에 연결하는 데 사용한 Host 헤더를 유지합니다. 커스텀 헤더에 대한 일반적인 내용은 백엔드 서비스에서 커스텀 헤더 만들기를 참조하세요.
구체적인 예시는 외부 백엔드로 Cloud CDN 설정을 참조하세요.
외부 백엔드 및 Google Cloud기반 원본 사용
다음 그림에서는 외부 애플리케이션 부하 분산기와 Cloud CDN으로 외부 백엔드를 배포하는 데 사용되는 인터넷 NEG를 보여줍니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-05(UTC)"],[[["\u003cp\u003eExternal backends, or custom origins, allow Cloud CDN to deliver content hosted outside of Google Cloud, whether it's on-premises or in another cloud environment, using Google's high-performance edge caching infrastructure.\u003c/p\u003e\n"],["\u003cp\u003eInternet network endpoint groups (NEGs) are used to specify these external backends, and they can be configured using either a fully qualified domain name (FQDN) or a publicly accessible IP address.\u003c/p\u003e\n"],["\u003cp\u003eCloud CDN, in conjunction with an external Application Load Balancer, supports various backend types, including instance groups, zonal NEGs, serverless NEGs, internet NEGs for external backends, and buckets in Cloud Storage.\u003c/p\u003e\n"],["\u003cp\u003eWhen deploying a hybrid or multi-cloud architecture, Cloud CDN can route requests to external backends based on the request URL, such as directing video traffic to an external backend while sourcing images from within Google Cloud.\u003c/p\u003e\n"],["\u003cp\u003eWhen using an external backend, the \u003ccode\u003eHost\u003c/code\u003e header in HTTP requests must be configured in the backend service if the external backend requires a specific \u003ccode\u003eHost\u003c/code\u003e value.\u003c/p\u003e\n"]]],[],null,["# External backends specified by using internet NEGs\n\nUse external backends (also called *custom origins* ) for Cloud CDN\n(Content Delivery Network) when content is hosted on-premises or in another\ncloud, and you want to deliver the content over Google's [high\nperformance](https://itm.cloud.com/google-reports/),\ndistributed edge caching infrastructure.\n\nTerminology\n-----------\n\nThe following terms are sometimes used interchangeably because they have\nthe same or similar meanings:\n\n- **external backend:** A backend that resides outside of Google Cloud and is reachable across the internet. The endpoint in an internet NEG.\n- **internet network endpoint group (NEG):** The Google Cloud API resource that you use to specify an external backend.\n- **external endpoint:** Same as an *external backend*.\n\nTo maintain consistency with the [load balancing\ndocumentation](/load-balancing/docs/https/setting-up-https-external-backend-internet-neg),\nthis document uses the term *external backend* except when referring to the\ninternet NEG API resource.\n\nSupported backend types for Cloud CDN\n-------------------------------------\n\nCloud CDN works with an [external Application Load Balancer](/load-balancing/docs/https)\nto deliver content to your users. The external Application Load Balancer provides the frontend\nIP addresses and ports that receive requests. Cloud CDN content can\nbe sourced from various types of backends:\n\n- [Instance groups](/compute/docs/instance-groups)\n- [Zonal network endpoint groups\n (NEGs)](/load-balancing/docs/negs/zonal-neg-concepts)\n- [Serverless NEGs](/load-balancing/docs/negs/serverless-neg-concepts): One or more [App Engine](/appengine/docs), [Cloud Run](/run/docs), or [Cloud Run functions](/functions/docs) services\n- [Internet NEGs](/load-balancing/docs/negs/internet-neg-concepts) for external backends\n- Buckets in [Cloud Storage](/storage/docs)\n\nExternal backends can be hosted within an on-premises infrastructure or origins\nprovided by third-party providers. The following sections discuss external\nbackends in more detail.\n\nHybrid and multi-cloud architectures\n------------------------------------\n\nAs you move your services to Google Cloud, you might need to do so in\nphases. Sometimes certain content can't immediately be moved to a cloud\nenvironment and might need to stay on-premises. In other cases, the content\nmight be hosted in another cloud. Cloud CDN support\nfor external backends lets you use Google's\n[globally distributed edge caching infrastructure](/cdn/docs/locations) for such\ncontent.\n[](/static/load-balancing/images/cdn-hybrid-multicloud.svg) Hybrid and multi-cloud architecture\n\nIn the diagram, `images` content resides in Google Cloud, while `video`\nresides in a Tokyo data center, which could be on-premises or in another cloud.\nWith external backends, origins in the Tokyo data center can be\nthe backend source of the `video` content with Cloud CDN and the\nexternal Application Load Balancer delivering the content to users.\n\nUsing [URL maps](/load-balancing/docs/url-map-concepts), this deployment can\ndirect origin pull requests for video traffic to the external backend in Tokyo.\nThis mapping is determined based on request URL: `/video`.\n\nFor images (determined based on request URL: `/images`), content is sourced\nfrom Google Cloud and is delivered by the Cloud CDN edge\ninfrastructure.\n| **Note:** Cloud CDN supports fetching content from a single external backend for a service. It does not provide load balancing among multiple external backends for a service, nor does it load balance between an external backend and a Google Cloud backend.\n\nSpecifying an external backend\n------------------------------\n\nSimilar to configuring Cloud CDN with your endpoints deployed in\nGoogle Cloud, you can use the [network endpoint groups (NEGs)\nAPI](/compute/docs/reference/rest/v1/networkEndpointGroups) to add your\nserver as the external backend for Cloud CDN.\n\nTo specify the external backend, use an internet NEG. An internet NEG\nhas one of the endpoint types shown in the following table.\n\nThe best practice is to create the internet NEG with the `INTERNET_FQDN_PORT`\nendpoint type and an FQDN value as an origin hostname value. This insulates the\nCloud CDN configuration from IP address changes in the origin\ninfrastructure. Network endpoints that are defined by using FQDNs are resolved\nthrough public DNS. Make sure that the configured FQDN is resolvable through\n[Google Public DNS](https://developers.google.com/speed/public-dns/).\n\nAfter you create the internet NEG, the type cannot be changed between\n`INTERNET_FQDN_PORT` and `INTERNET_IP_PORT`. You need to create a new internet\nNEG and change your backend service to use the new internet NEG.\n\nWhen using an external backend that expects a particular value for the HTTP\nrequest's `Host` header, you must configure the backend service to set the\n`Host` header to that expected value. If you don't configure a user-defined\nrequest header, a backend service preserves the `Host` header that the client\nused to connect to the Google Cloud external Application Load Balancer. For general\ninformation about custom headers, see\n[Create custom headers in backend services](/load-balancing/docs/custom-headers).\nFor a specific example, see [Setting up Cloud CDN with an external\nbackend](/cdn/docs/setting-up-cdn-with-ex-backend-internet-neg).\n\nUsing external backends and Google Cloud-based origins\n------------------------------------------------------\n\nThe following figure shows an internet NEG used to deploy an external backend\nwith an external Application Load Balancer and Cloud CDN.\n[](/static/load-balancing/images/cdn-custom-origins-negs.svg) Cloud CDN with external backends\n\nWhat's next\n-----------\n\n- To set up an external backend, see [Set up an external backend with an internet NEG](/cdn/docs/set-up-external-backend-internet-neg).\n- To learn about what content is cached, see [Caching overview](/cdn/docs/caching).\n- To resolve issues, see [Troubleshooting external backend and internet NEG\n issues](/load-balancing/docs/https/troubleshooting-ext-https-lbs#external-backends-internet-neg)."]]