6

I have made a very simple asp.net core application with a static files binding to a folder with a video, and a html page with a video element that points to that video.

I wanted to test how many clients could stream the video at the same time. Once I hit 5 active players, the page will no longer load. So something tells me there's something somewhere that sets this limit. Can I change it anywhere?

Inrego
  • 1,524
  • 1
  • 15
  • 25
  • something isn't adding up. I cant imagine a limit of 5 concurrent connections. Are you sure you aren't hitting a bandwidth limit? Are all your clients on the same machine? Is that machine running at 100% on anything when this is going on? – Mike_G Jan 04 '17 at 16:26
  • I've tried both running the asp.net core application locally, in a local docker container, and in a docker container on a synology NAS. All cases show the same: When 5 windows are streaming the video, the page will not even load in the 6th window. And resources are not nearly maxed out in any case. – Inrego Jan 04 '17 at 16:29
  • I've edited my question to remove any mentions of docker. Since now I've reproduced it by just running asp.net core without any docker involved, so it's surely not a docker-related issue. – Inrego Jan 04 '17 at 16:30
  • is it possible that reading of the file is being blocked? I would try maybe using a diff video for each connection. I dunno man, I think concurrent connection limit is the last place id be looking. – Mike_G Jan 04 '17 at 16:33
  • I could try, but why would it block the page from loading? Shouldn't it just fail playing the video, but still load the html? I will create a sample app to showcase it and put on GitHub a bit later. – Inrego Jan 04 '17 at 16:35
  • ASP.NET Core isn't made for streaming videos at all, its made for Web or Rest services. You may need to create or get a middleware for streaming and TCP +http is rather badly suited for streaming stuff, there are other protocols for that. Look at SignalR for example, which is based on websockets for real-time communication between server and client and can handle 1000s or 10000s connections per physical server – Tseng Jan 04 '17 at 16:58
  • Are you using a single browser on a single machine to do this? Browsers usually have a limit for concurrent connections to a single host/IP. – Sami Kuhmonen Jan 04 '17 at 17:51
  • @SamiKuhmonen you were right. Thank you! It was Chrome. If I try to open more on different browsers/devices, there is no problem. – Inrego Jan 04 '17 at 18:17

1 Answers1

13

ASP.NET Core itself doesn't have limitations and the servers it is run on can handle a lot of connections. The problem is in how you test the server. Browsers have limits on how many connections they open concurrently to a single server. This is why manually testing with a single browser you will run into a situation where nothing is downloaded. This is to make sure a single browser won't bombard a server down with lots of connections.

You should use actual benchmarking tools to test the system since they don't have these limitations.

Sami Kuhmonen
  • 30,146
  • 9
  • 61
  • 74