Section 1

Preview this deck

Node.js design flaw

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (6)

Section 1

(6 cards)

Node.js design flaw

Front

Single thread means - 1. Compute heavy code will choke the thread and cause a problem for all clients. 2. Exceptions bubbling up to the core (topmost) Node.js event loop will cause the Node.js instance to terminate, thereby, crashing the program. There are designs to prevent this.

Back

Node.js is meant for

Front

Fast, scalable, network applications

Back

What makes it highly scalable?

Front

Ability to handle a large number of simultaneous connections with high throughput.

Back

Design before Node.js

Front

Each connection (request) spawns a new thread. This takes up system RAM and is therefore limited by system RAM.

Back

Node.js is not meant for

Front

CPU intensive operations.

Back

Node.js design

Front

Operates on a single thread. I/O calls are non-blocking (async) This supports over 1M concurrent connections and over 600k concurrent websocket connections. The concurrent connections are held in an event loop.

Back