Membandingkan Extensible Service Proxy dan Cloud Endpoints Framework
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan perbedaan antara Framework Endpoints untuk
lingkungan standar App Engine dan
Extensible Service Proxy (ESP),
yang digunakan di Cloud Endpoints untuk API yang menggunakan
OpenAPI
atau
gRPC.
Untuk informasi selengkapnya tentang opsi Endpoints, lihat
Memilih opsi Endpoints.
Ringkasan
Cloud Endpoints adalah sistem pengelolaan API yang membantu Anda mengamankan, memantau,
menganalisis, dan menetapkan kuota pada API menggunakan infrastruktur yang sama dengan yang digunakan Google
untuk API-nya sendiri. Fitur pengelolaan API mencakup autentikasi, kunci API, pemantauan, logging, dan pelacakan, terlepas dari teknologi yang digunakan untuk menerapkan API. Fungsi pengelolaan API disediakan melalui ESP atau
menggunakan Framework Endpoints.
Extensible Service Proxy
Di Endpoints untuk OpenAPI dan gRPC, permintaan API diteruskan
melalui Extensible Service Proxy, yang memvalidasi kunci dan token autentikasi serta
mengirim sinyal (metrik dan log) menggunakan
Service Control
API. Pemisahan yang disediakan oleh ESP berarti Anda dapat menulis
kode backend REST atau gRPC dalam bahasa apa pun, dan Anda dapat menggunakan gRPC atau framework apa pun
yang mendukung deskripsi API menggunakan OpenAPI.
API yang menggunakan OpenAPI: Backend API dapat berjalan di lingkungan fleksibel App Engine, Google Kubernetes Engine (GKE), Compute Engine, Kubernetes, atau deployment on-premise.
API yang menggunakan gRPC: Backend API dapat berjalan di deployment GKE, Compute Engine, Kubernetes, atau on-premise.
Permintaan dikirim di jalur berikut:
Permintaan untuk kode Anda diterima dan dikirim ke ESP.
ESP mengirimkan permintaan pemeriksaan ke Kontrol Layanan.
Jika Anda mengonfigurasi API untuk mewajibkan kunci API atau autentikasi, Kontrol Layanan akan memeriksa apakah permintaan diizinkan dan mengirim respons kembali ke ESP.
Jika permintaan tidak diizinkan, ESP akan menolak permintaan tersebut. Jika
permintaan diizinkan, permintaan tersebut akan diteruskan ke kode backend Anda. Apa pun hasilnya,
ESP akan mencatat informasi tentang permintaan tersebut.
Untuk backend API yang berjalan di lingkungan standar App Engine, Endpoints Framework tersedia untuk membantu developer mulai menyalurkan API dengan cepat. Framework Endpoints adalah
framework web
dan merupakan alternatif untuk Python Flask atau Java Jersey.
Endpoints Framework terintegrasi dengan Service Control API, yang berarti backend yang menggunakan Endpoints Framework tidak perlu berjalan di belakang Extensible Service Proxy.
Jika Anda telah mengaktifkan Pengelolaan API, permintaan akan dikirim di jalur berikut:
Permintaan ke kode Anda diterima dan dikirim ke modul Pengelolaan Endpoint dalam Framework Endpoint.
Modul Pengelolaan Endpoint mengirim permintaan pemeriksaan ke
Service Control.
Jika Anda mengonfigurasi API untuk mewajibkan kunci API atau autentikasi, Kontrol Layanan akan memeriksa apakah permintaan diizinkan dan mengirim respons kembali ke modul Pengelolaan Endpoint.
Jika permintaan tidak diizinkan, modul Pengelolaan Endpoint akan menolak permintaan tersebut. Jika diizinkan, permintaan akan diteruskan ke
Framework Endpoints. Apa pun yang terjadi, modul Pengelolaan Endpoint akan mencatat informasi tentang permintaan tersebut ke dalam log.
Framework Endpoint merutekan permintaan ke kode backend Anda.
Anda dapat menggunakan Framework Endpoint dengan atau tanpa fungsi pengelolaan API. Penggunaan Framework Endpoints tanpa fungsi pengelolaan API ditawarkan tanpa biaya. Fungsi pengelolaan API dikenai biaya sesuai dengan halaman harga Endpoint.
Endpoints Framework hanya didukung untuk layanan yang berjalan di lingkungan standar App Engine. Di Compute Engine, GKE, lingkungan fleksibel App Engine, atau lingkungan lainnya, layanan Anda harus berjalan di balik ESP.
Jika layanan berjalan di belakang ESP, Anda dapat menulis kode backend dalam bahasa dan framework apa pun, seperti Python Flask, Java Jersey, atau Node.js Express. Dalam lingkungan tersebut, Anda tidak perlu menggunakan Endpoints Framework untuk pengelolaan API.
Langkah selanjutnya
Untuk informasi tentang cara menambahkan pengelolaan API:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[[["\u003cp\u003eCloud Endpoints provides API management features like authentication, monitoring, and logging, either through the Extensible Service Proxy (ESP) or Endpoints Frameworks.\u003c/p\u003e\n"],["\u003cp\u003eThe Extensible Service Proxy (ESP) handles API requests for OpenAPI and gRPC, allowing backend code to be written in any language and deployed across various environments like GKE, Compute Engine, and on-premises.\u003c/p\u003e\n"],["\u003cp\u003eEndpoints Frameworks is specifically designed for API backends running on the App Engine standard environment, offering a web framework alternative to Flask or Jersey, and integrating directly with the Service Control API.\u003c/p\u003e\n"],["\u003cp\u003eEndpoints Frameworks is the only way to obtain API management features on the App Engine standard environment, and it supports only Python 2.7 and Java 8 runtime environments.\u003c/p\u003e\n"],["\u003cp\u003eAPI management functionality through either ESP or Endpoints Frameworks is charged based on the number of calls per month, while using Endpoints Frameworks without API management is offered at no charge.\u003c/p\u003e\n"]]],[],null,["# Comparing Extensible Service Proxy and Cloud Endpoints Frameworks\n\nThis page explains the differences between Endpoints Frameworks for\nthe App Engine standard environment and the\n[Extensible Service Proxy (ESP)](/endpoints/docs/frameworks/glossary#extensible_service_proxy),\nwhich is used in Cloud Endpoints for APIs using\n[OpenAPI](/endpoints/docs/openapi)\nor\n[gRPC](/endpoints/docs/grpc/about-grpc).\nFor more information about the Endpoints options, see\n[Choosing an Endpoints option](/endpoints/docs/choose-endpoints-option).\n\nOverview\n--------\n\nCloud Endpoints is an API management system that helps you secure, monitor,\nanalyze, and set quotas on your APIs using the same infrastructure Google uses\nfor its own APIs. API management features includes authentication, API keys,\nmonitoring, logging, and tracing independent of the technology used to implement\nthe API. API management functionality is provided through ESP or\nby using the Endpoints Frameworks.\n\nExtensible Service Proxy\n------------------------\n\nIn Endpoints for OpenAPI and gRPC, API requests are relayed\nthrough the Extensible Service Proxy, which validates keys and authentication tokens and\nsends signals (metrics and logs) by using the\n[Service Control](/service-control/overview)\nAPI. The separation provided by ESP means that you can write the\nREST or gRPC backend code in any language, and you can use gRPC or any framework\nthat supports API description using OpenAPI.\n\n- APIs using OpenAPI: The API backend can run on the App Engine flexible\n environment, Google Kubernetes Engine (GKE), Compute Engine, Kubernetes, or\n on-premises deployments.\n\n- APIs using gRPC: The API backend can run on GKE,\n Compute Engine, Kubernetes, or on-premises deployments.\n\nA request is sent on the following path:\n\n1. A request to your code is received and is sent to ESP.\n2. ESP sends a check request to Service Control.\n3. If you configured your API to require an API key or authentication, Service Control checks to see if the request is permitted and sends a response back to ESP.\n4. If the request isn't permitted, ESP rejects the request. If the request is permitted, it is forwarded to your backend code. Either way, ESP logs information about the request.\n\n[Pricing of Endpoints API management](/endpoints/pricing)\ndepends on the number of calls per month.\n\nEndpoints Frameworks\n--------------------\n\nFor API backends running on the App Engine standard environment,\nEndpoints Frameworks is available to help developers quickly get\nstarted serving an API. Endpoints Frameworks is a\n[web framework](https://wikipedia.org/wiki/Web_framework)\nand is an alternative to Python Flask or Java Jersey.\nEndpoints Frameworks integrates with\nthe Service Control API, meaning a backend that uses\nEndpoints Frameworks doesn't need to run behind the Extensible Service Proxy.\n| **Note:** Endpoints Frameworks is the only way to get API management functionality, such as monitoring, logging, and API keys, on the App Engine standard environment. Only the [Python 2.7 and Java 8 runtime environments](/appengine/docs/standard/runtimes) are supported.\n\nIf you have enabled API Management, a request is sent on the following path:\n\n1. A request to your code is received and is sent to the Endpoints Management module within Endpoints Frameworks.\n2. The Endpoints Management module sends a check request to Service Control.\n3. If you configured your API to require an API key or authentication, Service Control checks to see if the request is permitted and sends a response back to the Endpoints Management module.\n4. If the request isn't permitted, the Endpoints Management module rejects the request. If the request is permitted, it is forwarded to Endpoints Frameworks. Either way, the Endpoints Management module logs information about the request.\n5. Endpoints Frameworks routes the request to your backend code.\n\nYou can use Endpoints Frameworks with or without API management\nfunctionality. Use of Endpoints Frameworks without API management\nfunctionality is offered at no charge. API management functionality is charged\naccording to the\n[Endpoints pricing page](/endpoints/pricing).\n\nEndpoints Frameworks is supported only for services running on the\nApp Engine standard environment. On Compute Engine,\nGKE, App Engine flexible environment, or other\nenvironments, your services must run behind ESP.\n\nIf the service is running behind ESP, you can write the backend\ncode in any language and framework, such as Python Flask, Java Jersey, or\nNode.js Express. In such environments, there is no need to use\nEndpoints Frameworks for API management.\n\nWhat's next\n-----------\n\n- For information on adding API management:\n\n - [Java: Adding API management](/endpoints/docs/frameworks/java/adding-api-management)\n - [Python: Adding API management](/endpoints/docs/frameworks/python/adding-api-management)\n- For information on removing API management:\n\n - [Java: Removing API management](/endpoints/docs/frameworks/java/remove-api-management)\n - [Python: Removing API management](/endpoints/docs/frameworks/python/remove-api-management)"]]