Comments (6)
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.
"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.
@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.
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.
@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.
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)
- create_account operation is not always included in the get operations for transaction API endpoint HOT 2
- Log rotating HTTP log HOT 4
- Change key value of NewBlockOperationFrozenLinkedKey
- [Proposal] API endpoint to get operation details by hash HOT 1
- Retry when ballot sending fails HOT 1
- Consensus stuck after recovering enough validators HOT 2
- Memo in Payable Operations
- Broken dump from jsonrpc HOT 2
- Initial validation process for BlockOpertion takes too long
- Node discovered, but failed to connect
- fetcher add tx to si.Bts repeatedly
- Watcher Error: "unfreezing must be generated after the unfreezing request" HOT 5
- How to handle the stopped consensus for a long time HOT 6
- Block is missing, starting sebak is hang
- Use Server Sent Event for integration tests
- Separating API parts from SEBAK HOT 1
- read udp error in TimeSync HOT 6
- Check the process of signing an expired ballot in detail
- Requesting operations for an account sometimes returns a different amount of results for the same request
- Change NTP to Secure NTP
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sebak.