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)