Hello,
appLatencySeconds and latencySeconds are equal to nginx variables. With, appLatencySeconds == $upstream_response_time [1] and latencySeconds == $request_time[2].
For clarity I'll include the definitions:
appLatencySeconds :$upstream_response_time: keeps time spent on receiving the response from the upstream server.
latencySeconds: $request_time: request processing time elapsed between the first bytes were read from the client and the log write after the last bytes were sent to the client.
I'll focus on how to debug this issue since it is expressed in the title. There is a guide on `Optimizing Application Latency with Load Balancing` [3], where it is expressed how to measure latency in different scenarios.
However, it seems to me that the issue could be due to a bad network throughput of some of the clients of your application, I would check the user-agent, payload size of such request that take long to be passed to the App Engine app to determine if that could be the issue.