Difference between Multithread and single thread or event driven model

Multi thread model

  1. Request with listener worker thread | lock application.
  2. Using incoming request model.
  3. Multi threaded server might block the request which might involve multiple events.
  4. Using context switching.
  5. Using multi thread environments where listener and workers threads are used  frequently to take an incoming request lock.

Single thread model

  1. Only one thread, which repeatedly fetches and events.
  2. Using queue and then process it.
  3.  Manually saves state and then goes on to process the next event.
  4. No connection and no context switches.
  5. Using asynchronous I/O facilities (callbacks, not poll, select or O_NONBLOCK) environments.

Related Posts

CRUD system with node.js

Express and Mongoose seeder files to Effortless import and delete bulk data in MongoDB

In this article, we are creating an Express and Mongoose seeder file that can import the JSON file data into the MongoDB database, and on one command…

CRUD system with node.js

The beginners approach to handle requests and responses in node.js application

In this article, we will understand, how we can handle requests and responses in node.js, and we will learn about the req.on() method of node.js. Let’s see…

CRUD system with node.js

Mastering Backend Development: Building a Feature-Rich CRUD System with Node.js, Express, and MongoDB

In this article, we are building a complete CRUD system with node.js, Express, and MongoDB. We are using mongoDBCompass for viewing our Mongo database and Postman to…


The Power of Axios in React 18: How Axios Simplifying HTTP Requests and Data Handling

Axios is a JavaScript library that we use to send HTTP requests from browsers or Node.js. We can handle these requests more conveniently using Axios as compared…

What is Single thread model used in node js and how its eliminates the limitation of multi thread model

Node Js is event driven, handing all the request asynchronously from single thread. Almost no function  in node directly performs I/O, so the process never blocks. So…

What is Multi thread model and what are the limitations ?

In a Multi thread model the server assign incoming requests to a new thread similar as a client server architecture, the user generate a request by interaction…

Leave a Reply

Your email address will not be published. Required fields are marked *