Performance Testing Fastify vs. Express [EXPERIMENT]

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ก.ย. 2024
  • This is a little experiment where we performance test Fastify vs ExpressJS using the Apache Bench tool.
    buymeacoffee.c...
    httpd.apache.o...
    www.fastify.io/
    expressjs.com/
    Link To Code: github.com/tha...
    #lowcode #postman #tutorial #fastify #miamitech #testing #integration #testdrivendevelopment #always #question #command #typescript #vscode #performance #performancetesting #tech #software #softwareengineer #softwareengineering #reality #unittesting

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

  • @calebhoff3506
    @calebhoff3506 ปีที่แล้ว +6

    over 27% more requests per second is still huge.
    we should also investigate what settings they used- like if they used pino for asynchronous server logging vs synchronous logging in express could make a huge difference

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

      I agree a lot more due diligence is required to come to any conclusive statements regarding the difference in performance between Express and Fastify but the message I was aiming to communicate in the video is "Don't take information on face value and always perform due diligence before coming to conclusions"

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

    1,000+ more requests per second. Blazingly fast

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

    1. You are using nodemon (very hard worker)
    2. You are logging all requests (console output is so slow and blocking)

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

      Noted. A handful of comments have raised this concern.
      This video needs to be redone : )
      The next video I do related to performance testing be sure to run in the benchmarks in production mode...
      If you find a video that live performance tests Express vs Fastify I would love to see the if the results line up with the marketed stats on Fastify's site...
      Right now I'm preparing for a hackathon so will have to find time : )
      Pleasure to connect...

    • @MelroyvandenBerg
      @MelroyvandenBerg 6 หลายเดือนก่อน

      Also try to use cluster feature to get some parallel threads

  • @dmsnm
    @dmsnm ปีที่แล้ว +9

    Running in production mode would have more precise results

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

      Great Point!
      Didn't event think of that
      Thanks for bringing this up! Have you done the tests?

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

      @@cmd_labs I did not. The thought just crossed my mind.

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

      @@dmsnm Amazing thought! Please continue to share these thoughts : ) Didn't even think of that : )

  • @MelroyvandenBerg
    @MelroyvandenBerg 6 หลายเดือนก่อน +3

    Also.. You are running in dev mode. Don't do that. It will beautify the output on console... 😢

    • @cmd_labs
      @cmd_labs  2 หลายเดือนก่อน

      Fair point