Can NODE.JS Server Handle 1M Concurrent Requests? | Real-World App Benchmarking on Dedicated VPS

  Рет қаралды 52,947

CoderOne

CoderOne

Күн бұрын

Ever wanted to push the limits of your Node.js Server and see what can really Node.js Handle? In this video we will push the limits of a Node.js/Express.js Server that is built with Login/Register and Authentication and some interesting calculation functions to see how can it operate when it comes to thousands of concurrent connections and millions of requests. We will stress test using 1K, 10K, and 1M concurrent connections connected to the server at the same time and sending requests to the server from a simple HTTP GET Homepage to random login/Register API stress test throughout the HTTP Protocol and see if really Node.js can handle 1M requests/s?
⭐ Timestamps ⭐
00:00 How we'll do Nodejs Benchmarking?
02:19 Briefly understanding how Node.js Event loop works
08:36 Getting Started with Benchmarking
12:37 Using autocannon for HTTP Server benchmarking
20:45 Can Node.js Actually handle 10K Requests on our local machine?
23:46 What about 1M concurrent requests?
25:39 Creating Custom Benchmarks scripts programmatically using autocannon
34:57 Benchmarking Register-Login API with custom script 10K User registration
46:24 Running Node.js Server Benchmarks on Dedicated VPS Server
49:22 Running basic GET homepage benchmark for 1k concurrency
50:59 Benchmarking 10K Users for 1000 Requests for user
53:20 Is 1M Concurrent requests possible on a 2-Core CPU and 2GB RAM Server?
54:26 Benchmarking Register-Login on the Dedicated VPS Server, is it possible for 1K?
58:41 Why Nodejs is bad for processor-heavy tasks?
⭐Grab the full source code of the App with Benchmarks on Github:
github.com/ipenywis/node-expr...
🧭 Watch Tutorial on Designing the website on Figma
• I Design a onecolor We...
🧭 Watch Create a Modern React Login/Register Form with smooth Animations
• Create a Modern React ...
🧭 Debug React Apps Like a Pro | Master Debugging from Zero to Hero with Chrome DevTools
• Debug React Apps Like ...
🧭 Master React Like Pro w/ Redux, Typescript, and GraphQL | Beginner to Advanced in React
• Master React Like Pro ...
🧭 Learn Redux For Beginners | React Redux from Zero To Hero build a real-world app
• Debug React Apps Like ...
🧭 Build Login/Register API Server w/ Authentication | JWT Express AUTH using Passport.JS and Sequelize
• Build Login/Register A...
🧭 Introduction to GraphQL with Apollo and React
• Introduction to GraphQ...
🐦 Follow me on Twitter: / ipenywis
💻 Github Profile: github.com/ipenywis
💡 My Blog: ipenywis.com
Made with 💗 by Coderone

