Comparer Extensible Service Proxy et Cloud Endpoints Frameworks
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Cette page explique les différences entre les frameworks Endpoints pour l'environnement standard App Engine et l'Extensible Service Proxy (ESP), qui est utilisé dans Cloud Endpoints pour les API utilisant OpenAPI ou gRPC.
Pour en savoir plus sur les options Endpoints, consultez la section Choisir une option Endpoints.
Aperçu
Cloud Endpoints est un système de gestion d'API qui vous aide à sécuriser, surveiller, analyser et définir des quotas sur les API en utilisant la même infrastructure que celle utilisée par Google pour ses propres API. Les fonctions de gestion d'API incluent l'authentification, les clés API, la surveillance, la journalisation et le traçage, indépendamment de la technologie utilisée pour mettre en œuvre l'API. La fonctionnalité de gestion d'API est fournie par ESP (Extensible Service Proxy) ou par Endpoints Frameworks.
Extensible Service Proxy
Dans Endpoints pour OpenAPI et gRPC, les requêtes API sont relayées via Extensible Service Proxy, qui valide les clés et les jetons d'authentification, et envoie des signaux (métriques et journaux) à l'aide de l'API Service Control. La séparation fournie par ESP signifie que vous pouvez écrire le code backend REST ou gRPC dans n'importe quel langage, et que vous pouvez utiliser gRPC ou tout framework compatible avec la description d'API à l'aide d'OpenAPI.
API utilisant OpenAPI : le backend de l'API peut s'exécuter dans l'environnement flexible App Engine, Google Kubernetes Engine (GKE), Compute Engine, Kubernetes ou des déploiements sur site
API utilisant gRPC : le backend de l'API peut s'exécuter sur GKE, Compute Engine, Kubernetes ou des déploiements sur site.
Une requête est envoyée sur le chemin d'accès suivant :
Une requête à votre code est reçue et est envoyée à ESP.
ESP envoie une requête de vérification à Service Control.
Si vous avez configuré votre API pour exiger une clé API ou une authentification, Service Control vérifie si la requête est autorisée et envoie une réponse à ESP.
Si la requête n'est pas autorisée, ESP la rejette. Si la requête est autorisée, elle est transmise à votre code backend. Dans les deux cas, ESP consigne des informations au sujet de la requête.
Pour les backends d'API exécutés dans l'environnement standard App Engine, Endpoints Frameworks est disponible pour aider les développeurs à commencer rapidement à diffuser une API. Endpoints Frameworks est un framework Web qui remplace Python Flask ou Java Jersey.
Endpoints Frameworks s'intègre à l'API Service Control, ce qui signifie qu'un backend qui utilise Endpoints Frameworks n'a pas besoin de s'exécuter derrière Extensible Service Proxy.
Si vous avez activé la gestion d'API, une requête parcourt le chemin suivant :
Une requête à votre code est reçue et est envoyée au module Endpoints Management au sein d'Endpoints Framework.
Le module Endpoints Management envoie une requête de vérification à Service Control.
Si vous avez configuré votre API de sorte qu'elle exige une clé API ou une authentification, Service Control vérifie si la requête est autorisée et envoie une réponse au module Endpoints Management.
Si la requête n'est pas autorisée, le module Endpoints Management la rejette. Si la requête est autorisée, elle est transmise à Endpoints Frameworks. Dans les deux cas, le module Endpoints Management consigne des informations au sujet de la requête.
Endpoints Frameworks achemine la requête vers votre code backend.
Vous pouvez utiliser Endpoints Frameworks avec ou sans fonctionnalité de gestion des API. L'utilisation d'Endpoints Frameworks sans fonctionnalité de gestion d'API est offerte gratuitement. La fonctionnalité de gestion des API est facturée conformément à la page de tarification Endpoints.
Endpoints Frameworks n'est compatible qu'avec les services exécutés dans l'environnement standard App Engine. Sur Compute Engine, sur GKE, dans l'environnement flexible App Engine ou dans d'autres environnements, vos services doivent s'exécuter derrière Extensible Service Proxy.
Si le service s'exécute derrière ESP, le code backend peut être écrit dans n'importe quel langage et framework, tels que Python Flask, Java Jersey et Node.js Express. Dans ces environnements, il n'est pas nécessaire d'utiliser Endpoints Frameworks pour la gestion d'API.
Étapes suivantes
Pour plus d'informations sur l'ajout de la gestion d'API :
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 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)"]]