React, etc. Tech Stack

React, Flux, GraphQL, Hack, HHVM...? All of this and more!

AWS Lambda Benchmarks with Node.js, Python, Java, C# and Go - .NET Core takes the crown

AWS Lambda, the serverless infrastructure from Amazon's Web Services arm has become a popular platform for hosting microservice architecture based apps. The platform provides support for multiple programming languages and frameworks - currently Node.js, Python Java, C# and Go are on the menu.

Performance is always top of mind when developing computer applications. Minimal latencies and efficiency yield cost effective applications that also provide the best user experience. High performance is simply a win-win, if you factor out wasted time for premature optimization and othe human factors that could head to waste of time, but not CPU cycles.

This is ever more important in distributed applications that are used globally within different locations. The perfect example of this is from 2016, when the augmented reality game Pókemon GO went viral overnight. This required performance at an immense scale, which the company behind Pókemon GO decided to tap from Google Cloud Platform.

With Serverless Architectures being all the rage for the last few years, they hold a similar promise. Scaling applications with the infrastructure layer completely abstracted. Cynics would say that this is similar to the PHP powered webhotels from the days of yore, but the global capabilities are way beyond what you had running in your ISPs web hotels.

.NET Core takes the performance crown on AWS Lambda

In a recent suite of benchmarks Yun Zhi Lin, VP of Engineering at Contino, examined the performance characteristics of Node.js, Python, Java, C# and Go languages on the AWS Lambda Serverless Platform. Yin is an acclaimed expert in the WAS APN field and is a certified Cloud Warrior.

All of the languages usable in AWS Lambda are high level, not something like Assembler, C/C++ or Objective C. From scripting languages to JavaScript and Python to languages with a managed runtime like Java and C# to Go which is compiled to binaries, all of they have their own strengths. In the benchmarks the not-top-of-mind option arose as the champion.

The Open Source .NET Core framework yielded the lowest average response times consistently. The framework is mostly used with the Object Oriented C# language, but is also native to the functional programmin paradigm language #F. The results can be seen below:

AWS Lambda benchmarks with Node.js, Python, Java, C#, GO

Yun Zhi Lin concludes his findings as follows:

Both C# and F# on .Net Core 2.0 exceeds all expectations and outperforms all other runtimes in average duration. AWS Lambda users should consider .Net Core 2.0 as the default — and upgrade all existing projects still using 1.0.
- Runtime performance benchmark of all five programming languages supported by AWS Lambda

This shows that the open sourcing and continued investment int the C# language and .NET Core framework are paying dividents in performance. Old school technologies Java and C# have been able to reinvent themselves and are a perfectly valid alternative to newcomers like JavaScript and Go.

Node.js remains a solid option for many programming needs as it is good enough for most uses and is in a unique position for writing universal JavaScript applications with frameworks like Next.js. But for the performance needs for processing, Node.js is hardly fast with it's limited single threaded model and dynamic typing.

The field is continuously evolving and Node.js powering V8 engine can also run Wasm binaries. Together with TypeScript and WebAssembly can provide a familiar development experience for JavaScript developers. But there is also prospects to target Wasm runtimes in any language, such as RUST or even Go or C/C++, which makes the future an interesting prospect for those into following evolving technologies.

Written by Jorgé on Thursday March 8, 2018

Permalink -

« Improvements to Garbage Collection (GC) in PHP 7.3, 5x boost performance in tests