Fasthttp: How about the performance of ssl based on fasthttp?

Created on 19 Oct 2018  路  3Comments  路  Source: valyala/fasthttp

Benchmark of ssl's performance compared with nginx would be much appreciated!

Thanks very much :smile:

Most helpful comment

I can already tell you that nginx is going to be a lot fast, somewhere around 3x to 10x faster. This has nothing to do with fasthttp and is completely because of the Golang crypto stack being written in Go. This means it doesn't have the decades of performance optimizations that other stacks like OpenSSL have.

More on this can be found in these issues: https://github.com/golang/go/issues/21525 and https://github.com/golang/go/issues/22807

All 3 comments

I can already tell you that nginx is going to be a lot fast, somewhere around 3x to 10x faster. This has nothing to do with fasthttp and is completely because of the Golang crypto stack being written in Go. This means it doesn't have the decades of performance optimizations that other stacks like OpenSSL have.

More on this can be found in these issues: https://github.com/golang/go/issues/21525 and https://github.com/golang/go/issues/22807

Would it be faster to proxy the ssl request from nginx to the golang application than connecting directly with ssl to the golang application?

Almost everything will run faster if you terminate TLS on load-balancer/nginx cache.

Back to Go, I have investigated this pretty closely: elliptic curve crypto is quite optimized in crypto/tls, thus will be the closest to c-level libraries' performance, at least in the same order of magnitude.

That unfortunately means full stack, including ecdsa signatures and elliptic cert keys.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

facundomedica picture facundomedica  路  4Comments

mayocream picture mayocream  路  3Comments

Fenny picture Fenny  路  4Comments

shkreios picture shkreios  路  3Comments

danilobuiatti picture danilobuiatti  路  3Comments