Stress Testing a Nodejs and Go Server using the hey
CLI tool.
📝 Case
• 1000 online users
• 2000 concurrent requests
• on a AWS t3.micro EC2 instance
• get a request with a simple Select query.
• same Postgres database on AWS RDS.
NodeJS Server
While it handled the load decently, 15 requests failed with a 502 error, and the total execution time was 2.4 seconds. All other 1985 requests pass successfully
GO Server
🔥 Go handled ALL requests with a 200 response!
⏳ Total time?𝟭.𝟮 𝘀𝗲𝗰, Less than half of what Node.js took!
This proves why Go is a powerhouse for building high-performance, scalable servers. 🚀
Check out the image for the detailed results! 📊
𝗕𝘂𝘁 𝘄𝗲’𝗿𝗲 𝗻𝗼𝘁 𝗱𝗼𝗻𝗲 𝘆𝗲𝘁!
💡 In the next round, we’ll run the test with medium-level traffic: 100 users sending 1000 requests. Also, check cases where NodeJS outperforms GO. Are you curious to see how both perform under different scenarios? Stay tuned! 𝘛𝘳𝘶𝘴𝘵 𝘮𝘦 𝘵𝘩𝘪𝘯𝘨𝘴 𝘸𝘪𝘭𝘭 𝘨𝘦𝘵 𝘤𝘳𝘢𝘻𝘪𝘦𝘳.
What are your thoughts on Go vs. Node.js for backend performance? Let’s discuss in the comments! 👇
P.S. Want to master Go and build ultra-fast web servers? Check out my Go Course on Udemy: https://www.udemy.com/course/go-web-development-create-powerful-servers-with-golang/?referralCode=EA9B71B7323D2C5D1071.
Top comments (0)