diff options
author | dormando <dormando@rydia.net> | 2023-01-31 17:20:30 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2023-02-01 14:28:29 -0800 |
commit | 58d8f40a90ee22d78adc0ae99f4b915e65f69be6 (patch) | |
tree | 4516a274f0f4a692db97ed235f400c4123534092 /proxy.h | |
parent | 0d8ebbfb823c94e5ce68550c9ae186d8af789446 (diff) | |
download | memcached-58d8f40a90ee22d78adc0ae99f4b915e65f69be6.tar.gz |
proxy: add mcp.backend(t) for more overrides
ie:
local b1 = mcp.backend({ label = "b1", host = "127.0.0.1", port = 11511,
connecttimeout = 1, retrytimeout = 0.5, readtimeout = 0.1,
failurelimit = 11 })
... to allow for overriding connect/retry/etc tunables on a per-backend
basis. If not passed in the global settings are used.
Diffstat (limited to 'proxy.h')
-rw-r--r-- | proxy.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -308,6 +308,7 @@ struct mcp_backend_label_s { char port[MAX_PORTLEN+1]; char label[MAX_LABELLEN+1]; size_t llen; // cache label length for small speedup in pool creation. + struct proxy_tunables tunables; }; // lua object wrapper meant to own a malloc'ed conn structure @@ -333,6 +334,7 @@ struct mcp_backend_s { char *rbuf; // statically allocated read buffer. size_t rbufused; // currently active bytes in the buffer struct event event; // libevent + struct proxy_tunables tunables; #ifdef HAVE_LIBURING proxy_event_t ur_rd_ev; // liburing. proxy_event_t ur_wr_ev; // need a separate event/cb for writing/polling @@ -357,13 +359,11 @@ struct proxy_event_thread_s { pthread_t thread_id; struct event_base *base; struct event notify_event; // listen event for the notify pipe/eventfd. - struct event clock_event; // timer for updating event thread data. struct event beconn_event; // listener for backends in connect state #ifdef HAVE_LIBURING struct io_uring ring; proxy_event_t ur_notify_event; // listen on eventfd. proxy_event_t ur_benotify_event; // listen on eventfd for backend connections. - proxy_event_t ur_clock_event; // timer for updating event thread data. eventfd_t event_counter; eventfd_t beevent_counter; bool use_uring; @@ -383,7 +383,6 @@ struct proxy_event_thread_s { int be_notify_send_fd; #endif proxy_ctx_t *ctx; // main context. - struct proxy_tunables tunables; // periodically copied from main ctx }; enum mcp_resp_mode { |