ipegasus
ipegasus

Reputation: 15242

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

Upvotes: 2

Views: 719

Answers (1)

Adi Dembak
Adi Dembak

Reputation: 2536

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.

Upvotes: 2

Related Questions