Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8350729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:24:39+00:00 2026-06-09T08:24:39+00:00

If I set threadsafe: true in my app.yaml file, what are the rules that

  • 0

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 new thread will be created on an existing instance?

If I have an app which performs something computationally intensive on each request, does multi-threading buy me anything? In other words, is an instance a multi-core instance or a single core?

Or, are new threads only spun up when existing threads are waiting on IO?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T08:24:40+00:00Added an answer on June 9, 2026 at 8:24 am

    The following set of rules are currently used to determine if a given instance can accept a new request:

    if processing more than N concurrent requests (today N=10): false
    elif exceeding the soft memory limit: false
    elif exceeding the instance class CPU limit: false
    elif warming up: false
    else true
    

    The following of total CPU/core limits currently apply to each instance classes:

    CLASS 1: 600MHz 1 core
    CLASS 2: 1.2GHz 1 core
    CLASS 4: 2.4GHz 1 core
    CLASS 8: 4.8GHz 2 core
    

    So only a B8 instance can process up to 2 fully CPU bound requests in parallel.

    Setting threadsafe: true (Python) or <threadsafe>true</threadsafe> (Java) for instances classes < 8 would not allow more than one CPU bound requests to be processed in parallel on a single instance.

    If you are not fully CPU bound or doing I/O, the Python and Java runtime will spawn new threads for handling new request up to 10 concurrent requests with threadsafe: true

    Also note that even though the Go runtime is single threaded, it does support concurrent requests:
    It will spawn 1 goroutine per requests and yield control between goroutines while they are performing I/O.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Official appengine documentation says that if we set threadsafe property to true in app.yaml
I know that the builtin set type in python is not generally threadsafe, but
public class ThreadSafe implements ITaskCompletionListener { private final Set<String> taskIds = new HashSet<String>(); private
I'm using the Python2.7 runtime with threadsafe set to false in the manifest. Am
Set<Type> union = new HashSet<Type>(s1); union.addAll(s2); AND Set <Type> union = new HashSet<Type>(); union.addAll(s1);
Note that singleton used in slightly uncommon sense - object visible as single instance
I have an app that is using devise for authentication. Rails 3 on ruby
I need to terminate a frozen thread, I set IsBackground as true but it
I know that the linkedlist is not threadsafe and at work I ve been
I am looking at improving a package that I believe not to be threadsafe

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.