When does the App Engine scheduler use a new thread vs. a new instance?

前端 未结 3 1605
野性不改
野性不改 2020-12-04 21:20

If I set threadsafe: true in my app.yaml file, what are the rules that govern when a new instance will be created to serve a request, versus when a

3条回答
  •  既然无缘
    2020-12-04 22:05

    Read the next messages from link which was suggested by Kyle Finley

    Jeff Schnitzer: Is there still a hard limit of 10 threads?

    Yes, but probably not for the reason you expect. The primary issue we run into is memory management. If we raised the default to 100, many apps would then see out-of-memory deaths (more than they do now), and these deaths show up differently for python/java/go. The right path forward is more intelligent algorithms wrt memory, providing configurability, and so on. This is an example of the kinds of projects we work on for the scheduler, but as with any team we have to prioritize our projects. I'd recommend filing this (or any other desired scheduler enhancements) on the public issue tracker so they can get feedback/data/votes.

提交回复
热议问题