motongxue commented on PR #11023:
URL: https://github.com/apache/apisix/pull/11023#issuecomment-1994204965

   > @motongxue
   > 
   > 1. the CI is failing.
   > 2. I think it's okay to use `client_body_reader` by default as there are 
no negative implications. So just ensure to cache the req_body in a separate 
variable. Later, restore the request body from the variable.
   
   
   
   > @motongxue
   > 
   > 1. the CI is failing.
   > 2. I think it's okay to use `client_body_reader` by default as there are 
no negative implications. So just ensure to cache the req_body in a separate 
variable. Later, restore the request body from the variable.
   
   @shreemaan-abhishek 
   Hello abhishek, the CI has failed because the test cases have not been fixed 
yet.
   
   Using client_body_reader by default is a more efficient method for handling 
large request bodies, as it prevents the entire large request body from being 
loaded into memory all at once. However, if the majority of the request bodies 
are small, frequently using streaming read can lead to unnecessary performance 
overheads, because each read operation requires time and resources, even if the 
data volume is small.
   
   Therefore, a more balanced approach might be to select the appropriate 
reading strategy based on the anticipated size and usage of the request body. 
For example, a threshold could be set: use core.request.get_body() for request 
bodies smaller than this threshold, and use httpc:get_client_body_reader() for 
request bodies larger than the threshold.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to