A stateless app can always handle kill -9?
Yes. But even a stateless app handles connections from the outside (or it would do nothing, really!). That is the issue here. If your app, say, some HTTP server that only serves static files, and is thus stateless, were to be routinely killed with -9, then ever so often, you would kill it with an active connection. So your customer would get some HTTP error code. In the best case, it is an unimportant small image and he doesn't even notice; in the worst case, it is your main .js
or .css
file and he will indeed notice badly.
So, by using a weaker signal, you give your stateless app the chance to finish the current request before shutting down.
Obviously, you can finish it off with -9 if it does not go away after a second or two (or however long you wish to give it time to end its business).