How To Test Your API Server Availability 🚀 | OPTIMIZING NODE JS

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • In this 4th video of my "Node JS Performance Optimizations" series, I show you how to increase app performance by testing your API Server availability using a performance benchmarking tool and 2 API Endpoints.
    TITLE: HOW TO TEST YOUR API SERVER AVAILABILITY
    Node JS Performance Optimizations RUclips Playlist:
    • Managing The Event Loo...
    Subscribe to my Bleeding Code RUclips Channel here:
    / @bleedingcode
    Reference Links
    =============
    Bleeding Code - Node JS Performance Optimizations GitHub Repo
    github.com/ble...
    AutoCannon Benchmark Testing
    github.com/mco...
    Bleeding Code on Social Media
    ==========================
    bleedingcode.com
    / bleedcode
    / bleedingcode
  • НаукаНаука

Комментарии • 7

  • @BleedingCode
    @BleedingCode  4 года назад +3

    Hi coders 👋. Hope you're all enjoying the series. So how many of you ever ran performance tests for your application(s), irrelevant of how I did it in this video? Cheers 😎

  • @AdityaFingerstyle
    @AdityaFingerstyle 4 года назад +3

    With reference to 5:06, I ran your code with Bcrypt too and got these results (running autocannon on both the endpoints simultaneously )
    # Bcrypt
    /stress = 73
    /pulse = 64
    # BcryptJS
    /stress = 47
    /pulse = 94
    Looks like the hashing part is faster with Bcrypt but I don't understand why it affects /pulse more than BcryptJS.
    Also, since I've been learning GoLang, I tried to perform a similar test and the results blew my mind !
    # GoLang
    /stress = 370
    /pulse = 1,680

    • @BleedingCode
      @BleedingCode  4 года назад +1

      Thanks as always for watching Aditya. You make a very valid point. Bcrypt as a C++ module shouldn't affect the pulse tests worse than BcryptJS, unless the following:
      How many CPU Cores is your machine running and do they have hyperthreading? If yes, it means you have double the logical cores per CPU core. The UV_THREADPOOL_SIZE is set default to 4. If you change this to match the number of logical cores you are running, that should make a positive impact on the pulse tests.

    • @AdityaFingerstyle
      @AdityaFingerstyle 4 года назад

      ​@@BleedingCode I have a quad core CPU and 8 logical cores.
      I set UV_THREADPOOL_SIZE to 8 but the results are still the same.

    • @BleedingCode
      @BleedingCode  4 года назад +2

      This is very strange. So, I ran the tests on my side and check the results I got (These are the results I was expecting):
      # BcryptJS
      /stress - 58
      /pulse - 117
      # Bcrypt
      /stress - 267
      /pulse - 21 193

  • @gosnooky
    @gosnooky 2 года назад +1

    Can you make the text larger? It's too small to read on the devices I watch on.

    • @BleedingCode
      @BleedingCode  2 года назад

      Hi there. Yes forgive me. This was one of my first videos and didn't realize at that time most of my followers watch on mobile devices. All my future videos will fully support mobile form factor 👍.