# HTTP.jl async is slow compared to python+aiohttp

**URL:** <https://discourse.julialang.org/t/http-jl-async-is-slow-compared-to-python-aiohttp/96736>\
**Category:** Performance\
**Tags:** data\
**Created:** [March 29, 2023, 1:36am UTC](https://discourse.julialang.org/t/http-jl-async-is-slow-compared-to-python-aiohttp/96736 "2023-03-29T01:36:00Z")\
**Posts on this page:** 1\
**Showing post:** 45

<div class="post-metadata">

**Author:** ![agoodm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/agoodm/32/46802_2.png) [@agoodm](https://discourse.julialang.org/u/agoodm)\
**Post date:** [April 2, 2023, 3:18am UTC](https://discourse.julialang.org/t/http-jl-async-is-slow-compared-to-python-aiohttp/96736/45 "2023-04-02T03:18:37Z")

</div>

Eureka! I have finally solved this after checking the HTTP.jl documentation and determining that there is a way to configure it to use OpenSSL instead of MbedTLS. This can be done by passing in `socket_type_tls=OpenSSL.SSLStream` to the request. Once I did it now seems to be running as fast as python now over HTTPS:

```plaintext
urls = map(i->"https://mur-sst.s3.us-west-2.amazonaws.com/zarr-v1/analysed_sst/$i.1.0", 0:99);
julia> @time asyncmap(url->HTTP.request("GET", url, status_exception=false, connection_limit=25, socket_type_tls=OpenSSL.SSLStream).body, urls)
  7.531837 seconds (779.31 k allocations: 5.198 GiB, 0.49% compilation time)

```

A big thank you to everyone for helping me work this out!

---

_[View the full topic](https://discourse.julialang.org/t/http-jl-async-is-slow-compared-to-python-aiohttp/96736)._
