All Projects → costajob → App Servers

costajob / App Servers

App Servers benchmarked for: Ruby, Python, JavaScript, Dart, Elixir, Java, Crystal, Nim, GO, Rust

Programming Languages

python
139335 projects - #7 most used programming language
java
68154 projects - #9 most used programming language
ruby
36898 projects - #4 most used programming language
rust
11053 projects
golang
3204 projects
dart
5743 projects
elixir
2628 projects
nim
578 projects
crystal
512 projects

Projects that are alternatives of or similar to App Servers

web-benchmarks
A set of HTTP server benchmarks for Golang, node.js and Python with proper CPU utilization and database connection pooling.
Stars: ✭ 22 (-90.76%)
Mutual labels:  benchmark, http-server
Criollo
A powerful Cocoa web framework and HTTP server for macOS, iOS and tvOS.
Stars: ✭ 229 (-3.78%)
Mutual labels:  http-server
Swoole Bundle
Symfony Swoole Bundle
Stars: ✭ 201 (-15.55%)
Mutual labels:  http-server
Simple Httpd
Drop-in replacement for Python SimpleHTTPServer. Provides TLS via Let's Encrypt over HTTP2, and auto generated self-signed certificates.
Stars: ✭ 217 (-8.82%)
Mutual labels:  http-server
Automlbenchmark
OpenML AutoML Benchmarking Framework
Stars: ✭ 210 (-11.76%)
Mutual labels:  benchmark
Perfecttemplate
Empty Perfect Starter Project.
Stars: ✭ 221 (-7.14%)
Mutual labels:  http-server
Fiery
A flexible and lightweight web server
Stars: ✭ 203 (-14.71%)
Mutual labels:  http-server
Srs Bench
SB(SRS Bench) is a benchmark tool for HTTP-FLV, RTMP, HLS and WebRTC.
Stars: ✭ 235 (-1.26%)
Mutual labels:  benchmark
Weatherbench
A benchmark dataset for data-driven weather forecasting
Stars: ✭ 227 (-4.62%)
Mutual labels:  benchmark
Dbtester
Distributed database benchmark tester
Stars: ✭ 214 (-10.08%)
Mutual labels:  benchmark
Turbo Run Length Encoding
TurboRLE-Fastest Run Length Encoding
Stars: ✭ 212 (-10.92%)
Mutual labels:  benchmark
Gymfc
A universal flight control tuning framework
Stars: ✭ 210 (-11.76%)
Mutual labels:  benchmark
Java Object Mapper Benchmark
JMH benchmark of Java object-to-object mapping frameworks
Stars: ✭ 227 (-4.62%)
Mutual labels:  benchmark
Restrserve
R web API framework for building high-performance microservices and app backends
Stars: ✭ 207 (-13.03%)
Mutual labels:  http-server
Router.cr
Minimum High Performance Middleware for Crystal Web Server.
Stars: ✭ 231 (-2.94%)
Mutual labels:  http-server
Ixwebsocket
websocket and http client and server library, coming with ws, a command line swiss army knife utility
Stars: ✭ 204 (-14.29%)
Mutual labels:  http-server
Turbobench
Compression Benchmark
Stars: ✭ 211 (-11.34%)
Mutual labels:  benchmark
Aiohttp Wsgi
WSGI adapter for aiohttp.
Stars: ✭ 218 (-8.4%)
Mutual labels:  http-server
Tianshou
An elegant PyTorch deep reinforcement learning library.
Stars: ✭ 4,109 (+1626.47%)
Mutual labels:  benchmark
Serve
a static http server anywhere you need one.
Stars: ✭ 233 (-2.1%)
Mutual labels:  http-server

Table of Contents

Scope

The idea behind this repository is to benchmark different languages implementation of HTTP server.

Hello World

The application i tested is minimal: the HTTP version of the Hello World example.
This approach allows including languages i barely know, since it is pretty easy to find such implementation online.
If you're looking for more complex examples, you will have better luck with the TechEmpower benchmarks.

Disclaimer

Please do take the following numbers with a grain of salt: it is not my intention to promote one language over another basing on micro-benchmarks.
Indeed you should never pick a language just basing on its presumed performance.

Languages

