Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Anda sedang melihat dokumentasi Apigee dan Apigee hybrid.
Lihat dokumentasi
Apigee Edge.
Sistem backend menjalankan layanan yang diakses oleh proxy API. Dengan kata lain, keduanya adalah
alasan mendasar keberadaan API dan lapisan Proxy Pengelolaan API.
Setiap permintaan API yang dirutekan melalui platform Apigee akan melewati jalur standar sebelum mencapai backend:
Permintaan berasal dari klien yang dapat berupa apa saja, mulai dari browser hingga aplikasi.
Permintaan kemudian diterima oleh gateway Apigee.
Pesan ini diproses dalam gateway. Sebagai bagian dari pemrosesan ini, permintaan akan diteruskan ke sejumlah komponen terdistribusi.
Gateway kemudian merutekan permintaan ke backend yang merespons permintaan.
Respons dari backend kemudian melintasi kembali jalur balik yang sama persis melalui gateway Apigee
kembali ke klien.
Akibatnya, performa permintaan API yang dirutekan melalui Apigee bergantung pada Apigee dan
sistem backend. Dalam antipola ini, kita akan berfokus pada dampak pada permintaan API karena sistem backend yang berperforma buruk.
Antipola
Mari kita pertimbangkan kasus backend yang bermasalah. Berikut adalah kemungkinannya:
Tantangan dalam mengekspos layanan di sistem backend ini melalui API adalah layanan tersebut
dapat diakses oleh sejumlah besar pengguna akhir. Dari perspektif bisnis, ini adalah tantangan yang
diinginkan, tetapi sesuatu yang perlu ditangani.
Sering kali sistem backend tidak siap menghadapi permintaan tambahan pada layanannya dan
akibatnya tidak sesuai ukuran atau tidak disesuaikan untuk respons yang efisien.
Masalah dengan backend "ukuran tidak memadai" adalah jika ada lonjakan permintaan API,
resource seperti CPU, Beban, dan Memori di sistem backend akan terbebani. Hal ini pada akhirnya akan menyebabkan permintaan API gagal.
Backend lambat
Masalah dengan backend yang tidak disetel dengan benar adalah backend tersebut akan sangat lambat merespons
permintaan apa pun yang masuk, sehingga menyebabkan peningkatan latensi, waktu tunggu yang terlalu cepat, dan pengalaman konsumen yang
terancam.
Platform Apigee menawarkan beberapa opsi yang dapat disesuaikan untuk mengakali dan mengelola backend yang lambat. Namun,
opsi ini memiliki batasan.
Dampak
Jika backend berukuran tidak memadai, peningkatan traffic dapat menyebabkan permintaan gagal.
Jika backend lambat, latensi permintaan akan meningkat.
Praktik terbaik
Gunakan caching untuk menyimpan respons guna meningkatkan waktu respons API dan mengurangi beban pada
server backend.
Selesaikan masalah yang mendasarinya di server backend yang lambat.
[[["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\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)"]]