Java 8은 지원이 종료되었으며 2026년 1월 31일에
지원 중단됩니다. 지원 중단 후에는 조직에서 이전에 조직 정책을 사용하여 레거시 런타임의 배포를 다시 사용 설정한 경우에도 Java 8 애플리케이션을 배포할 수 없습니다. 기존 Java 8 애플리케이션은
지원 중단 날짜 이후에도 계속 실행되고 트래픽을 수신합니다.
지원되는 최신 Java 버전으로 마이그레이션하는 것이 좋습니다.
기존 번들 서비스용 Namespaces API
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Google App Engine의 Namespaces API를 사용하면 Google App Engine 데이터를 손쉽게 구분하여 관리할 수 있습니다. 이 API는 네임스페이스 관리자라는 새로운 패키지를 통해 구현되며 특정 namespace-enabled API에 포함되어 있습니다.
네임스페이스 관리자에서 네임스페이스를 설정하면 이 API에서 현재 네임스페이스를 가져와서 전역적으로 사용합니다. 네임스페이스를 명시적으로 로컬에서 선언할 수는 있지만, 네임스페이스를 명시적으로 선언하면 의도치 않은 데이터 유출 및 기타 버그가 발생할 수 있으므로 주의해야 합니다. 모든 App Engine 요청에서 모든 네임스페이스에 액세스할 수 있으므로 여러 네임스페이스 간에 액세스 제어 정책을 적용할 책임은 애플리케이션에 있습니다.
Namespaces API를 사용하여 다양한 애플리케이션을 개발할 수 있습니다. 이 API는 아래의 설명과 같이 멀티테넌시를 지원하는 애플리케이션에 특히 유용합니다.
멀티테넌시 정보
멀티테넌시란 원격 서버에서 실행되는 애플리케이션의 인스턴스 중 하나로 여러 클라이언트 조직(테넌트라고도 함)에 제공하는 소프트웨어 아키텍처를 가리키는 용어입니다.
멀티테넌시 아키텍처를 사용하면 테넌트를 간단하게 관리하고 프로비저닝할 수 있습니다. 보다 간결하고 맞춤화된 사용자 환경을 제공할 뿐 아니라 격리된 여러 데이터를 단일 데이터베이스 스키마로 집계할 수 있습니다. 결과적으로 애플리케이션의 확장성이 강화되고 확장에 따르는 비용 효율성도 개선됩니다. 모든 테넌트가 동일한 데이터베이스 스키마를 공유하므로 여러 테넌트의 데이터를 보다 쉽게 구분하고 분석할 수 있습니다. 또한 더욱 효율적인 애플리케이션을 통해 다양한 사용자 그룹에 커스텀 콘텐츠를 제공할 수 있습니다.
Namespaces API를 사용한 멀티테넌시 애플리케이션 구축
Namespaces API를 사용하면 테넌트마다 고유한 네임스페이스 문자열을 지정하여 각 테넌트의 데이터를 간단히 분리할 수 있습니다. 개별 요청에서 네임스페이스를 명시적으로 설정할 필요 없이 네임스페이스 관리자를 사용하여 전역적으로 각 테넌트의 네임스페이스를 설정하면 됩니다. 네임스페이스 사용 API는 항상 이 현재 네임스페이스를 기본적으로 사용합니다.
Namespaces API는 Google Workspace와 통합되어 Google Workspace 도메인을 현재 네임스페이스로 사용할 수 있습니다. Google Workspace를 사용하면 소유한 모든 도메인에 앱을 배포할 수 있으므로 Google Workspace 계정에 연결된 모든 도메인에 고유한 네임스페이스를 손쉽게 설정할 수 있습니다.
멀티테넌시 애플리케이션을 설계할 때는 네임스페이스 간에 데이터가 유출되지 않도록 방지해야 합니다. 자세한 내용은 데이터 유출 방지를 참조하세요.
네임스페이스를 사용하는 App Engine API
App Engine에서 현재 네임스페이스를 지원하는 API는 다음과 같습니다.
네임스페이스를 사용한 샘플 프로젝트
네임스페이스를 사용하는 2개의 샘플 방명록 애플리케이션이 제공됩니다.
Namespace API의 기타 용도
Namespaces API는 App Engine에서 멀티테넌시를 지원하는 용도 이외에도 다음과 같이 다양하게 사용됩니다.
- 사용자 정보 격리
- 관리 데이터와 애플리케이션 데이터 분리
- 테스트용과 프로덕션용으로 별도의 Datastore 인스턴스 만들기
- 단일 App Engine 인스턴스에서 여러 앱 실행
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-09-04(UTC)
[[["이해하기 쉬움","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-04(UTC)"],[[["\u003cp\u003eThe Namespaces API in Google App Engine allows for easy compartmentalization of data, primarily for multitenant applications.\u003c/p\u003e\n"],["\u003cp\u003eMultitenancy, where one application instance serves multiple client organizations, is simplified through the use of unique namespace strings for each tenant.\u003c/p\u003e\n"],["\u003cp\u003eThe API integrates with Google Workspace, enabling the use of Google Workspace domains as namespaces and allowing for unique namespaces to be set for each linked domain.\u003c/p\u003e\n"],["\u003cp\u003eSeveral App Engine APIs, including Datastore, Memcache, Task Queue, and Search, support the use of namespaces.\u003c/p\u003e\n"],["\u003cp\u003eThe Namespaces API has various applications beyond multitenancy, such as separating admin and application data, compartmentalizing user information, and creating separate data stores for testing and production environments.\u003c/p\u003e\n"]]],[],null,["# Namespaces API for legacy bundled services\n\nThe Namespaces API in Google App Engine makes it easy to compartmentalize your Google App Engine data. This API is implemented via a new package called the [namespace manager](/appengine/docs/legacy/standard/java/javadoc/com/google/appengine/api/NamespaceManager), and is incorporated in certain [namespace-enabled APIs](#App_Engine_APIs_that_use_namespaces).\n| This API is supported for first-generation runtimes and can be used when [upgrading to corresponding second-generation runtimes](/appengine/docs/standard/\n| java-gen2\n|\n| /services/access). If you are updating to the App Engine Java 11/17 runtime, refer to the [migration guide](/appengine/migration-center/standard/migrate-to-second-gen/java-differences) to learn about your migration options for legacy bundled services.\n\nWhen you set a namespace in the namespace manager, these APIs get the current namespace and use it globally. You can explicitly declare a namespace locally, but you need to exercise caution when explicitly declaring namespaces, because you could inadvertently create data leaks and other bugs. Any App Engine request can access any namespace, leaving the application to enforce an access control policy across namespaces.\n\nYou can use the Namespaces API to build a wide range of applications. One of the most compelling uses of this API is for multitenant applications, as described below.\n\nAbout multitenancy\n------------------\n\n*Multitenancy* is the name given to a software architecture in which one instance of an application, running on a remote server, serves many client organizations (also known as *tenants*).\n\nUsing a multitenant architecture simplifies administration and provisioning of tenants. You can provide a more streamlined, customized user experience, and also aggregate different silos of data under a single database schema. As a result, your applications become more scalable as well as more cost-effective as you scale. Data becomes easier to segregate and analyze across tenants because all tenants share the same database schema. Different user groups see custom content wrapped within a more efficient application.\n\nBuilding a multitenant application with the Namespaces API\n----------------------------------------------------------\n\nUsing the Namespaces API, you can easily partition data across tenants simply by specifying a unique namespace string for each tenant. You simply [set the namespace](/appengine/docs/legacy/standard/java/multitenancy/multitenancy#Setting_the_current_namespace) for each tenant globally using the namespace manager (as opposed to setting it explicitly for a specific request). The [namespace-enabled APIs](#App_Engine_APIs_that_use_namespaces) always use this current namespace by default.\n\nThe Namespaces API is integrated with Google Workspace, allowing you to use your Google Workspace domain as the current namespace. Because Google Workspace lets you deploy your app to any domain that you own, you can easily [set unique namespaces](/appengine/docs/legacy/standard/java/multitenancy/multitenancy#Setting_the_current_namespace) for all domains linked to your Google Workspace account.\n\nWhen designing multitenant applications, you need to prevent data from leaking across namespaces. For more information, please see [Avoiding Data Leaks](/appengine/docs/legacy/standard/java/multitenancy/multitenancy#Avoiding_data_leaks).\n\nApp Engine APIs that use namespaces\n-----------------------------------\n\nApp Engine currently supports namespaces in the following APIs:\n\n- [Datastore](/appengine/docs/legacy/standard/java/multitenancy/multitenancy#Using_namespaces_with_the_Datastore)\n- [Memcache](/appengine/docs/legacy/standard/java/multitenancy/multitenancy#Using_namespaces_with_the_Memcache)\n- [Task Queue](/appengine/docs/legacy/standard/java/multitenancy/multitenancy#Using_namespaces_with_the_Task_Queue)\n- [Search](/appengine/docs/legacy/standard/java/multitenancy/multitenancy#Using_namespaces_with_Search)\n\nSample projects using namespaces\n--------------------------------\n\nTwo sample guestbook applications using namespaces are provided:\n\n- Python App Engine: [appengine-multitenancy](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/appengine/standard/multitenancy) -- A namespace-aware sample guestbook application.\n- Java App Engine: [appengine-gwtguestbook-namespaces-java](https://github.com/GoogleCloudPlatform/appengine-gwtguestbook-namespaces-java) -- A namespace-aware sample guestbook application using GWT.\n\nOther uses for the Namespace API\n--------------------------------\n\nWhile the Namespaces API enables multitenancy on App Engine, it has a number of other uses, including:\n\n- Compartmentalizing user information\n- Separating admin data from application data\n- Creating separate datastore instances for testing and production\n- Running multiple apps on a single App Engine instance"]]