서비스 엔드포인트는 API 서비스의 네트워크 주소를 지정하는 기준 URL입니다. Spanner에서는 전역 및 리전 엔드포인트 모두가 사용됩니다. 전역 또는 리전 서비스 엔드포인트를 사용하여 Spanner에 요청을 보낼 수 있습니다.
엄격한 리전 제한 요구사항이 없는 경우 전역 엔드포인트를 사용합니다. 데이터는 선택한 리전 내에 저장되지만 리전 외부에서 처리될 수 있습니다. Spanner의 전역 엔드포인트는 spanner.googleapis.com입니다. 기본 API 엔드포인트가 전역 엔드포인트에 액세스합니다.
리전 엔드포인트는 리전별 제한사항을 적용합니다. 데이터는 동일한 리전 내에 저장되어 처리됩니다. Spanner의 리전 엔드포인트는 저장 및 처리되는 데이터가 데이터베이스가 있는 Spanner 리전 인스턴스 구성으로 제한되도록 보장합니다. 규제 요구사항을 준수하기 위해 데이터 위치를 제한하고 제어해야 하는 경우 리전 엔드포인트를 사용합니다. 리전 엔드포인트를 사용하여 다른 인스턴스 구성에 속하는 리소스에 액세스할 수는 없습니다. 해당 인스턴스 구성에 리전 엔드포인트를 사용하려면 먼저 리전 인스턴스 구성으로 인스턴스를 만들어야 합니다.
사용할 수 있는 리전을 알아보려면 리전 엔드포인트에 사용할 수 있는 리전을 참조하세요. 기본 Spanner 스토리지 정책은 사용하는 엔드포인트와 관계없이 변경되지 않습니다.
리전 엔드포인트의 보안 및 규정 준수
전역 엔드포인트 대신 Spanner 리전 엔드포인트를 사용할 경우 얻을 수 있는 이점은 리전 격리 및 보호 기능을 제공하여 리전 엔드포인트가 보안, 규정 준수, 규제 요건을 충족시킬 수 있다는 것입니다.
해당 리전 인스턴스 구성에 속하는 리전 엔드포인트만 사용할 수 있습니다. 예를 들어 액세스하려는 인스턴스가 us-central1 리전 인스턴스 구성에 속하는 경우 spanner.me-central2.rep.googleapis.com을 사용하여 요청을 처리할 수 없습니다.
요청이 InvalidRegionalRequest 오류로 거부됩니다.
리전 엔드포인트의 제한사항
리전 엔드포인트로는 이중 리전 또는 멀티 리전 인스턴스 구성에 액세스할 수 없습니다. 이중 리전 또는 멀티 리전 인스턴스 구성에 액세스하려면 전역 엔드포인트를 사용해야 합니다. 예를 들어 멀티 리전 인스턴스 구성 nam7에 인스턴스가 있으면 리전 엔드포인트 spanner.us-central1.rep.googleapis.com을 사용하여 nam7의 인스턴스에 요청을 전송할 수 없습니다.
인스턴스 리소스에 리전 엔드포인트를 사용하는 활성 요청이 있는 경우 리전 시행에서 리전 간 인스턴스 액세스를 차단하므로 인스턴스를 이동하면 리전 엔드포인트를 사용하는 모든 요청에 영향을 미칩니다. 전역 엔드포인트를 사용하는 요청은 영향을 받지 않습니다.
리전 엔드포인트 이름 지정 규칙
Spanner 리전 엔드포인트 이름은 리전 인스턴스 구성 이름과 동일한 이름 지정 규칙을 따릅니다. 리전 엔드포인트는 spanner.REGION.rep.googleapis.com 형식을 따릅니다. 예를 들어 담맘의 리전 인스턴스 구성 이름과 리전 엔드포인트 이름이 모두 me-central2인 경우 리전 엔드포인트는 spanner.me-central2.rep.googleapis.com입니다.
[[["이해하기 쉬움","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)"],[],[],null,["# Global and regional service endpoints\n\nThis page describes Spanner global and regional service endpoints and\nhow to use them.\n\nA [**service endpoint**](/apis/design/glossary#api_service_endpoint) is a base\nURL that specifies the network address of an API service. Spanner\nhas both global and regional endpoints. You can use a global or regional service\nendpoint to make requests to Spanner.\n\nUse the **global endpoint** if you don't have strict regional\nrestriction requirements. Although the data is stored within the selected region,\nthe data might be processed outside the region. The global endpoint for\nSpanner is `spanner.googleapis.com`. The default API endpoint\naccesses the global endpoint.\n\nA **regional endpoint** enforces regional restrictions. Data is stored and\nprocessed within the same region. Regional endpoints for Spanner\nensure and guarantee that the data stored and processed is restricted to the\nSpanner regional\n[instance configuration](/spanner/docs/instance-configurations) where the\ndatabase resides. Use regional endpoints if your data location must be\nrestricted and controlled to comply with regulatory requirements. You can't use\na regional endpoint to access resources belonging to a different instance\nconfiguration. You must first create an instance in the regional instance\nconfiguration before you can use the regional endpoint for that instance\nconfiguration.\n\nTo learn which regions you can use, see\n[Regions available for regional endpoints](#available-regional-endpoints). The\nunderlying Spanner storage policies don't change regardless of\nwhich endpoint you use.\n\nSecurity and compliance for regional endpoints\n----------------------------------------------\n\nThe benefit of using a Spanner regional endpoint over a global\nendpoint is that the regional endpoint provides regional isolation and\nprotection to meet security, compliance, and regulatory requirements.\n\nYou can only use regional endpoints that belong to that regional instance\nconfiguration. For example, you can't use\n`spanner.me-central2.rep.googleapis.com` to serve requests if the instance you\nare accessing belongs to the `us-central1` regional instance configuration.\nThe request will be rejected with an `InvalidRegionalRequest` error.\n\nLimitations of regional endpoints\n---------------------------------\n\nYou can't access a dual-region or multi-region instance configuration with a\nregional endpoint. You must use the global endpoint to access your dual-region\nor multi-region instance configurations. For example, if you have an instance in\nthe multi-region instance configuration `nam7`, you can't use the regional\nendpoint `spanner.us-central1.rep.googleapis.com` to send requests to your\ninstance in `nam7`.\n\nIf you have active requests that use regional endpoints on any of\nthe instance resources, [moving the instance](/spanner/docs/move-instance)\nimpacts all requests using the regional endpoint because regional enforcement\nblocks access to cross region instances. Requests using a global endpoint are\nunaffected.\n\nRegional endpoint naming convention\n-----------------------------------\n\nSpanner regional endpoint names follow the same naming convention\nas the regional instance configuration names. The regional endpoint follows the\nformat `spanner.`\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e`.rep.googleapis.com`. For example, both the regional\ninstance configuration name and regional endpoint name for Dammam are\n`me-central2`. Therefore, the regional endpoint is\n`spanner.me-central2.rep.googleapis.com`.\n\nFor more information, see\n[Available regions for regional endpoints](#available-regional-endpoints).\n\nSpecify a regional endpoint\n---------------------------\n\nYou can specify a Spanner regional endpoint using the\nGoogle Cloud CLI, REST, or RPC API requests. \n\n### gcloud\n\nTo specify a regional endpoint and override the global endpoint, run the\nfollowing command: \n\n gcloud config set api_endpoint_overrides/spanner https://spanner.\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e.rep.googleapis.com/\n\nProvide the following value:\n\n\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e\n: The [region](#available-regional-endpoints) for which to set a regional endpoint. For example,\n `me-central2`.\n\nFor example, to configure the regional endpoint as `me-central2`, run the\nfollowing command: \n\n gcloud config set api_endpoint_overrides/spanner https://spanner.me-central2.rep.googleapis.com/\n\nTo reconfigure a regional endpoint to the global endpoint, run: \n\n gcloud config unset api_endpoint_overrides/spanner\n\n### REST API\n\nThe default API endpoint accesses the global endpoint. To use a regional\nendpoint, configure the endpoint to the address of the regional endpoint using\nthe following pattern: \n\n https://spanner.\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e.rep.googleapis.com\n\nFor example, if you want to enforce data guarantees in the regional instance\nconfiguration Dammam (`me-central2`), use: \n\n https://spanner.me-central2.rep.googleapis.com\n\nRefer to [REST API](/spanner/docs/reference/rest) and\n[Available regions for regional endpoints](#available-regional-endpoints) for\nmore information.\n\n### RPC API\n\nThe default API endpoint accesses the global endpoint. To use a regional\nendpoint, configure the endpoint to the address of the regional endpoint using\nthe following pattern: \n\n spanner.\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e.rep.googleapis.com\n\nFor example, if you want to enforce data guarantees in the regional instance\nconfiguration Dammam (`me-central2`), use: \n\n spanner.me-central2.rep.googleapis.com\n\nRefer to [RPC API](/spanner/docs/reference/rpc) and\n[Available regions for regional endpoints](#available-regional-endpoints) for\nmore information.\n\nRegions available for regional endpoints\n----------------------------------------\n\nSpanner regional endpoints are available in the following\nregions:\n\nRestrict global API endpoint usage\n----------------------------------\n\nTo help enforce the use of regional endpoints, use the\n`constraints/gcp.restrictEndpointUsage` organization policy constraint to block\nrequests to the global API endpoint. For more information, see\n[Restricting endpoint usage](/assured-workloads/docs/restrict-endpoint-usage).\n\nWhat's next\n-----------\n\n- Learn more about Spanner [instance configurations](/spanner/docs/instance-configurations).\n\n- Learn more about [Spanner REST API](/spanner/docs/reference/rest) and\n [Global and regional endpoints](/spanner/docs/rest-endpoints).\n\n- Learn more about [Spanner RPC API](/spanner/docs/reference/rpc) and\n [Global and regional endpoints](/spanner/docs/rpc-endpoints)."]]