# HTTP.jl doesn't seem to be good at handling over 1k concurrent requests, in comparison to an alternative in Python?

**URL:** <https://discourse.julialang.org/t/http-jl-doesnt-seem-to-be-good-at-handling-over-1k-concurrent-requests-in-comparison-to-an-alternative-in-python/38281>\
**Category:** Web Stack\
**Created:** [April 27, 2020, 3:53am UTC](https://discourse.julialang.org/t/http-jl-doesnt-seem-to-be-good-at-handling-over-1k-concurrent-requests-in-comparison-to-an-alternative-in-python/38281 "2020-04-27T03:53:38Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![pixel27](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pixel27/32/8902_2.png) [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Post date:** [April 28, 2020, 1:41am UTC](https://discourse.julialang.org/t/http-jl-doesnt-seem-to-be-good-at-handling-over-1k-concurrent-requests-in-comparison-to-an-alternative-in-python/38281/7 "2020-04-28T01:41:46Z")

</div>

Thinking about this some more you might be able to do something like:

```julia
using Threads
function init_server(host::IPAddr = ip"0.0.0.0", port = 3000)
    servers = []
    for i in 1:nthreads()
        push!(Threads.@spawn HTTP.serve(handler, host, port + i; server = server))
    end
    return servers
end

```

Which should start a task on each of the threads available that listens on a different port starting at 3001. I’m not sure if there would be any funnyness with router and mutliple threads however. That keeps everything in one process space.

You would still need a reverse proxy (apache http/nginx) to load balance between the ports.

---

_[View the full topic](https://discourse.julialang.org/t/http-jl-doesnt-seem-to-be-good-at-handling-over-1k-concurrent-requests-in-comparison-to-an-alternative-in-python/38281)._
