# RPC

HTTP RPC enables you to manage your Fluentd instance through HTTP endpoints. You can use this feature as a replacement of [Unix signals](/deployment/signals.md).

It is especially useful for environments where signals are not supported well e.g. Windows. This requires Fluentd to start not with `--no-supervisor` command-line option.

## Configuration

By default, HTTP RPC is not enabled. To use this feature, set the `rpc_endpoint` option:

```
<system>
  rpc_endpoint 127.0.0.1:24444
</system>
```

Now, you can manage your Fluentd instance using an HTTP client:

```
$ curl http://127.0.0.1:24444/api/plugins.flushBuffers
{"ok":true}
```

As evident from the output above, each endpoint returns a JSON object as its response.

## HTTP Endpoints

| Endpoint                                    |                                           Replacement of                                          |                           Description                           | Version |
| ------------------------------------------- | :-----------------------------------------------------------------------------------------------: | :-------------------------------------------------------------: | :-----: |
| `/api/processes.interruptWorkers`           |                         [SIGINT](/deployment/signals.md#sigint-or-sigterm)                        |                        Stops the daemon.                        |   v1.0  |
| `/api/processes.killWorkers`                |                        [SIGTERM](/deployment/signals.md#sigint-or-sigterm)                        |                        Stops the daemon.                        |   v1.0  |
| `/api/processes.zeroDowntimeRestart`        |                             [SIGUSR2](/deployment/signals.md#sigusr2)                             | Restarts Fluentd with zero-downtime. (Not supported on Windows) |  v1.18  |
| `/api/processes.flushBuffersAndKillWorkers` | [SIGUSR1](/deployment/signals.md#sigusr1) and [SIGTERM](/deployment/signals.md#sigint-or-sigterm) |               Flushes buffer and stops the daemon.              |   v1.0  |
| `/api/plugins.flushBuffers`                 |                             [SIGUSR1](/deployment/signals.md#sigusr1)                             |                  Flushes the buffered messages.                 |   v1.0  |
| `/api/config.reload`                        |                              [SIGHUP](/deployment/signals.md#sighup)                              |                      Reloads configuration.                     |   v1.0  |
| `/api/config.gracefulReload`                |                                                ---                                                |                      Reloads configuration.                     |   v1.9  |

Appendix:

* `/api/config.gracefulReload`: This is the replacement of `SIGUSR2` before v1.18. Please use `/api/processes.zeroDowntimeRestart` or `/api/config.reload` unless there is a special reason. See [SIGUSR2](/deployment/signals.md#sigusr2) for details.

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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fluentd.org/deployment/rpc.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