I have became lazy with years and just adopt languages i can install via homebrew, sorry Oracle/MS. This also allows me to benchmark them in a single session, thus trying to use an environment as neutral as possible. Where possible i just relied on the standard library, but when it is not production-ready (i.e. Ruby, Python).

Ruby

Ruby 3.0.0 is used. Ruby is a general-purpose, interpreted, dynamic programming language, focused on simplicity and productivity.

Python

Python 3.9.1 is used. Python is a widely used high-level, general-purpose, interpreted, dynamic programming language.

JavaScript

Node.js version 15.5.0 is used. Node.js is based on the V8 JavaScript engine, optimized by Google and supporting most of the new language's features.

Dart

Dart version 2.10.4 is used. Dart is a VM based, object-oriented, sound typed language using a C-style syntax that transcompiles optionally into JavaScript.

Elixir

Elixir 1.11.2 is used. Elixir is a purely functional language that runs on the Erlang VM and is strongly influenced by the Ruby syntax.

Crystal

Crystal 0.35.1 is used. Crystal has a syntax very close to Ruby, but brings some desirable features such as statically typing and ahead of time (AOT) compilation.

Nim

Nim 1.4.2 is used. Nim is an AOT, Python inspired, statically typed language that comes with an ambitious compiler aimed to produce code in C, C++, JavaScript or ObjectiveC.

GO

GO 1.15.6 is used. GO is an AOT language that focuses on simplicity and offers a broad standard library with CSP constructs built in.

Tools

Wrk

I used wrk as the loading tool.
I measured each application server six times, picking the best lap (but for VM based languages demanding longer warm-up).

wrk -t 4 -c 100 -d30s --timeout 2000 http://0.0.0.0:9292

Platform

These benchmarks are recorded on a MacBook PRO 13 2019 having these specs:

  • macOS Catalina
  • 1.4 GHz Quad-Core Intel Core i5
  • 8 GB 2133 MHz LPDDR3

RAM and CPU

I measured RAM and CPU consumption by using macOS Activity Monitor dashboard and recording max consumption peak.
For the languages relying on pre-forking parallelism i reported the average consumption by taking a snapshot during the stress period.

Benchmarks

Results

Language App Server Requests/sec RAM (MB) CPU (%)
Ruby+MJIT Puma 36455.88 > 100 > 580
Elixir Plug with Cowboy 46416.25 50.5 583.8
Ruby Puma 47975.36 > 100 > 580
Dart Dart HttpServer 59335.33 193.2 429.1
JavaScript Node Cluster 87208.47 > 200 > 240
GO GO ServeMux 103847.10 10.0 429.1
Python Gunicorn with Meinheld 120105.65 > 40 > 380
Nim httpbeast 128257.98 11.4 99.6
Crystal Crystal HTTP 132699.78 8.5 246.7

Puma

I tested Ruby by using a plain Rack application served by Puma.

Bootstrap

RUBYOPT='--jit' puma -w 8 -t 2 --preload servers/rack_server.ru

Gunicorn with Meinheld

I tested Python by using Gunicorn spawning Meinheld workers with a plain WSGI compliant server.

Bootstrap

cd servers
gunicorn -w 4 -k meinheld.gmeinheld.MeinheldWorker -b :9292 wsgi_server:app

Node Cluster

I used the cluster module included into Node's standard library.

Bootstrap

node servers/node_server.js

Dart HttpServer

I used the async HTTP server embedded into the Dart standard library and compiled it with dart2native AOT compiler.

Bootstrap

dart2native servers/dart_server.dart -k aot
dartaotruntime servers/dart_server.aot

Plug with Cowboy

I tested Elixir by using Plug library that provides a Cowboy adapter.

Bootstrap

cd servers/plug_server
MIX_ENV=prod mix compile
MIX_ENV=prod mix run --no-halt

Crystal HTTP

I used Crystal HTTP server standard library, enabling parallelism by using the preview_mt flag.

Bootstrap

crystal build -Dpreview_mt --release servers/crystal_server.cr
./crystal_server

httpbeast

To test Nim i opted for the httpbeast library: an asynchronous server relying on Nim HTTP standard library.

Bootstrap

nim c -d:release --threads:on servers/httpbeast_server.nim
./servers/httpbeast_server

GO ServeMux

I used the HTTP ServeMux GO standard library.

Bootstrap

go run servers/servemux_server.go
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].