Пікірлер: 47
@williamabboud
@williamabboud 2 жыл бұрын
That was quite interesting and very insightful. Thank you !
@lunix8028
@lunix8028 6 ай бұрын
Loved the content man, thank you very much!
@mdshadab3470
@mdshadab3470 Жыл бұрын
Bro you just rock. This video worth watching really 🔥🔥🔥
@raymondmichael4987
@raymondmichael4987 Жыл бұрын
I'll rewatch this; Thanks brother
@neelthakkar4492
@neelthakkar4492 2 жыл бұрын
Seriously underrated channel. But don't worry you are going to get 100k+ in nearby future.
@namaefumei
@namaefumei 3 ай бұрын
Learned a lot. Thanks!
@LukasSkywalker_
@LukasSkywalker_ 5 ай бұрын
If there is a database, it will almost always be the bottleneck. Caching, indexing, etc helps. Not the porpouse of this video, but running multi nodejs instances with pm2 or k8s is a good way to scale also. I'm a software engineer for a bank. We have a lot of unique and concurrent users (I'm not allowed to say the exact number but it is way above the tests of this video) and the main service is powered by node. It is handling well at most cases, with the things I mentioned previously. It is not the most performant language/VM but is good enough.
@kevinjimenez6143
@kevinjimenez6143 4 күн бұрын
You use Typescript?
@oussamasethoum2755
@oussamasethoum2755 2 жыл бұрын
Good information, Thank you.
@akeemovic
@akeemovic 2 жыл бұрын
Great job! 👍 Please make a NodeJS scaling tutorial.
@mahendranath2504
@mahendranath2504 2 жыл бұрын
Thank you So much 👍🏼🙏🎉❤️
@vishutiwari99
@vishutiwari99 2 жыл бұрын
One of the most underrated KZbin channel .
@kienang7850
@kienang7850 2 жыл бұрын
Hi, if we use nodejs cluster, can it do better?
@oktachandra1851
@oktachandra1851 6 ай бұрын
have you tried nodejs cluster combine with worker-thread to load heavy concurrent requests ?
@ziyaasgarov6973
@ziyaasgarov6973 Ай бұрын
Thanks for the video. Could you please suggest which programming language/framework would be the best for handling heavy tasks on the backend side?
@arpitabali3621
@arpitabali3621 Жыл бұрын
which version of node have you used in this video??
@longnguyenthanh6876
@longnguyenthanh6876 2 жыл бұрын
thanks
@dheerajkukreja4269
@dheerajkukreja4269 Жыл бұрын
How are you printing the response status and latency in terminal....please reply
@mdsamir8495
@mdsamir8495 2 жыл бұрын
Awesome
@kaioh1384
@kaioh1384 2 жыл бұрын
amazing
@tigertiger9911
@tigertiger9911 2 жыл бұрын
How to scale node js app
@mohamedyoussef8835
@mohamedyoussef8835 Жыл бұрын
Awesome video ++++++++++ 🙂
@gasacchi6734
@gasacchi6734 2 жыл бұрын
Maybe you can run the benchmark on your local machine, so VPS doesn't allocate ram for running benchmark, btw nice video ❤️
@Cdswjp
@Cdswjp 2 жыл бұрын
Would that be a bad idea resulting in inaccurate test results because the local environment does use the same hardware configurations as the VPS…. Or does it…? 🤔
@teetanrobotics5363
@teetanrobotics5363 2 жыл бұрын
Could you please make 2 playlists for: 1) nodejs tutorials 2) react/nextjs tutorials ? Amazing content. thank you
@tyongalves7129
@tyongalves7129 5 ай бұрын
bruv thanks so much
@adityasethi9794
@adityasethi9794 4 ай бұрын
nodejs is not single threaded. Hate it when people make such vids pretending they know it fully. JS is single threaded. Nodejs is not a language, it is a runtime. it makes use of threads too.
@kanehooper00
@kanehooper00 2 ай бұрын
Yes totally agreed. The tool being shown at the beginning is for browser runtimes and not Node.js runtime. The benchmarking is fine but the fundamental understanding of Node is not quite right.
@JohnDoe-ji1zv
@JohnDoe-ji1zv 2 жыл бұрын
When you ran benchmark on your server and local machine you were actually utilising only 1 core of the CPU. Would be much better if you scale node at least with pm2 on local machine and VPS as well, then results would be slightly better.
@Cdswjp
@Cdswjp 2 жыл бұрын
Good catch. How were u able to notice that?
@JohnDoe-ji1zv
@JohnDoe-ji1zv 2 жыл бұрын
@@Cdswjp by default node is running on only 1 core, so to scale node you need to create an instance per core
@soniablanche5672
@soniablanche5672 Жыл бұрын
you can also use cluster to have multiple express apps running on a different core
@AyushKumar-te7jn
@AyushKumar-te7jn Жыл бұрын
@@soniablanche5672 pm2 is far better and easier
@mohamedelsayed1868
@mohamedelsayed1868 8 ай бұрын
pm2 + worker threads
@7heMech
@7heMech 9 ай бұрын
Would be good if you use multiple threads.
@sumitsharma5946
@sumitsharma5946 2 жыл бұрын
Shouldn't you run benchmark on your server(Sever api endpoint) from your local machine instead of logging in to ssh?
@soniablanche5672
@soniablanche5672 Жыл бұрын
it will probably cost him a lot if he pays by request for the VPS lol
@soniablanche5672
@soniablanche5672 Жыл бұрын
what about clustering to make use of multiple cores
@dinoscheidt
@dinoscheidt Жыл бұрын
Much better to do this on the system layer. Aka: Typical are 1 core docker containers. Then auto scale the nodes with kubernetes.
@KuroManX
@KuroManX 9 ай бұрын
@@dinoscheidt just run pm2
@hanimecheddal6472
@hanimecheddal6472 2 жыл бұрын
😍😍
@kokizzu
@kokizzu 2 жыл бұрын
hail golang :3
@Dev-Siri
@Dev-Siri Жыл бұрын
Fastify would have actually performed better instead of express. Its about 3x faster than express so it would have been a better fit for this video.
@hijazi479
@hijazi479 Жыл бұрын
well, most of the time it's the database that causes errors or timeouts.
@pbdivyesh
@pbdivyesh 8 ай бұрын
I don't know why, but somehow I could not understand anything in this. PS I have 7 YOE.
@jessestackhom5607
@jessestackhom5607 Жыл бұрын
The only thing better than this video is making money in cryptocurrency.
@daksmemes7428
@daksmemes7428 2 жыл бұрын
I think jmeter is better
How to scale NodeJs applications using the cluster module.
13:37
Mafia Codes
Рет қаралды 49 М.
FOOTBALL WITH PLAY BUTTONS ▶️ #roadto100m
00:29
Celine Dept
Рет қаралды 56 МЛН
The Noodle Stamp Secret 😱 #shorts
00:30
Mr DegrEE
Рет қаралды 65 МЛН
顔面水槽がブサイク過ぎるwwwww
00:58
はじめしゃちょー(hajime)
Рет қаралды 115 МЛН
Is TypeScript (NodeJS) Faster than Go?? |  A server comparison
9:54
ThePrimeagen
Рет қаралды 210 М.
PROOF JavaScript is a Multi-Threaded language
8:21
Beyond Fireship
Рет қаралды 258 М.
Getting started with API Load Testing (Stress, Spike, Load, Soak)
14:20
Next 14 + React Query COMBO with Server Actions and RSC
9:49
developedbyed
Рет қаралды 83 М.
Why WebSockets Are NOT Scalable | WebSockets Explained
12:07
Mehul - Codedamn
Рет қаралды 32 М.
Scaling your Node.js app using the "cluster" module
13:44
Software Developer Diaries
Рет қаралды 31 М.
Node.js is a serious thing now… (2023)
8:18
Code With Ryan
Рет қаралды 623 М.
FOOTBALL WITH PLAY BUTTONS ▶️ #roadto100m
00:29
Celine Dept
Рет қаралды 56 МЛН