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

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 พ.ย. 2024

ความคิดเห็น • 51

  • @LukasSkywalker_
    @LukasSkywalker_ 11 หลายเดือนก่อน +14

    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 6 หลายเดือนก่อน

      You use Typescript?

    • @misterl8129
      @misterl8129 24 วันที่ผ่านมา +1

      currently, nodejs if you configure it well, or use clusters or maybe aws to have extra instances or charge balances it will do the work pretty pretty well
      Remember that nodeus is a single thread but with workers we can do much more than a single thread =P

  • @adityasethi9794
    @adityasethi9794 11 หลายเดือนก่อน +22

    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 8 หลายเดือนก่อน

      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.

    • @electrolyteorb
      @electrolyteorb 4 หลายเดือนก่อน

      Well kiddo... It's like saying Pi is NOT 22/7, "iTS irrAtionAl nUMBERRR"
      We know GC requires multiple threads... That doesn't change the fact JS has horrible performance

    • @kabali_da129
      @kabali_da129 4 หลายเดือนก่อน

      As per my knowledge, when a blocking request is written asynchronously, that request is assigned to the thread pool (place where all threads present), this is where multi threaded capability is achieved by assigning the asynchronous requests to the threads available in the thread pool..
      if there's any mistake or my way of understanding is wrong, please correct me.

    • @GabrielJimenez-wt3hw
      @GabrielJimenez-wt3hw 2 หลายเดือนก่อน

      ​@@kabali_da129in node js async functions are not multi threaded, if you want to execute a function concurrently you need to use a worker.

  • @vishutiwari99
    @vishutiwari99 3 ปีที่แล้ว +2

    One of the most underrated TH-cam channel .

  • @akeemovic
    @akeemovic 2 ปีที่แล้ว +7

    Great job! 👍 Please make a NodeJS scaling tutorial.

  • @lunix8028
    @lunix8028 ปีที่แล้ว +1

    Loved the content man, thank you very much!

  • @mdshadab3470
    @mdshadab3470 ปีที่แล้ว

    Bro you just rock. This video worth watching really 🔥🔥🔥

  • @raymondmichael4987
    @raymondmichael4987 2 ปีที่แล้ว

    I'll rewatch this;
    Thanks brother

  • @namaefumei
    @namaefumei 9 หลายเดือนก่อน

    Learned a lot. Thanks!

  • @kienang7850
    @kienang7850 3 ปีที่แล้ว +11

    Hi, if we use nodejs cluster, can it do better?

  • @oktachandra1851
    @oktachandra1851 ปีที่แล้ว +2

    have you tried nodejs cluster combine with worker-thread to load heavy concurrent requests ?

  • @williamabboud
    @williamabboud 2 ปีที่แล้ว +1

    That was quite interesting and very insightful. Thank you !

  • @neelthakkar4492
    @neelthakkar4492 3 ปีที่แล้ว

    Seriously underrated channel. But don't worry you are going to get 100k+ in nearby future.

  • @JohnDoe-ji1zv
    @JohnDoe-ji1zv 3 ปีที่แล้ว +10

    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.

    • @david-tracy
      @david-tracy 2 ปีที่แล้ว

      Good catch. How were u able to notice that?

    • @JohnDoe-ji1zv
      @JohnDoe-ji1zv 2 ปีที่แล้ว +2

      @@david-tracy 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 ปีที่แล้ว

      pm2 + worker threads

  • @tigertiger9911
    @tigertiger9911 3 ปีที่แล้ว +8

    How to scale node js app

  • @ziyaasgarov6973
    @ziyaasgarov6973 7 หลายเดือนก่อน

    Thanks for the video. Could you please suggest which programming language/framework would be the best for handling heavy tasks on the backend side?

  • @oussamasethoum2755
    @oussamasethoum2755 3 ปีที่แล้ว +1

    Good information, Thank you.

  • @soniablanche5672
    @soniablanche5672 ปีที่แล้ว +5

    what about clustering to make use of multiple cores

    • @dinoscheidt
      @dinoscheidt ปีที่แล้ว +1

      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 ปีที่แล้ว

      @@dinoscheidt just run pm2

  • @mdsamir8495
    @mdsamir8495 3 ปีที่แล้ว +1

    Awesome

  • @mahendranath2504
    @mahendranath2504 3 ปีที่แล้ว

    Thank you So much 👍🏼🙏🎉❤️

  • @arpitabali3621
    @arpitabali3621 2 ปีที่แล้ว +1

    which version of node have you used in this video??

  • @mohamedyoussef8835
    @mohamedyoussef8835 ปีที่แล้ว

    Awesome video ++++++++++ 🙂

  • @kaioh1384
    @kaioh1384 2 ปีที่แล้ว

    amazing

  • @tyongalves7129
    @tyongalves7129 11 หลายเดือนก่อน

    bruv thanks so much

  • @sumitsharma5946
    @sumitsharma5946 2 ปีที่แล้ว +1

    Shouldn't you run benchmark on your server(Sever api endpoint) from your local machine instead of logging in to ssh?

    • @soniablanche5672
      @soniablanche5672 ปีที่แล้ว +1

      it will probably cost him a lot if he pays by request for the VPS lol

  • @dheerajkukreja4269
    @dheerajkukreja4269 2 ปีที่แล้ว

    How are you printing the response status and latency in terminal....please reply

  • @teetanrobotics5363
    @teetanrobotics5363 2 ปีที่แล้ว

    Could you please make 2 playlists for:
    1) nodejs tutorials
    2) react/nextjs tutorials ?
    Amazing content. thank you

  • @7heMech
    @7heMech ปีที่แล้ว

    Would be good if you use multiple threads.

  • @kokizzu
    @kokizzu 2 ปีที่แล้ว

    hail golang :3

  • @hanimecheddal6472
    @hanimecheddal6472 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.

  • @longnguyenthanh6876
    @longnguyenthanh6876 3 ปีที่แล้ว

    thanks

  • @hijazi479
    @hijazi479 ปีที่แล้ว

    well, most of the time it's the database that causes errors or timeouts.

  • @vipsvips3213
    @vipsvips3213 5 หลายเดือนก่อน

    O(n!) not O(log n) Fibonacci

  • @pbdivyesh
    @pbdivyesh ปีที่แล้ว

    I don't know why, but somehow I could not understand anything in this. PS I have 7 YOE.

    • @vedagyasharma5438
      @vedagyasharma5438 3 หลายเดือนก่อน

      big noodles small bowl

    • @pbdivyesh
      @pbdivyesh 3 หลายเดือนก่อน

      ​@@vedagyasharma5438lol

  • @daksmemes7428
    @daksmemes7428 3 ปีที่แล้ว

    I think jmeter is better