简体   繁体   中英

Python multithreading on EC2?

I have a Python app that creates threads via a for loop and I have a few questions regarding multithreading on EC2:

  1. I would like to know if there is a limit on the number of concurrent threads on an EC2 instance?
  2. What would happen if the maximum number of threads is reached or exceded? Is there a way to limit the number of concurrent threads in my python app via a setting like MAX_THREADS or something like that?
  3. Does autoscaling allow unlimited threads on EC2?

Thanks in advance.

Note: The instance type is a General purpose 'm1.large' 64-bit

You should consider an EC2 instance as you would any other virtual machine- Multi-threaded processes are limited by the number of CPUs that the operating system can use.

Autoscaling allows you to spin up more instances on AWS based on certain parameters. It is not intended to increase the capacity of an existing one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM