What happens when Tomcat fails during the upload process. Will it simply throw a 50X error. Is it possible to gracefully handle the server failure and forward the rest of the request to a different server.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t know about tomcat specifically, but this is a TCP connection. If the upload fails, then the TCP connection would drop. The client would cease the upload.
If the client has retry capabilities that allow it to restart an upload at a given position in the file, then it could be restarted with a new server. In general this is not a common capability of web clients, many sites with large file upload have flash clients that integrate upload resumption.
If you want to do this with more transparency, then you can have a web frontend that watches the TCP streams and maintains TCP state. If it observes a failure, it could transfer that state to a new server, and pass the stream to it to continue the upload as if the TCP stream was never broken in the first place.
It isn’t trivial though, and does introduce a new point of failure. The main advantage is it’ll work with any client, as long as the client doesn’t drop the connection (it can only resolve server failures on your side, not resume downloads broken at the client side)
-Adam