기본적으로 HTTP 스트리밍은 사용 중지되며 HTTP 요청 및 응답 페이로드는 API 프록시 파이프라인에서 처리되기 전에 메모리의 버퍼에 기록됩니다. 스트리밍을 사용 설정하여 이 동작을 변경할 수 있습니다. 스트리밍이 사용 설정되면 클라이언트 앱(응답의 경우) 및 대상 엔드포인트(요청의 경우)가 수정되지 않고 요청 및 응답 페이로드가 스트리밍됩니다.
스트리밍은 언제 사용 설정해야 하나요?
API 프록시가 대규모 요청 및 응답을 처리하는 경우(크기 제한의 경우 아래의 스트리밍에 대해 알아야 할 기타 사항 참조) 스트리밍을 사용 설정할 수 있습니다.
스트리밍에 대해 알아야 할 기타 사항은 무엇인가요?
메시지 페이로드 크기는 30MB로 제한됩니다.
스트리밍되지 않은 요청 및 응답에서 크기를 초과하면 protocol.http.TooBigBody 오류가 발생합니다.
인코딩된 데이터
스트리밍이 사용 설정되면 Apigee는 요청 또는 응답 페이로드를 Apigee 또는 백엔드 대상 서버에 연결하는 클라이언트로 전송하기 전에 인코딩 또는 디코딩하지 않습니다. 자세한 내용은 TargetEndpoint 전송 속성 사양 테이블의 request.streaming.enabled 및 response.streaming.enabled에 대한 행을 참조하세요.
요청 및 응답 스트리밍을 사용 설정하는 방법
요청 스트리밍을 사용 설정하려면 프록시 번들의 ProxyEndpoint 및 TargetEndpoint 정의에 request.streaming.enabled 속성을 추가하고 true로 설정해야 합니다. 마찬가지로 response.streaming.enabled 속성을 설정하여 응답 스트리밍을 사용 설정합니다.
이러한 구성 파일은 프록시의 개발 뷰에 있는 Apigee UI에서 찾을 수 있습니다. 로컬에서 개발하는 경우 이러한 정의 파일은 apiproxy/proxies 및 apiproxy/targets에 있습니다.
이 샘플은 TargetEndpoint 정의에서 요청 및 응답 스트리밍 모두를 사용 설정하는 방법을 보여줍니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-18(UTC)"],[[["\u003cp\u003eThis guide explains how to enable request and response streaming in Apigee and Apigee hybrid to handle large payloads that exceed the default 10 MB buffer limit.\u003c/p\u003e\n"],["\u003cp\u003eEnabling streaming allows unmodified data transfer for requests and responses between the client app and the target endpoint, bypassing the in-memory buffer.\u003c/p\u003e\n"],["\u003cp\u003eStreaming should be enabled when API proxies handle very large requests and responses to avoid \u003ccode\u003eprotocol.http.TooBigBody\u003c/code\u003e errors due to the 10 MB buffer size limit.\u003c/p\u003e\n"],["\u003cp\u003eWhile streaming can handle large payloads, Apigee recommends not exceeding 10 MB and using signed URLs for larger files to avoid potential performance issues.\u003c/p\u003e\n"],["\u003cp\u003eTo enable streaming, set \u003ccode\u003erequest.streaming.enabled\u003c/code\u003e and \u003ccode\u003eresponse.streaming.enabled\u003c/code\u003e to \u003ccode\u003etrue\u003c/code\u003e within the \u003ccode\u003eProxyEndpoint\u003c/code\u003e and \u003ccode\u003eTargetEndpoint\u003c/code\u003e definitions in your proxy bundle.\u003c/p\u003e\n"]]],[],null,["# Streaming requests and responses\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\nWhat you'll learn in this topic\n-------------------------------\n\nAfter reading this topic you will know the following:\n\n- What request and response streaming on Apigee is\n- When to use request and response streaming\n- How to enable request and response streaming\n\n| **Sample:** If you'd like to jump directly to a code sample, see [Related code samples](#RelatedCodeSamples) for details.\n\nWhat is request and response streaming?\n---------------------------------------\n\nBy default, HTTP streaming is disabled and HTTP request and response payloads are written to a\nbuffer in memory before they are processed by the API proxy pipeline. You can change this\nbehavior by enabling streaming. With streaming enabled, request and response payloads are\nstreamed without modification to the client app (for responses) and the target endpoint (for\nrequests).\n\nWhen should I enable streaming?\n-------------------------------\n\nIf your API proxy handles very large requests and/or responses (for size limits, see\n[What else should I know about streaming](#whatelseshouldiknowaboutstreaming)), you\nmay want to enable streaming.\n| **Note:** If your API requests or returns a large amount of data, you may see this HTTP error: \n|\n| ```text\n| {\"fault\":\"{\\\"detail\\\":{\\\"errorcode\\\":\\\"protocol.http.TooBigBody\\\"},\\\"faultstring\\\":\\\"Body buffer overflow\\\"}\"}\n| ```\n|\n| If you see this error, we recommend that you enable streaming. If you continue to see the\n| error after you enable streaming, consider removing any policies that require access to the\n| request or response payload. For more information, see\n| [Message payload size](/apigee/docs/api-platform/fundamentals/best-practices-api-proxy-design-and-development#size).\n\nWhat else should I know about streaming?\n----------------------------------------\n\nMessage payload size is restricted to 30 MB.\nIn non-streamed requests and responses, exceeding\nthat size results in a `protocol.http.TooBigBody` error.\n| **Caution:** While streaming can help you work around the\n| 30 MB request/response size limit enforced by the product,\n| Apigee doesn't recommend exceeding that limit when streaming and can't support issues that\n| arise as a result of exceeding that limit, such as performance issues, timeouts, and so on.\n|\n| For payloads larger than 30 MB, Apigee recommends using a\n| signed URLs pattern within an Apigee JavaCallout, illustrated by the\n| [Edge Callout: Signed URL Generator](https://github.com/DinoChiesa/ApigeeEdge-Java-GoogleUrlSigner) example on GitHub.\n| **Note:** With streaming enabled, Apigee strongly recommends you do **not** attach policies that require access to the request or response payload. Those types of policies will either cause errors or trigger buffering in the API proxy, which limits payload size to the numbers listed above and defeats the purpose of enabling streaming to handle large payloads. You can attach policies that do not interact with the request/response body, such as authentication or message logging policies.\n\n### Encoded data\n\nWhen streaming is enabled, Apigee does *not* encode or decode request or response\npayloads before sending them to the client connecting to Apigee or a backend target server. See\nthe rows for `request.streaming.enabled` and `response.streaming.enabled`\nin the\n[TargetEndpoint Transport Property Specification](/apigee/docs/api-platform/reference/endpoint-properties-reference#targetendpointtransportpropertyspecification) table for more information.\n\nHow to enable request and response streaming\n--------------------------------------------\n\nTo enable request streaming you need to add the `request.streaming.enabled`\nproperty to the ProxyEndpoint and TargetEndpoint definitions in the proxy bundle and set it to\n`true`. Similarly, set the\n`response.streaming.enabled` property to enable response streaming.\n\nYou can locate these configuration files in the Apigee UI in the Develop view for your\nproxy. If you are developing locally, these definition files are in `apiproxy/proxies`\nand `apiproxy/targets`.\n\nThis sample shows how to enable both request and response streaming in the TargetEndpoint\ndefinition. \n\n```text\n\u003cTargetEndpoint name=\"default\"\u003e\n \u003cHTTPTargetConnection\u003e\n \u003cURL\u003ehttp://mocktarget.apigee.net\u003c/URL\u003e\n \u003cProperties\u003e\n \u003cProperty name=\"response.streaming.enabled\"\u003etrue\u003c/Property\u003e\n \u003cProperty name=\"request.streaming.enabled\"\u003etrue\u003c/Property\u003e\n \u003cProperty name=\"supports.http10\"\u003etrue\u003c/Property\u003e\n \u003cProperty name=\"request.retain.headers\"\u003eUser-Agent,Referer,Accept-Language\u003c/Property\u003e\n \u003cProperty name=\"retain.queryparams\"\u003eapikey\u003c/Property\u003e\n \u003c/Properties\u003e\n \u003c/HTTPTargetConnection\u003e\n\u003c/TargetEndpoint\u003e\n```\n\nThis example shows how to enable response and request streaming in the ProxyEndpoint\ndefinition: \n\n```text\n\u003cProxyEndpoint name=\"default\"\u003e\n \u003cHTTPProxyConnection\u003e\n \u003cBasePath\u003e/v1/weather\u003c/BasePath\u003e\n \u003cProperties\u003e\n \u003cProperty name=\"allow.http10\"\u003etrue\u003c/Property\u003e\n \u003cProperty name=\"response.streaming.enabled\"\u003etrue\u003c/Property\u003e\n \u003cProperty name=\"request.streaming.enabled\"\u003etrue\u003c/Property\u003e\n \u003c/Properties\u003e\n \u003c/HTTPProxyConnection\u003e\n\u003c/ProxyEndpoint\u003e\n```\n\nFor more information about configuring endpoint definitions, see [Endpoint properties reference](/apigee/docs/api-platform/reference/endpoint-properties-reference).\n\nRelated code\nsamples\n--------------------\n\nAPI proxy samples on GitHub are easy to download and use.\n\nSample proxies that feature streaming include:\n\n- [streaming](https://github.com/apigee/api-platform-samples/tree/master/sample-proxies/streaming) - Demonstrates an API proxy configured for HTTP streaming.\n- [Edge Callout: Signed URL Generator](https://github.com/DinoChiesa/ApigeeEdge-Java-GoogleUrlSigner) - Illustrates the best practice of generating a signed URL to access large files instead of trying to stream them in a request/response."]]