Restrict download file bandwidth/speed in Servlet

后端 未结 2 984
小鲜肉
小鲜肉 2020-12-15 12:27

we got high-load java application which works in clustered mode.

I need to add ability to download and upload files for our customers. For storing files i\'m going

2条回答
  •  一整个雨季
    2020-12-15 12:54

    Also I'm afraid, that users can create a lot of concurent threads during download and it can hurt performance.

    Could it be an issue for servlet container ?

    Yes, it could.

    If it could be an issue, how can it be avoided ? probably using nio ?

    NIO won't help per se. It certainly won't prevent the low-bandwidth responses tying up threads for long periods of time.

    I think what you would need to do is to implement downloads in a special web container. I'm not sure, but I think that Servlet 3.0 with async mode might do the trick.

提交回复
热议问题