Giter Site home page Giter Site logo

Graceful Stop about sebak HOT 6 CLOSED

bosnet avatar bosnet commented on June 8, 2024
Graceful Stop

from sebak.

Comments (6)

anarcher avatar anarcher commented on June 8, 2024 1

I will figure out https://github.com/facebookgo/grace and something else. :-)
IMHO, https://github.com/oklog/run can be useful for this purpose.

from sebak.

anarcher avatar anarcher commented on June 8, 2024 1

"facebookgo/grace" has an interesting feature to restart without dropping any connections.
The working processes are like below:

  • Fork a new process which inherits the listening socket.
  • the child process performs initialization and starts accepting connections on the socket.
  • the child sends a signal to the parent to stop accepting connections and terminate.

That feature looks like great, but we get two node process (old and new) at some time).

I have a question about 'graceful restart' is necessary? Instead, I think 'graceful stop' is necessary.

When a node is terminating, Clean up (disconnecting) network connections and stop terminating and waiting (with timeout) for processing tasks.

What do you think?

from sebak.

spikeekips avatar spikeekips commented on June 8, 2024 1

@anarcher It will be unnecessary for receiving message from client, because it does not need to keep connection, and the other cases like 'event-stream' can be ignored. As you suggested, 'graceful stop' will be good.

from sebak.

Geod24 avatar Geod24 commented on June 8, 2024

I have a question about 'graceful restart' is necessary? Instead, I think 'graceful stop' is necessary.

I'm wondering that too. I don't see much value in implementing graceful restart in app. Graceful stop is a nice feature though.

from sebak.

spikeekips avatar spikeekips commented on June 8, 2024

@anarcher At first, the reason for 'graceful restart' was that the node needed to be restarted to update new version or new validator list, or anything else to be applied new environments.

from sebak.

anarcher avatar anarcher commented on June 8, 2024

I'm wondering that too. I don't see much value in implementing graceful restart in app. Graceful stop is a nice feature though.

@Geod24 I agree with your opinion! :-)

@anarcher At first, the reason for 'graceful restart' was that the node needed to be restarted to update new version or new validator list, or anything else to be applied new environments.

IHMO, 'graceful restart' without dropping any connections (facebookgo/grace) is not suitable for node.

For changing validator list, we should stop and start a node with the new validator CLI arguments.
At some time, If old node process and new node process tries to access same leveldb, one of them get a failure to connect.

I feel safe to stop and start a node but, with graceful stop :-)
So, I would like to change this issues title 'Graceful Stop' :-)

from sebak.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.