For me, the obvious way would be to tell you about haproxy that you want to stop sending requests to the server, and then stop the server itself, and not vice versa.
I am wondering why you want to stop the server first and then put it in maint? If you do this like this, some requests will be sent to your node until it is known that it is gone. I believe that you can configure haproxy to resubmit these missed calls; therefore, at best, you have several queries that are slightly slower, at worst, you have missed requests.
There is no specific flaw that I can see with setting it up in maint mode first so that I do not consider another option personally.
Nanne source share