-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref: node app using stdlib #287
Conversation
@vorandrew sure, will do! just to clarify, it won't matter how many CPU cores i give to node, right? for example, if i give it 4 CPUs, it will still use 1 because it's single-threaded? so again, it wouldn't be fair to compare, i guess. would it make more sense to create 2 replicas of each app and give each 1 CPU instead so we still get 2 CPU per application? |
Node can use multiple cores for specific workloads (not about clustered stuffs). |
@agravelot yes i saw it in documentation |
Network I/O operations on node.js runs on the main thread. Yes, node.js spawns four threads in addition to the main thread but none of them are used for network I/O such as database operations |
It's not CPU cores you are giving... it's CPU limits. Go concurrency is limited by number of physical cores on machine or GOMAXPROCS Here is good read https://www.ardanlabs.com/blog/2024/02/kubernetes-cpu-limits-go.html PS: We are having this conversation in the wrong pull request thread |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vorandrew Thanks! I meant limit.
@@ -11,7 +11,6 @@ | |||
"license": "ISC", | |||
"description": "", | |||
"dependencies": { | |||
"express": "^5.0.0", | |||
"js-yaml": "^4.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove to
Let's compare apples to apples. NodeJS stdlib implementation vs Golang stdlib