Go vs. Node.js (AWS Lambda) performance benchmark (2023)

preview_player
Показать описание

▬▬▬▬▬ Experience & Location 💼 ▬▬▬▬▬
► I’m a Senior Software Engineer at Juniper Networks (12+ years of experience)
► Located in San Francisco Bay Area, CA (US citizen)

▬▬▬▬▬▬ Connect with me 👋 ▬▬▬▬▬▬

▬▬▬▬▬▬ Related videos 👨‍🏫 ▬▬▬▬▬▬

=========
Source Code

#AWS #Lambda #Golang
Рекомендации по теме
Комментарии
Автор

In both of these 90% of the time is spent waiting for HTTP requests to S3 and DynamoDB, this is not a good test for performance difference in Go vs Node. With a test like this it's more valuable to look at how long it took to write each lambda and how difficult it is for other developers to understand how it works.

iwanttoeatyourbabify
Автор

Love your videos and how you don't type live and only explain what's essential. Thanks 💯

annusingh
Автор

Nice video Anton! Do you think AWS Lambda runtime has a big impact here? I mean, would we be able to infer this results doing the same benchmarks locally?

agustindiaz
Автор

It seems that you are using the full aws sdk for node js which is like a 75 mbs library. This can be tried by using the latest aws sdk which allows using only the packages for S3 and Dynamodb. Although, I am not fully sure if reducing this size will have a as great impact on the performance since the lambda containers will be reused for many requests.

adwaitmathkari
Автор

Total time's where within a second of each other though?

brevanh
Автор

Do more such comparison videos with Node and Go with different use cases
Much appreciated

FreedomForKashmir
Автор

Good comparison video! Just wondered, Is there any reason to change regacy node app to go language application??

kwanghobae
Автор

Could you please test java and PHP also?

Mahmudulhasan-tshm
Автор

Nice video. Given the intro, I was hoping this video would actually run these for a while and compare the real AWS costs of each. Then end the video with how much money/day is actually saved

MaxCoplan
Автор

Does this also reflect cold start time?

mstibbard
Автор

Thanks, cool comparison. But I would compare 99 percentile. And the difference a bit less - 22%. Sure that Go is much faster, but a lot of time both routines are slowed by IO operations

fiords
Автор

@Anton Putra could you do a Go vs c# aws Lambda ?

jorgefranco
Автор

Thank you, Anton. Is there any chance to add python for comparison?

vagifgafar
Автор

Would be interesting to test with the modular v3 node sdk, should reduce startup by a bit.

paulzietsman
Автор

I think this experimentation demonstrate how fast nodejs platform vs golang binary gets executed in lambda, or may be how fast the corresponding runtime gets loaded; because, both downloading file and saving to DB is IO operation.

To be fair, you also need to add some comparison of CPU load, say math, data processing, etc ops performance comparison as well to get he full picture.

hasanlock
Автор

Why exactly is Go faster here? Because I know that NodeJS is actually significantly faster at some types of code (due to JIT).

omrtheater
Автор

Great aws lambda performance research. Would interesting to compare just calculation perfprmance

mvlad
Автор

The Go code would have been much faster if you would have implemented the downloadImage function as a gorutine. Correct me if I am wrong thou.

carlosm.
Автор

I know that majority of people never considered C# as a real competitor for nodejs/go/python in lambdas but I have to say that today it worth to try. In .Net 6 there is ahead of time compilation and it helps to solve cold start issue. According to the my test it is on the same level as nodejs with 2Gb of RAM. But C# project is much easier to develop and support in the long terms.

yatsuk
Автор

Not by a wide margin, considering go is compiled.

ruyvieira