I am making a Web Service that implements a function that takes input parameters and stores them in database. (The code is in Java, written using NetBeans IDE, deployed on WebLogic server.) Something like this:
@WebService
class DataSaver {
void saveData( ...data... ) {
...
}
}
It's already completed and it seems to work correctly, so now I am concerned about safety:
What happens if too many clients would connect at the same time (or someone would do a Denial-of-Service attack on my site), so the server would not be able to correctly process all the requests?
1) I would prefer if the server/application does not crash. What mechanisms are there to send away the request in case of overload? Are they enabled by default? If not, how do I turn them on?
2) Since the web service function does not return a value (and I would prefer to keep its code as it is now, if possible), the clients can tell the difference between processed and unprocessed request only by HTTP error code. So I would prefer the solution to return a HTTP error code in case of overload.
I am not very familiar with Web Services and performance tuning (I am more of a theoretical programmer; algorithms and stuff), so I don't even know what to look for. Solving this problem in Java seems to me too late -- when the message gets to my code, the XML request was already parsed. I would expect some parameter in server configuration to handle this; but I did not succeed to find it by Google or reading a WebLogic manual. Perhaps I am using the wrong keywords, or I have a completely wrong idea how to approach this problem... which is why a partial answer could also be very useful.