we've a three nodes cluster, and every once in a while we need to restart services or nodes to perform updates.
We'd like to perform such activity in a graceful manner, waiting that current in-flight requests complete, and at the same time by not accepting new requests.
I've googled a lot, I've only found a way to do that using a Cluster interface using a function to stop routing. But we do not use any cluster interface and I'm interested in knowing the curl command to perform such action.
Can you help?
What happens internally when I run systemctl stop elasticsearch? does it wait that current requests complete? I've found several 5xx errors in the application during es restarts, I'm not sure that is a "gentle" stop
I would do the same using curl. Basically I'm looking at a clean way to make maintenance on a node, waiting that current pending requests complete before stopping it (in the meantime no new requests should be accepted).
no plan to introduce a graceful stop of the service? Basically a service stop command that would stop accepting new requests while waiting some seconds to complete those already started before the stop? Like php-fpm