I am using HTTP.jl library to download large files over an encrypted connection (via AWSS3 to connect to an S3-enabled datastore). I have found out that the performance is greatly degraded when encrypted connection is used. Consider the following code (I use http-server Node.js package to serve a ~400MB file):
# HTTPS
@time HTTP.request("GET", "https://localhost:8080/download.gz" ; require_ssl_verification=false) |> (x -> ())
4.922933 seconds (177.54 k allocations: 795.587 MiB, 1.06% gc time)
# HTTP
@time HTTP.request("GET", "http://localhost:8080/download.gz") |> (x -> ())
0.765877 seconds (63.79 k allocations: 777.194 MiB, 0.61% gc time)
In comparison, if I perform the same requests via curl, I get 0.785s for the HTTPS request and 0.498s for the HTTP request.
Could you please suggest me how to deal with this performance issue? Thank you in advance!