W3
Teacher
Explore
Browse by field
Artificial Intelligence
Accounting & Finance
Information Technology
Show all fields
Interview Q&A
All Interview Questions
Beginner
Intermediate
Advanced
Practice
MCQs
Quizzes
Mock Interviews
About
Light
Dark
Auto
Sign in
Get Started
Search interview questions
Search
27 questions for “Clustering & Worker Threads”
Found in 1 field. Select a question to see its full answer.
Matching topics
Node.js
Clustering
&
Worker
Threads
15
Information Technology
27 questions in 1 technology
#
Question
Technology
Topic
Level
1
How do you use SharedArrayBuffer to share memory directly between Node.js
worker
threads
, and what are the safety considerations?
Node.js › Clustering & Worker Threads
Node.js
Clustering
&
Worker
Threads
Advanced
2
What is the os.cpus() function used for when setting up
clustering
in a Node.js application?
Node.js › Clustering & Worker Threads
Node.js
Clustering
&
Worker
Threads
Beginner
3
How do you pass data between the main thread and a
worker
thread using postMessage(), and what are the limits on what can be sent?
Node.js › Clustering & Worker Threads
Node.js
Clustering
&
Worker
Threads
Intermediate
4
What is the difference between the number of CPU cores and the optimal number of cluster
worker
s for a given Node.js application?
Node.js › Clustering & Worker Threads
Node.js
Clustering
&
Worker
Threads
Intermediate
5
What is the difference between spawning a
Worker
Thread and spawning a Child Process for running a CPU-intensive JavaScript function?
Node.js › Clustering & Worker Threads
Node.js
Clustering
&
Worker
Threads
Intermediate
6
How do you gracefully terminate a
worker
thread, and what's the difference between
worker
.terminate() and letting it exit naturally?
Node.js › Clustering & Worker Threads
Node.js
Clustering
&
Worker
Threads
Intermediate
7
What is a
worker
thread pool, and why would you build one rather than creating a new
Worker
for every task?
Node.js › Clustering & Worker Threads
Node.js
Clustering
&
Worker
Threads
Advanced
8
How do you handle an uncaught exception inside a specific cluster
worker
without taking down the entire application?
Node.js › Clustering & Worker Threads
Node.js
Clustering
&
Worker
Threads
Advanced
9
What is the
Worker
Data option when creating a
Worker
, and how does it differ from communicating via postMessage() after creation?
Node.js › Clustering & Worker Threads
Node.js
Clustering
&
Worker
Threads
Advanced
10
What is the difference in behavior between the 'primary' and '
worker
' role in Node's cluster module regarding which code paths execute?
Node.js › Clustering & Worker Threads
Node.js
Clustering
&
Worker
Threads
Advanced
Show all 27 questions in Information Technology