Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Stai visualizzando la documentazione di Apigee e Apigee hybrid.
Visualizza la documentazione di
Apigee Edge.
I sistemi di backend eseguono i servizi a cui accedono i proxy API. In altre parole, sono il motivo fondamentale dell'esistenza stessa delle API e del livello proxy di API Management.
Qualsiasi richiesta API instradata tramite la piattaforma Apigee attraversa un percorso tipico prima di raggiungere il backend:
La richiesta proviene da un client, che può essere un browser o un'app.
La richiesta viene quindi ricevuta dal gateway Apigee.
Viene elaborato all'interno del gateway. Nell'ambito di questa elaborazione, la richiesta viene passata a un
numero di componenti distribuiti.
Il gateway instrada quindi la richiesta al backend che risponde.
La risposta del backend ripercorre quindi il percorso inverso esatto tramite il gateway Apigee
e torna al client.
In effetti, le prestazioni delle richieste API inoltrate tramite Apigee dipendono sia da Apigee sia dai sistemi di backend. In questo antipattern, ci concentreremo sull'impatto sulle richieste API a causa del cattivo funzionamento dei sistemi di backend.
Antipattern
Prendiamo in considerazione il caso di un backend problematico. Ecco le possibilità:
La difficoltà di esporre i servizi su questi sistemi di backend tramite API è che sono accessibili a un numero elevato di utenti finali. Dal punto di vista aziendale, si tratta di una sfida auspicabile, ma che deve essere affrontata.
Spesso i sistemi di backend non sono preparati a questa domanda aggiuntiva sui loro servizi e di conseguenza sono sottodimensionati o non sono ottimizzati per una risposta efficiente.
Il problema di un backend "di dimensioni non adeguate" è che, in caso di picco delle richieste API, sollecita le risorse come CPU, carico e memoria sui sistemi di backend. Ciò causerebbe
infine il fallimento delle richieste API.
Backend lento
Il problema di un backend non ottimizzato è che risponde molto lentamente a qualsiasi richiesta in arrivo, con conseguente aumento delle latenze, timeout prematuri e compromissione dell'esperienza del cliente.
La piattaforma Apigee offre alcune opzioni regolabili per aggirare e gestire il backend lento. Tuttavia, queste opzioni hanno delle limitazioni.
Impatto
Nel caso di un backend di dimensioni non adeguate, l'aumento del traffico potrebbe comportare richieste non andate a buon fine.
In caso di backend lento, la latenza delle richieste aumenterà.
Best practice
Utilizza la memorizzazione nella cache per memorizzare le risposte al fine di migliorare i tempi di risposta dell'API e ridurre il carico sul
server di backend.
Risolvi il problema di fondo nei server di backend lenti.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[[["\u003cp\u003eThis document focuses on how backend system performance impacts API requests routed through Apigee.\u003c/p\u003e\n"],["\u003cp\u003eAPI requests travel from the client, through the Apigee gateway, to the backend system, and then back, making overall performance dependent on both Apigee and the backend.\u003c/p\u003e\n"],["\u003cp\u003eInadequately sized backends can cause API requests to fail due to resource stress during traffic spikes, such as CPU, memory, and load limitations.\u003c/p\u003e\n"],["\u003cp\u003eSlow backends result in increased latency, premature timeouts, and a poor customer experience, even with Apigee's tunable options.\u003c/p\u003e\n"],["\u003cp\u003eCaching and resolving underlying issues in backend servers are best practices to improve API response times and reduce backend load.\u003c/p\u003e\n"]]],[],null,["# Antipattern: Allow a slow backend\n\n*You're viewing **Apigee** and **Apigee hybrid** documentation.\nView [Apigee Edge](https://docs.apigee.com/api-platform/antipatterns/slow-backend) documentation.*\n\nBackend systems run the services that API proxies access. In other words, they are the\nfundamental reason for the very existence of APIs and the API Management Proxy layer.\n\nAny API request that is routed via the Apigee platform traverses a typical path before it hits the backend:\n\n- The request originates from a client which could be anything from a browser to an app.\n- The request is then received by the Apigee gateway.\n- It is processed within the gateway. As a part of this processing, the request passes onto a number of distributed components.\n- The gateway then routes the request to the backend that responds to the request.\n- The response from the backend then traverses back the exact reverse path via the Apigee gateway back to the client.\n\nIn effect, the performance of API requests routed via Apigee is dependent on both Apigee and the\nbackend systems. In this antipattern, we will focus on the impact on API requests due to badly\nperforming backend systems.\n\nAntipattern\n-----------\n\nLet us consider the case of a problematic backend. These are the possibilities:\n- [Inadequately sized backend](#slow)\n- [Slow backend](#inad)\n\n### Inadequately sized backend\n\n- The challenge in exposing the services on these backend systems via APIs is that they are accessible to a large number of end users. From a business perspective, this is a desirable challenge, but something that needs to be dealt with.\n- Many times backend systems are not prepared for this extra demand on their services and are consequently under sized or are not tuned for efficient response.\n- The problem with an \"inadequately sized\" backend is that if there is a spike in API requests, then it will stress the resources like CPU, Load and Memory on the backend systems. This would eventually cause API requests to fail.\n\n### Slow backend\n\n- The problem with an improperly tuned backend is that it would be very slow to respond to any requests coming to it, thereby leading to increased latencies, premature timeouts and a compromised customer experience.\n- The Apigee platform offers a few tunable options to circumvent and manage the slow backend. But these options have limitations.\n\nImpact\n------\n\n - In the case of an inadequately sized backend, increase in traffic could lead to failed requests.\n - In the case of a slow backend, the latency of requests will increase.\n\nBest practice\n-------------\n\n - Use caching to store the responses to improve the API response times and reduce the load on the backend server.\n - Resolve the underlying problem in the slow backend servers.\n\nFurther reading\n---------------\n\n - [Apigee caching internals](/apigee/docs/api-platform/cache/cache-internals)"]]