Hello Friends! Lately I’ve heard a lot of discussion around the new .NET Core and its performance especially on web servers. I didn’t want to start comparing two different things, so I did patience for quite long for a more stable version. This Monday, Microsoft , so I feel ready to do it! Do you? announced the .NET Core version 2.0 As we already mentioned, we will compare two identical things here, in terms of application, the expected response and the stability of their run times, so we will not try to put more things in the game like or encoders and decoders, just a simple text message. To achieve a fair comparison we will use the on both sides, Go and .NET Core. JSON XML MVC architecture pattern Prerequisites (or Golang): is a open source programming language designed for building simple, fast, and reliable software. Go rapidly growing There are not lot of web frameworks for Go with MVC support but, luckily for us Iris does the job. : A fast, simple and efficient micro web framework for Go. It provides a beautifully expressive and easy to use foundation for your next website, API, or distributed app. Iris : is a general-purpose, object-oriented programming language. Its development team is led by . C# Anders Hejlsberg : Develop high performance applications in less time, on any platform. .NET Core Download Go from and .NET Core from . https://golang.org/dl https://www.microsoft.com/net/core After you’ve download and install these, you will need Iris from Go’s side. Installation is very easy, just open your terminal and execute: go get -u github.com/kataras/iris Benchmarking Hardware Processor: Intel(R) Core(TM) i7–4710HQ CPU @ 2.50GHz 2.50GHz RAM: 8.00 GB Software OS: Microsoft Windows [Version 10.0.15063], power plan is “High performance” HTTP Benchmark Tool: , latest version 1.1 https://github.com/codesenberg/bombardier .NET Core: , latest version 2.0 https://www.microsoft.com/net/core Iris: , latest version 8.3 built with https://github.com/kataras/iris go1.8.3 Both of the applications will just return the text “value” on request path “api/values/{id}”. .NET Core MVC Logo designed by Pablo Iglesias . Created using . That template will generate the code for you, including the on method requests. dotnet new webapi webapi return “value” GET Source Code Start the .NET Core web server $ cd netcore-mvc$ dotnet run -c ReleaseHosting environment: ProductionContent root path: C:\mygopath\src\github.com\kataras\iris\_benchmarks\netcore-mvcNow listening on: Application started. Press Ctrl+C to shut down. http://localhost:5000 Target and run the HTTP benchmark tool $ bombardier -c 125 -n 5000000 Bombarding with 5000000 requests using 125 connections5000000 / 5000000 [=====================================================] 100.00% 2m3sDone!Statistics Avg Stdev MaxReqs/sec 40226.03 8724.30 161919Latency 3.09ms 1.40ms 169.12msHTTP codes:1xx - 0, 2xx - 5000000, 3xx - 0, 4xx - 0, 5xx - 0others - 0Throughput: 8.91MB/s http://localhost:5000/api/values/5 http://localhost:5000/api/values/5 Iris MVC Logo designed by . Santosh Anand Source Code Start the Go web server $ cd iris-mvc$ go run main.goNow listening on: Application started. Press CTRL+C to shut down. http://localhost:5000 Target and run the HTTP benchmark tool $ bombardier -c 125 -n 5000000 Bombarding with 5000000 requests using 125 connections5000000 / 5000000 [======================================================] 100.00% 47sDone!Statistics Avg Stdev MaxReqs/sec 105643.81 7687.79 122564Latency 1.18ms 366.55us 22.01msHTTP codes:1xx - 0, 2xx - 5000000, 3xx - 0, 4xx - 0, 5xx - 0others - 0Throughput: 19.65MB/s http://localhost:5000/api/values/5 http://localhost:5000/api/values/5 For those who understand better by images, I did print my screen too! Click to see these screenshots. here Summary Time to complete the - smaller is better. 5000000 requests Reqs/sec — bigger is better. Latency — smaller is better Throughput — bigger is better. Memory usage — smaller is better. LOC (Lines Of Code) — smaller is better. .NET Core MVC Application, written using 86 lines of code, ran for serving requests per second within latency in average and , the memory usage of all these was ~126MB (without the dotnet host). 2 minutes and 8 seconds 39311.56 3.19ms 229.73ms max Iris MVC Application, written using 27 lines of code, ran for serving requests per second within latency in average and , the memory usage of all these was ~12MB. 47 seconds 105643.71 1.18ms 22.01ms max There is also another benchmark with templates, scroll to the bottom. Update 20 August 2017 As and pointed out on this t , on .NET Core file the line with can be replaced with . I followed their helpful instructions and re-run the benchmarks. The article now contains the latest benchmark output for the .NET Core application with the change both Josh and Scott noted. Josh Clark Scott Hanselman re-twee Startup.cs services.AddMvc(); services.AddMvcCore(); It had a small difference but not as huge (8.91MB/s from 8.61MB/s) For those who want to compare with the standard you can see the old output by pressing . services.AddMvc(); here Can you stay a bit longer for one more? Let’s run one more benchmark, spawn but this time we expect generated by templates via the view engine. 1000000 requests HTML .NET Core MVC with Templates Start the .NET Core web server $ cd netcore-mvc-templates$ dotnet run -c ReleaseHosting environment: ProductionContent root path: C:\mygopath\src\github.com\kataras\iris\_benchmarks\netcore-mvc-templatesNow listening on: Application started. Press Ctrl+C to shut down. http://localhost:5000 Target and run the HTTP benchmark tool Bombarding with 1000000 requests using 125 connections1000000 / 1000000 [====================================================] 100.00% 1m20sDone!Statistics Avg Stdev MaxReqs/sec 11738.60 7741.36 125887Latency 10.10ms 22.10ms 1.97sHTTP codes:1xx — 0, 2xx — 1000000, 3xx — 0, 4xx — 0, 5xx — 0others — 0Throughput: 89.03MB/s http://localhost:5000 Iris MVC with Templates Start the Go web server $ cd iris-mvc-templates$ go run main.goNow listening on: Application started. Press CTRL+C to shut down. http://localhost:5000 Target and run the HTTP benchmark tool Bombarding with 1000000 requests using 125 connections1000000 / 1000000 [======================================================] 100.00% 37sDone!Statistics Avg Stdev MaxReqs/sec 26656.76 1944.73 31188Latency 4.69ms 1.20ms 22.52msHTTP codes:1xx — 0, 2xx — 1000000, 3xx — 0, 4xx — 0, 5xx — 0others — 0Throughput: 192.51MB/s http://localhost:5000 Summary Time to complete the — smaller is better. 1000000 requests Reqs/sec — bigger is better. Latency — smaller is better Memory usage — smaller is better. Throughput — bigger is better. .NET Core MVC with Templates Application ran for serving requests per second with within latency in average and max, the memory usage of all these was ~193MB (without the dotnet host). 1 minute and 20 seconds 11738.60 89.03MB/s 10.10ms 1.97s Iris MVC with Templates Application ran for serving requests per second with within latency in average and max, the memory usage of all these was ~17MB. 37 seconds 26656.76 192.51MB/s 1.18ms 22.52ms What next? Download the example source code from and run the same benchmarks from your machine, then come back here and share your results with the rest of us! there For those who want to add other go or c# .net core web frameworks to the list please push a PR to the folder inside . _benchmarks this repository I need to personally thanks the team for sharing my article at their twitter account, as well. dev.to all for the 100% green feedback, have fun! Thank you Update: Monday, 21 August 2017 A lot of people reached me saying that want to see a new benchmarking article based on the .NET Core’s lower level this time. Kestrel So I did, follow the below link to learn the performance difference between Kestrel and Iris, it contains a sessions storage management benchmark too! _A Fair benchmark between Iris Golang and Kestrel .NET Core (C#)._hackernoon.com Iris Go vs .NET Core Kestrel in terms of HTTP performance I like the visual effects when , do you? It’s simple: just click the clap button. If you feel strongly, click it more I click the clap button more than once (or just hold it down).