performance do asp.net core, um comparativo com node.js

Post on 10-Jan-2017

4.149 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

PERFORMANCE DO ASP.NET CORE(UM COMPARATIVO COM NODE.JS)

WALDYR FELIX Arquiteto Líder no Time de Operações Críticas & Consultoria da FCamara

Microsoft MVP desde 2012

Fundador do Grupo ASP.NET Brasil

Blog: waldyrfelix.com.br Twitter/LinkedIn/Snap: waldyrfelix

.NET CORE

PERFORMANCE

http://web.ageofascent.com/asp-net-core-exeeds-1-15-million-requests-12-6-gbps

BENCHMARK ASP.NET COREgithub.com/aspnet/benchmarks

FERRAMENTAS

ESCOLHA DE HARDWARE

Server: VM Linux A4 – 8 Cores e 14 GB

Client: VM Linux A2 – 2 Cores e 3.5 GB

SERVIDOR WEB

.NET Core 1.0.0-rc2-3002702

ASP.NET Core 1.0.0-rc2-final

Kestrel 1.0.0-rc2-final

Node.js v6.2.1

Express 4.13.4

HTTP Server Nativo

RESPONSE DO BENCHMARKIdênticos para ASP.NET Core e Node.js

Retorna uma lista no formato JSONapi/benchmark/list

Retorna uma lista no formato JSON a partir de um arquivo de texto em discoapi/benchmark/file

APLICAÇÃO ASP.NET CORE

NODE.JS

APLICAÇÃO ASP.NET CORE

ASP.NET CORE

FERRAMENTA DE LOAD TEST

https://github.com/wg/wrk

wrk -t 8 -c 32 -d 10s http://host/api/benchmark/list

COLETA DE RESULTADOS

EXECUÇÃO DOS TESTESExecução realizada por um script bashUsando a ferramenta wrkNúmero de conexões simultâneas16, 32, 64, 128, 256, 512, 1024, 2048

Tempo de cada carga 10 segundos

RESULTADOS

RESULTADOS NODE.JS

RESULTADOS ASP.NET CORE

320% mais rápido

580% mais rápido

RESULTADO COMPARATIVO

Node.js ASP.NET Core

1876.15

6017.49

Json List (Sem I/O)

Node.js ASP.NET Core

673.52

3953.14

Json List (Com I/O)

RESULTADO COMPARATIVO

16 32 64 128 256 512 1024 20480

1000

2000

3000

4000

5000

6000

7000

Requisições / Segundo (Sem I/O)

Node.js ASP.NET Core

RESULTADO COMPARATIVO

16 32 64 128 256 512 1024 20480

500

1000

1500

2000

2500

3000

3500

4000

4500

Requisições / Segundo (Com I/O)

Node.js ASP.NET Core

KESTREL

PERFORMANCE DO LIBUVÉ uma biblioteca para I/O assíncronoTrabalha com single threaded event-loopFicou conhecida depois do Node.jsUso eficiente de sockets assíncronosTem versões para Windows, OS X e LinuxOtimização de uso de CPU e memóriaMelhora da performance em operações de I/O

PERFORMANCE DO KESTRELO Kestrel usa o Libuv assim como Node.jsMas apenas para operações de I/ODisco, serialização, rede, etc.Para operações não I/O usa o código gerenciado .NET normalmenteSuporta múltiplos event-loopOtimiza o número de chamadas ao sistema (sys calls)

REFERÊNCIAS DA APRESENTAÇÃO

https://github.com/waldyrfelix/benchmark_aspnet_brasil_confhttps://nodejs.org/en/docshttps://github.com/wg/wrkhttps://github.com/aspnet/benchmarkshttp://dotnet.github.iohttp://libuv.orghttps://github.com/dotnet/coreclrhttp://web.ageofascent.com/asp-net-core-exeeds-1-15-million-requests-12-6-gbpshttp://blog.dotnetnerd.dk/post/2015/11/08/Kestrel-the-new-web-server-for-ASPNET-5.aspx

OBRIGADO

top related