iTranslated by AI
Lessons Learned from a Failed Load Test on App Engine
Conclusion
When performing load tests on App Engine, make sure to do so against the endpoint issued by App Engine.
Lessons Learned from Failure
The target App Engine has a configuration with Cloud Load Balancer and Cloud CDN placed in front of it.
The target endpoint was a non-caching endpoint, so I simply applied load to the Cloud CDN endpoint without thinking. Initially, there were no problems, but after the number of requests per second exceeded 10, the latency rapidly increased.
1 request/second

5 requests/second

10 requests/second

To isolate the problem, I also applied load to the IP address of the Cloud Load Balancer and the App Engine endpoint. The Cloud Load Balancer showed results similar to Cloud CDN, but the App Engine's latency did not increase. From this, I inferred that the Cloud Load Balancer was the bottleneck.
Looking at the Cloud Load Balancer documentation, I found the following description:
All Google Cloud proxy-based external load balancers automatically inherit DDoS protection from Google Front Ends (GFEs), which are part of Google's production infrastructure.
Here is a description of GFE:
Multitier and multilayer DoS defenses are deployed to significantly reduce the risk of DoS impact to services operating behind GFEs.
In this case, since the load was applied from a single host, it is highly probable that at a certain point, the requests were judged to be illegitimate and throttled.
I then wondered if App Engine has such defensive capabilities and investigated. It seems the policy is either to configure it with App Engine's firewall or to place a Cloud Load Balancer in front, as in the configuration of this article.
It's very reassuring to be able to benefit from GFE's, that is, Google's infrastructure's defense mechanisms by using Cloud Load Balancer!
Discussion