diff options
author | dormando <dormando@rydia.net> | 2023-01-13 15:22:26 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2023-02-24 17:43:54 -0800 |
commit | 6442017c545a2a5ad076697b8695cd64bd32b542 (patch) | |
tree | a95c5443a72f5cfbe5b1c32fe5cf552da3201b0c /thread.c | |
parent | 833a7234bbaed264a9973141850a23df4eb1b939 (diff) | |
download | memcached-6442017c545a2a5ad076697b8695cd64bd32b542.tar.gz |
proxy: allow workers to run IO optionally
`mcp.pool(p, { dist = etc, iothread = true }`
By default the IO thread is not used; instead a backend connection is
created for each worker thread. This can be overridden by setting
`iothread = true` when creating a pool.
`mcp.pool(p, { dist = etc, beprefix = "etc" }`
If a `beprefix` is added to pool arguments, it will create unique
backend connections for this pool. This allows you to create multiple
sockets per backend by making multiple pools with unique prefixes.
There are legitimate use cases for sharing backend connections across
different pools, which is why that is the default behavior.
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1091,6 +1091,7 @@ void memcached_thread_init(int nthreads, void *arg) { #ifdef EXTSTORE threads[i].storage = arg; #endif + threads[i].thread_baseid = i; setup_thread(&threads[i]); /* Reserve three fds for the libevent base, and two for the pipe */ stats_state.reserved_fds += 5; |