title: How can I start multiple WebSocket connection concurrently?
body: <p>I have five different WebSocket endpoints that I'm serving in <code>gunicorn</code> with <code>uvicorn</code> via <code>django-channels</code> with this command.</p>
  
  <p>It is run via a Docker container:</p>
  
  <pre><code>CMD ["gunicorn", "-b", "0.0.0.0:8000", "-w", "4", "-k", "uvicorn.workers.UvicornWorker", "config.asgi:application"]
  </code></pre>
  
  <p>I have some JavaScript that simply opens WebSocket connections to those endpoints:</p>
  
  <pre><code>const websocketUrl = 'http://example.com';
  
  new WebSocket(`${websocketUrl}/ws/typeahead/foapal/`);
  new WebSocket(`${websocketUrl}/ws/typeahead/fund/`);
  new WebSocket(`${websocketUrl}/ws/typeahead/orgn/`);
  new WebSocket(`${websocketUrl}/ws/typeahead/prog/`);
  new WebSocket(`${websocketUrl}/ws/typeahead/actv/`);
  </code></pre>
  
  <p>What I want to happen is that all 5 of the connections above will open asynchronously. However, here's what it looks like in Chrome DevTools' Network tab:</p>
  
  <p><a href="https://i.stack.imgur.com/xDGnH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xDGnH.png" alt="Network tab"></a></p>
  
  <p>As you can see, the browser waits for one WebSocket connection be established before moving on to the next one.</p>
  
  <p>How can I concurrently make those connections?</p>