As said earlier, this has nothing to do with responses from AppEngine. 
There are not any extra players in front of AppEngine either. This is a 
very basic case, a client making a request to AppEngine running Java 8 
application.

[Client] ->  [Compressed request] -> [Google AppEngine  ***** -> [ 
AppEngine Java 8 Application ]]

I am really looking for the information or documentation about what happens 
in AppEngine request processing (***) before the request reaches the Java 
application running in the AppEngine. 
The request is normally uncompressed automatically. Sometimes it is not and 
I am looking for the root cause of what causes it NOT to be un-compressed.

  


On Wednesday, 19 January 2022 at 18:25:55 UTC+2 [email protected] wrote:

> Hmmm... Judging by this document 
> <https://cloud.google.com/appengine/docs/standard/go/reference/request-response-headers#headers_added>
>  it 
> seems that occasionally compression is expected. It states that "depending 
> on the request headers and response *Content-Type*, the server may 
> automatically compress the response body". Doesn't specify which, so I 
> understand that App Engine Java may respond as needed unless you specify a 
> response Content-Type header.
>
> Though this is from your client to GAE, I don't see why this couldn't 
> occur in the opposite direction. 
>
> What are you using as frontend? Is there a reason you're handling 
> de-compression there?
> On Tuesday, January 18, 2022 at 3:22:01 PM UTC+1 
> [email protected] wrote:
>
>> Just the opposite. All of the requests we are sending to App Engine are 
>> compressed. Normal case is that our App Engine Java app will receive them 
>> as being uncompressed. But occasionally App Engine Java app will receive 
>> them as still being uncompressed.
>> On 18.1.2022 15.05, 'Felipe Bergallo Corral' via Google App Engine wrote:
>>
>> So, just to get this straight because I can be a little slow on the 
>> uptake sometimes:
>> All of the requests you are sending to App Engine are uncompressed, but 
>> occassionally App Engine will receive them as being compressed, is that 
>> correct?
>>
>> On Wednesday, January 12, 2022 at 3:36:26 PM UTC+1 
>> [email protected] wrote:
>>
>>> Sorry not to be clear enough. I am talking about inbound traffic here, 
>>> so HTTP POST requests to the App Engine. Not HTTP responses from the App 
>>> Engine. 
>>> Our responses from App Engine are zipped just fine by the platform, no 
>>> problems there.
>>>
>>> The case here really is HTTP POSTs to the App Engine when the HTTP 
>>> request POST body is compressed. Normal cases are that App Engine will get 
>>> the request as already uncompressed but sometimes the request is coming as 
>>> is thus still compression in place. I am suspecting that it has something 
>>> to do with the request size. I am not sure though. 
>>>
>>>
>>>  
>>>
>>> On Wednesday, 12 January 2022 at 13:20:22 UTC+2 [email protected] 
>>> wrote:
>>>
>>>> My understanding is that that 32MB constraint is only if the responses 
>>>> are not on Cloud Storage or Legacy Blobstore. If you're requesting 
>>>> gzip-compressed responses, then the responses shouldn't be uncompressed, 
>>>> as 
>>>> far as I understand it - according to this 
>>>> <https://cloud.google.com/appengine/docs/standard/java/how-requests-are-handled#response_compression>,
>>>>  
>>>> if the request doesn't specify compressed responses ( by having the header 
>>>> *Accept-Encoding: 
>>>> gzip*) it should return uncompressed responses. The likely reason for 
>>>> some responses being compressed and others not is due to caching 
>>>> <https://cloud.google.com/appengine/docs/standard/java/how-requests-are-handled#response_caching>
>>>>  
>>>> if you've configured, if you've configured it (though I believe there is a 
>>>> predetermined configuration).
>>>> Though I'm not sure how to answer your third question, would you mind 
>>>> rephrasing it? I'm not sure what you mean 
>>>>
>>>> On Wednesday, January 12, 2022 at 9:38:57 AM UTC+1 
>>>> [email protected] wrote:
>>>>
>>>>> We use App Engine standard with Java 8. We have a client that sends 
>>>>> HTTP POST (post body as JSON) requests as gzip-compressed. In normal 
>>>>> cases, 
>>>>> everything works just fine. The frontend will uncompress the requests and 
>>>>> the App Engine will see the uncompressed request.
>>>>>
>>>>> But with some requests (large ones?) uncompressing is not done by the 
>>>>> frontend. This is seen as the request header *content-encoding=[gzip] 
>>>>> *is still in the request headers and content is binary when the 
>>>>> request arrives in App Engine. Our application is not prepared to 
>>>>> uncompress the request but relies on the frontend to uncompress it. We 
>>>>> couldn't find much information about the rules of uncompressing 
>>>>> requests. The page 
>>>>> https://cloud.google.com/appengine/docs/standard/java/how-requests-are-handled#request_limits
>>>>>  
>>>>> says only that the request limit is 32 megabytes. Our failing requests 
>>>>> are 
>>>>> far below that limit in both compressed and uncompressed.
>>>>>
>>>>>    - Is there a way to find out why some requests are not 
>>>>>    uncompressed?
>>>>>    - If it is the size of the request, can the limit be 
>>>>>    configured/increased?
>>>>>    - Is the best practice that the application must handle compressed 
>>>>>    requests also even frontend is taking care of the majority of the 
>>>>>    compressed requests?
>>>>>    - Is there documentation somewhere telling more about compressed 
>>>>>    request limits/handling in App Engine standard? 
>>>>>
>>>>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Google App Engine" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/google-appengine/nbzRV2WctMY/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-appengine/ee3fd588-dfb1-4935-b33e-a8cfe7e26a2cn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-appengine/ee3fd588-dfb1-4935-b33e-a8cfe7e26a2cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/b67be58a-acbe-4094-b046-4675bc976c66n%40googlegroups.com.

Reply via email to