DEV Community

Muhammad Hasnain
Muhammad Hasnain

Posted on

NodeJS Worker Thread on EC2 Instance with single thread?

Hi!

I'm not a 100% familiar with NodeJS workers and clusters. I know that we can make use of multiple threads which is amazing to say the least.

I'm working on a small personal project that I've hosted on an free EC2 instance and I see that there is one CPU and one thread available. Is there then any benefit of using worker threads?

Also, why does the NodeJS Cluster documentation fork a cluster for a single CPU instead of a thread?

Thanks!

Oldest comments (2)

Collapse
 
heptalophos profile image
Chris

what happened to the React post?

Collapse
 
hasnaindev profile image
Muhammad Hasnain • Edited

Hello! I had to remove it because I didn't made my intent clear in that post. Readers thought I was criticizing React. Thanks for inquiring though!