App Engine, GKE, Compute Engine에서 제공하는 기능 비교는 컴퓨팅 옵션 선택을 참조하세요.
App Engine 사용을 고려하고 있다면 표준 또는 가변형 환경을 선택해야 합니다. 두 환경 비교는 App Engine 환경 선택을 참조하세요.
컴퓨팅 옵션 제한 정보
OpenAPI용 Endpoints와 gRPC용 Endpoints는 ESP 또는 ESPv2를 프록시로 사용할 수 있습니다.
서버리스 외의 플랫폼에서 ESP 또는 ESPv2는 애플리케이션 앞에 컨테이너로 배포되거나 애플리케이션과 함께 사이드카로 배포됩니다. Cloud Run, Cloud Run 함수, App Engine과 같은 서버리스 플랫폼에서 ESPv2는 서버리스 플랫폼 애플리케이션을 관리하기 위한 원격 프록시로서 Cloud Run 서비스로 배포됩니다.
API의 백엔드 코드를 배포한 후 ESP 또는 ESPv2는 모든 요청을 가로채고 모든 필요한 검사(예: 인증)를 수행한 후에 요청을 API 백엔드로 전달합니다. 백엔드가 응답하면 ESP가 서비스 인프라를 사용하여 원격 분석 자료를 수집하고 보고합니다.
Endpoints Frameworks의 개발 단계에서는 App Engine 표준 환경이 다중 컨테이너 배포를 지원하지 않았으므로 Endpoints Frameworks는 ESP를 사용하지 않습니다. 그러나 Endpoints 프레임워크에는 ESP가 OpenAPI용 Endpoints 및 gRPC용 Endpoints에 제공하는 기능과 비슷한 API 관리 기능을 제공하는 API 게이트웨이가 내장되어 있습니다.
App Engine 또는 Cloud Run 함수에서는 gRPC API가 지원되지 않습니다.
gRPC는 모든 환경에서 실행될 수 있는 리모트 프러시저 콜(RPC) 프레임워크입니다. gRPC를 사용하면 클라이언트 애플리케이션이 로컬 객체처럼 다른 머신의 서버 애플리케이션에서 직접 메서드를 호출할 수 있습니다. gRPC의 핵심 기능은 HTTP/2 기반 전송을 통한 양방향 스트리밍입니다.
App Engine 및 Cloud Run 함수에서는 HTTP/2를 지원하지 않습니다.
지원되는 프로그래밍 언어
OpenAPI 사양은 언어 중립적 사양입니다. 모든 프로그래밍 언어로 API를 구현할 수 있습니다.
gRPC는 C++, C#, Objective-C(iOS용), Dart, Go, 자바(Android 지원 포함), Node.js, Python, Ruby 등의 많은 주요 프로그래밍 언어에 프로토콜 버퍼 컴파일러인 protoc을 제공합니다.
최신 목록은 gRPC FAQ를 참조하세요.
Endpoints 프레임워크는 자바 8과 Python 2.7만 지원합니다.
API 설명
Endpoints 옵션은 API를 설명하는 여러 가지 방법을 제공합니다.
OpenAPI용 Endpoints
OpenAPI Initiative는 REST API의 설명을 표준화하기 위한 업계 차원의 노력을 의미합니다.
Endpoints는 OpenAPI 사양(이전의 Swagger 사양) 버전 2.0으로 설명된 API를 지원합니다.
API 노출 영역을 OpenAPI 문서라고 하는 JSON 또는 YAML 파일로 설명합니다. Django 또는 Jersey와 같이 공개적으로 사용 가능한 REST 프레임워크로 API를 구현할 수 있습니다.
OpenAPI 사양에 대해 잘 모르는 경우 OpenAPI 개요를 참조하세요.
gRPC를 사용하여 proto 파일에 직렬화하려는 데이터의 구조를 정의합니다. 이 파일은 확장자가 .proto인 일반 텍스트 파일입니다. 또한 프로토콜 버퍼 메시지로 지정된 RPC 메서드 매개변수와 반환 유형을 사용하여 proto 파일에서 API 노출 영역을 정의합니다. gRPC를 잘 모르는 경우 gRPC 문서의 gRPC란?을
참조하세요.
Endpoints 프레임워크는 App Engine 표준 Python 2.7 및 Java 8 런타임 환경을 위한 웹 프레임워크입니다.
자바의 주석이나 Python의 데코레이터를 사용하여 메타데이터를 소스 코드에 추가합니다. 메타데이터는 애플리케이션용 REST API의 노출 영역을 설명합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-12-21(UTC)"],[[["\u003cp\u003eCloud Endpoints offers three options for API management: Cloud Endpoints for OpenAPI, Cloud Endpoints for gRPC, and Cloud Endpoints Frameworks for the App Engine standard environment.\u003c/p\u003e\n"],["\u003cp\u003eEndpoints supports various Google Cloud computing options, including App Engine, Cloud Run, Compute Engine, GKE, and Kubernetes, utilizing either the Extensible Service Proxy (ESP) or Extensible Service Proxy V2 (ESPv2) for API management.\u003c/p\u003e\n"],["\u003cp\u003eEndpoints Frameworks is specifically designed for the App Engine standard generation 1 environment, supporting Java 8 and Python 2.7, and using a built-in API gateway instead of ESP due to historical limitations.\u003c/p\u003e\n"],["\u003cp\u003egRPC APIs, known for their bi-directional streaming over HTTP/2, are not supported on App Engine or Cloud Run functions due to the lack of HTTP/2 support in these environments.\u003c/p\u003e\n"],["\u003cp\u003eThe different Endpoints options provide distinct ways to describe APIs: OpenAPI uses JSON or YAML files, gRPC utilizes proto files, and Endpoints Frameworks employs metadata within the source code.\u003c/p\u003e\n"]]],[],null,["# Choosing an Endpoints option\n\nTo have your API managed by Cloud Endpoints, you have three options depending\non where your API is hosted and the type of communications protocol your\nAPI uses:\n\n- [Cloud Endpoints for OpenAPI](/endpoints/docs/openapi)\n- [Cloud Endpoints for gRPC](/endpoints/docs/grpc/about-grpc)\n- [Cloud Endpoints Frameworks for the App Engine standard environment](/endpoints/docs/frameworks/about-cloud-endpoints-frameworks)\n\nThis page describes the Endpoints options to help you decide\nwhich one is right for you.\n\nChoosing a computing option\n---------------------------\n\nEndpoints supports different Google Cloud\ncomputing options that can host your API's backend code. Endpoints works with either the\n[Extensible Service Proxy (ESP)](/endpoints/docs/grpc/glossary#extensible_service_proxy) or the [Extensible Service Proxy V2](/endpoints/docs/openapi/glossary#extensible_service_proxy_v2) (ESPv2) to provide API management. The following table\nsummarizes the supported computing options:\n\nFor a comparison of the features provided by App Engine,\nGKE, and Compute Engine, see\n[Choosing a computing option](/docs/choosing-a-compute-option).\nIf you are thinking of using App Engine, you need to choose either the\nstandard or flexible environment. For a comparison of the two environments, see\n[Choosing an App Engine environment](/appengine/docs/the-appengine-environments).\n\nAbout the computing option limitations\n--------------------------------------\n\nEndpoints for OpenAPI and Endpoints for gRPC can use\nESP or ESPv2 as a proxy.\nFor non-serverless platforms, ESP or ESPv2 is deployed as a container in front of your\napplication or as a sidecar with your application. For serverless platforms, such as Cloud Run, Cloud Run functions, and App Engine, ESPv2 is deployed as a Cloud Run service as a remote proxy to manage your serverless platform applications.\n\nAfter you deploy your API's\nbackend code, ESP or ESPv2 intercepts all requests and performs any\nnecessary checks (such as authentication) before forwarding the request to the\nAPI backend. When the backend responds, ESP gathers and reports\ntelemetry using [Service Infrastructure](/service-infrastructure/docs/overview).\n\nYou can view metrics for your API and links to\n[Google Cloud Observability](/stackdriver/docs)\nlogs and traces on the **Endpoints Services** page in the\nGoogle Cloud console.\n\n### App Engine standard generation 1 environment limitations\n\nEndpoints for the App Engine standard generation 1 environment historically used Endpoints Frameworks, which\nonly supports the [Java 8 and Python 2.7 runtime environments](/appengine/docs/standard/runtimes).\n\n\nBecause the App Engine standard environment didn't support\nmulti-container deployments when Endpoints Frameworks was\nunder development, Endpoints Frameworks doesn't use\nESP. Instead, Endpoints Frameworks includes a built-in\n[API gateway](https://wikipedia.org/wiki/API_management)\nthat provides API management features that are comparable to the\nfeatures that ESP provides for Endpoints for OpenAPI and\nEndpoints for gRPC.\n\n\u003cbr /\u003e\n\n| **Note:** Although Endpoints Frameworks does work with the Java 7 runtime on App Engine standard environment, the [Java 7 runtime was deprecated](/appengine/docs/deprecations/java7) and is scheduled to be shutdown.\n\n### gRPC APIs aren't supported on App Engine or Cloud Run functions\n\n[gRPC](https://grpc.io/about/)\nis a remote procedure call (RPC) framework that\ncan run on any environment. With gRPC, a client application can directly call\nmethods in a server application on a different machine as if it were a local\nobject. A core feature of gRPC is bi-directional streaming with\n[HTTP/2-based transport](https://wikipedia.org/wiki/HTTP/2).\n\nApp Engine and Cloud Run functions do not support HTTP/2.\n\nSupported programming languages\n-------------------------------\n\n- The [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification) is a language-agnostic specification. You can implement your API in any programming language.\n- gRPC provides the [protocol buffer compiler](https://developers.google.com/protocol-buffers/docs/overview), `protoc`, for many major programming languages: C++, C#, Objective-C (for iOS), Dart, Go, Java (including support for Android), Node.js, Python, and Ruby. See the [gRPC FAQ](https://grpc.io/faq/) for the most up-to-date list.\n- Endpoints Frameworks supports only Java 8 and Python 2.7.\n\nDescribing your API\n-------------------\n\nThe Endpoints options provide different ways to describe your API.\n\n### Endpoints for OpenAPI\n\nThe\n[OpenAPI Initiative](http://openapis.org/)\nis an industry-wide effort to standardize the description of REST APIs.\nEndpoints supports APIs that are described using version 2.0 of\nthe OpenAPI Specification (formerly the\n[Swagger Specification](https://swagger.io/docs/specification/about/)).\nYou describe the\n[surface](/endpoints/docs/openapi/glossary#surface)\nof your API in a JSON or YAML file (referred to as an OpenAPI document). You can\nimplement your API using any publicly available REST framework such as\n[Django](https://www.djangoproject.com/)\nor\n[Jersey](https://jersey.github.io/).\nIf you are unfamiliar with the OpenAPI Specification, see\n[OpenAPI overview](/endpoints/docs/openapi/openapi-overview).\n\nFor more information, see [Endpoints for OpenAPI](/endpoints/docs/openapi).\n\n### Endpoints for gRPC\n\nWith gRPC, you define the structure of the data that you want to serialize in a\n*proto file* : this is an ordinary text file with a `.proto` extension. You also\ndefine the\n[surface](/endpoints/docs/grpc/glossary#surface)\nof your API in proto files, with RPC method parameters and return types\nspecified as protocol buffer messages. If you are unfamiliar with gRPC, see\n[What is gRPC?](https://grpc.io/docs/guides/)\nin the gRPC documentation.\n\nFor more information, see [Endpoints for gRPC](/endpoints/docs/grpc/about-grpc).\n\n### Endpoints Frameworks\n\nEndpoints Frameworks is a\n[web framework](https://wikipedia.org/wiki/Web_framework)\nfor the App Engine standard Python 2.7 and Java 8 runtime environments.\nYou add metadata (using annotations in Java or decorators in Python) to your\nsource code. The metadata describes the\n[surface](/endpoints/docs/frameworks/glossary#surface)\nof the REST APIs for your application.\n\nFor more information, see [Endpoints Frameworks](/endpoints/docs/frameworks/about-cloud-endpoints-frameworks).\n\nWhat's next\n-----------\n\n- See Endpoints features in action by doing the\n [Quickstart for Endpoints](/endpoints/docs/deploy-api),\n which uses scripts to deploy a sample API to the App Engine flexible\n environment.\n\n- Get familiar with the deployments steps by doing one of the tutorials for\n the Endpoints option that you have chosen:\n\n - [Endpoints for OpenAPI: Tutorials](/endpoints/docs/openapi/tutorials)\n - [Endpoints for gRPC: Tutorials](/endpoints/docs/grpc/tutorials)\n - [Endpoints Frameworks: Tutorials](/endpoints/docs/frameworks/tutorials)\n- Learn more about Endpoints and ESP:\n\n - [Endpoints for OpenAPI: About Endpoints](/endpoints/docs/openapi/about-cloud-endpoints)\n - [Endpoints for gRPC: About Endpoints](/endpoints/docs/grpc/about-cloud-endpoints)\n - [Comparing Extensible Service Proxy and Endpoints Frameworks](/endpoints/docs/frameworks/frameworks-extensible-service-proxy)"]]