How many concurrent requests can a single instance of a Google App Engine Python application process?

How many threads / requests can a single Python instance for Google App Engine process in parallel? I am using python27 runtime and the threadafe option is enabled (true). Are there any restrictions or conditions that may limit parallelism?

To clarify: this is not about the Java or Python GAE SDK.

+6
source share
2 answers

The amount of parallelism you get is highly dependent on the workload of your application. If your requests are CPU related, you will only submit one request at a time. On the other hand, if your requests are RPC related, you can potentially serve 10 concurrent requests. However, there are two relative limits:
1. The size of the copy. The default instance of 600 MHz can only handle so many simultaneous requests before exceeding the CPU limit, overloading your instance and significantly increasing latency.
2. There is a hard limit for concurrent requests. It depends on the implementation and can be changed, but at the moment on python27 it is 8.

+8
source

Although I get millions of views / day, my QPS is about 2 and my requests are under the second

Therefore, do not expect too much parallelism of only 2-3 at least

(Unable to determine the QPS value for your use case, this is my use case)

+1
source

Source: https://habr.com/ru/post/908455/


All Articles