Node. JS features Single thread

Source: Internet
Author: User

In Java PHP or. NET, a new process is created for each client connection, and each process consumes about 2MV

Memory, that is, theoretically a 8GB memory server can simultaneously connect the maximum number of users to 4000

To allow the Web application to support more users, you need to increase the number of servers and

The cost of hardware for Web applications has certainly risen.

NODE.SJ does not create a new thread for each client connection, but only uses one thread, and when a user connects, it triggers an internal event, through

nonblocking I/O is an asynchronous, event-driven mechanism that allows node. JS programs to be macro-parallel, using node. SJ, a

8GB server that can handle links with more than 40,000 users at the same time, plus the benefits of single threading

There are also operating system security and thread creation, destruction of event overhead,

Re-entry, single-threaded benefits, and the operating system is completely no longer wired to create, destroy the time overhead, in fact, node. JS is suitable for doing some

Io is more of a thing, a 8Gb memory server that can handle more than 40,000 user links at the same time, how can you simultaneously handle

In this way, we can see our request header in the downstream request, and request the type of the document to the specification.

Node. JS features Single thread

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.