-
Notifications
You must be signed in to change notification settings - Fork 134
zero-downtime restart: add initial document #528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4635f5e
zero-downtime restart: add initial document
daipom 3682fdd
Update deployment/signals.md
daipom 03e1b03
rpc: add version info to the table
daipom 7ef42f2
Update plugin-development/api-plugin-input.md
daipom 17d3134
zero-downtime-restart: improve explanation about temporal buffer
daipom f89abd5
Improve explanation of zero-downtime restart
daipom 504a841
Update deployment/signals.md
daipom eb7fe77
improve explanation of zero-downtime restart
daipom 274e073
Improve explanation of zero-downtime restart
daipom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # Zero-downtime restart | ||
|
|
||
| This feature allows a complete restart of Fluentd without bringing down some input plugins. | ||
|
|
||
| Supported standard input plugins are as follows. | ||
|
|
||
| | supported input plugin | version | | ||
| | :--- | :--- | | ||
| | in_udp | v1.18.0 | | ||
| | in_tcp | v1.18.0 | | ||
| | in_syslog | v1.18.0 | | ||
|
|
||
| If these input plugins are down, client applications may fail to send data. | ||
| If that client does not have a resend feature, the data will be lost. | ||
|
|
||
| You can use this feature to completely restart Fluentd without losing data for these plugins. | ||
|
|
||
| ## How to use this feature | ||
|
|
||
| You can use this feature in the following ways. | ||
|
|
||
| * [Signals - SIGUSR2](signals.md#sigusr2) | ||
| * [RPC](rpc.md) | ||
|
|
||
| ## Mechanism of zero-downtime restart | ||
|
|
||
|  | ||
|
|
||
| 1. The old supervisor receives `SIGUSR2`. | ||
| 2. Spawn a new supervisor. | ||
| 3. Take over shared sockets. | ||
| 4. Launch new workers, and stop old processes in parallel. | ||
| * Launch new workers with [Source Only Mode](source-only-mode.md). | ||
| * In addition to source-only mode, further limit the starting pluings to only those that support this feature. | ||
| * Data received by the new workers are stored in the temporary buffer of source-only mode. | ||
| * Send `SIGTERM` to the old supervisor after `10s` delay. | ||
| 5. The old supervisor stops and sends `SIGWINCH` to the new one. | ||
| 6. The new workers starts to run fully. | ||
| * The temporary buffer of source-only mode starts to load. | ||
|
|
||
| You can configure the temporary buffer. | ||
kenhys marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| See [Source Only Mode](source-only-mode.md) for details. | ||
|
|
||
| ## Plugins: how to support this feature | ||
|
|
||
| See [How to Write Input Plugin - zero_downtime_restart_ready?](../plugin-development/api-plugin-input.md#zero_downtime_restart_ready). | ||
|
|
||
| If this article is incorrect or outdated, or omits critical information, please [let us know](https://github.com/fluent/fluentd-docs-gitbook/issues?state=open). [Fluentd](http://www.fluentd.org/) is an open-source project under [Cloud Native Computing Foundation \(CNCF\)](https://cncf.io/). All components are available under the Apache 2 License. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.