Ulf Dittmer wrote:None. WS are not made to handle large chunks of data. There are, on the other hand, a number of options that are better suited to that task,like FTP, SFTP, or even straight HTTP. You can still use a WS for communicating the details needed to access the file, though.
So after conversation with our network admin, we decided to use HTTPS. Now I have few more issues. We are going to have
Tomcat clustering (i.e. multiple tomcat instance). Now typical URL to access the file would be
https://www.mycompany.com/appname/.../video/<filename>. Obviously, video folder would be under webapps folder under tomcat. Now consider this scenario,
- First Request comes to server on tomcat instance 1 to download xyz.mov file. Server pulls it from database and saves it under webapps/.../video/ folder. And send OK response to caller.
- Caller sends another request (
https://www.mycompany.com/appname/.../video/xyz.mov) to download the file which goes to say tomcat instance 2 because of load balancing. and it won't find the xyz.mov file there.
How do I resolve this issue? Please let me know if I am not enough clear.