Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

NodeJS is single threaded, Java Servlet is multi-threaded: wrong NodeJS results? #25

Closed

Description

@patoi

In real, nodeJS apps run with cluster. Cluster helps NodeJS to utilize processor cores.
A Java servlet is typically multithreaded. That means, multiple requests to the same servlet will be executed at the same time.

More information: http://nodejs.org/api/cluster.html

I think, node will produce far better results after clustering.

Activity

  1. jameswyse commented on Mar 29, 2013

    @jameswyse

    I thought this too at first but it looks like both the nodejs and express benchmarks do actually use cluster, with a worker for each available core?

  2. patoi commented on Mar 29, 2013

    @patoi
    Author

    I've checked nodejs code. It seems to be fine and cluster works.

    Other option: Ubuntu has an ulimit, default value (ulimit -n -> 1024) is very low, when you do performance test.

  3. added a commit that references this issue on Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions