-
In nats streaming we can remove a node by sending a NATS message to _STAN.raft..node.remove with the payload being the node ID we want to remove. like nats-io/nats-streaming-server#1166 how can be we do same in nats-server with jetstream? I do see some conversation around it #338 however it does not provide concrete answer. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can send the process of the nats-server a "lame duck" signal telling it to shut down in an orderly manner (e.g. |
Beta Was this translation helpful? Give feedback.
You can send the process of the nats-server a "lame duck" signal telling it to shut down in an orderly manner (e.g.
nats-server --signal ldm
), but JetStream still retains the server in it's metadata (meaning it's expecting it to come back to the cluster at some point in the future), if you want to remove the server 'forever' you can then use thenats
CLI tool to issue a 'peer remove' command for the cluster to permanently remove the server from the cluster metadata (e.g.nats server raft peer-remove
which you will have to do using the system account).To see what actual control message is being sent to the cluster to do that peer remove add the
--trace
option to yournats
command.