Skip to content

Commit

Permalink
proxy: documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dormando committed Feb 18, 2022
1 parent 554a117 commit d85c379
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
18 changes: 18 additions & 0 deletions doc/protocol.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,15 @@ The arguments are:
address IP and port. Connection close events additionally supply a reason for
closing the connection.

- "proxycmds": Emits detailed timing logs about requests/responses being
returned to a client while in proxy mode. The conditions which logs are
written here may be influenced by configuration.

- "proxyevents": Emits internal proxy errors and system events, such as
configuration reloads.

- "proxyuser": Emits log entries created from lua configuration files.

Statistics
----------

Expand Down Expand Up @@ -1252,6 +1261,11 @@ integers separated by a colon (treat this as a floating point number).
| read_buf_bytes_free | 64u | Total read/resp buffer bytes cached |
| read_buf_oom | 64u | Connections closed by lack of memory |
| reserved_fds | 32u | Number of misc fds used internally |
| proxy_conn_requests | 64u | Number of requests received by the proxy |
| proxy_conn_errors | 64u | Number of internal errors from proxy |
| proxy_conn_oom | 64u | Number of out of memory errors while |
| | | serving proxy requests |
| proxy_req_active | 64u | Number of in-flight proxy requests |
| cmd_get | 64u | Cumulative number of retrieval reqs |
| cmd_set | 64u | Cumulative number of storage reqs |
| cmd_flush | 64u | Cumulative number of flush reqs |
Expand Down Expand Up @@ -1438,6 +1452,10 @@ other stats command.
| | bool | Does nothing as of 1.5.15 |
| drop_privileges | bool | If yes, and available, drop unused syscalls |
| | | (see seccomp on Linux, pledge on OpenBSD) |
| proxy_enabled | bool | If proxy has been configured at start |
| proxy_uring_enabled |
| bool | If proxy is configured to use IO_URING. |
| | NOTE: uring may be used if kernel too old |
| memory_file | char | Warm restart memory file path, if enabled |
|-------------------+----------+----------------------------------------------|

Expand Down
16 changes: 8 additions & 8 deletions memcached.c
Original file line number Diff line number Diff line change
Expand Up @@ -1792,6 +1792,14 @@ void server_stats(ADD_STAT add_stats, conn *c) {
APPEND_STAT("read_buf_bytes_free", "%llu", (unsigned long long)thread_stats.read_buf_bytes_free);
APPEND_STAT("read_buf_oom", "%llu", (unsigned long long)thread_stats.read_buf_oom);
APPEND_STAT("reserved_fds", "%u", stats_state.reserved_fds);
#ifdef PROXY
if (settings.proxy_enabled) {
APPEND_STAT("proxy_conn_requests", "%llu", (unsigned long long)thread_stats.proxy_conn_requests);
APPEND_STAT("proxy_conn_errors", "%llu", (unsigned long long)thread_stats.proxy_conn_errors);
APPEND_STAT("proxy_conn_oom", "%llu", (unsigned long long)thread_stats.proxy_conn_oom);
APPEND_STAT("proxy_req_active", "%llu", (unsigned long long)thread_stats.proxy_req_active);
}
#endif
APPEND_STAT("cmd_get", "%llu", (unsigned long long)thread_stats.get_cmds);
APPEND_STAT("cmd_set", "%llu", (unsigned long long)slab_stats.set_cmds);
APPEND_STAT("cmd_flush", "%llu", (unsigned long long)thread_stats.flush_cmds);
Expand All @@ -1810,14 +1818,6 @@ void server_stats(ADD_STAT add_stats, conn *c) {
APPEND_STAT("miss_from_extstore", "%llu", (unsigned long long)thread_stats.miss_from_extstore);
APPEND_STAT("badcrc_from_extstore", "%llu", (unsigned long long)thread_stats.badcrc_from_extstore);
}
#endif
#ifdef PROXY
if (settings.proxy_enabled) {
APPEND_STAT("proxy_conn_requests", "%llu", (unsigned long long)thread_stats.proxy_conn_requests);
APPEND_STAT("proxy_conn_errors", "%llu", (unsigned long long)thread_stats.proxy_conn_errors);
APPEND_STAT("proxy_conn_oom", "%llu", (unsigned long long)thread_stats.proxy_conn_oom);
APPEND_STAT("proxy_req_active", "%llu", (unsigned long long)thread_stats.proxy_req_active);
}
#endif
APPEND_STAT("delete_misses", "%llu", (unsigned long long)thread_stats.delete_misses);
APPEND_STAT("delete_hits", "%llu", (unsigned long long)slab_stats.delete_hits);
Expand Down

0 comments on commit d85c379

Please sign in to comment.