Hello,
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
It's not clear what you mean here, and sharing what you have found and where will help us guide you.
It tells Elasticsearch to stop and it'll start to shutdown with no regards to what is happening on that node.
That's because in a distributed system you can never guarantee that the node you are talking to will be available, so your code should be able to handle this and retry if needed.
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).
Hello,
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
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.