Lines Matching defs:worker
26 proxy_worker *worker, server_rec *s) = NULL;
31 * lbfactor is "how much we expect this worker to work", or "the worker's
34 * lbstatus is "how urgent this worker has to work to fulfill its quota
37 * We distribute each worker's work quota to the worker, and then look
39 * worker is then selected for work, and its lbstatus reduced by the
48 * worker a b c d
57 * worker a b c d
63 * worker a b c d
79 proxy_worker **worker;
103 worker = (proxy_worker **)balancer->workers->elts;
104 for (i = 0; i < balancer->workers->nelts; i++, worker++) {
106 if ((*worker)->s->lbset > max_lbset)
107 max_lbset = (*worker)->s->lbset;
110 ((*worker)->s->lbset != cur_lbset) ||
111 (checking_standby ? !PROXY_WORKER_IS_STANDBY(*worker) : PROXY_WORKER_IS_STANDBY(*worker)) ||
112 (PROXY_WORKER_IS_DRAINING(*worker))
117 /* If the worker is in error state run
118 * retry on that worker. It will be marked as
120 * The worker might still be unusable, but we try
123 if (!PROXY_WORKER_IS_USABLE(*worker))
124 ap_proxy_retry_worker_fn("BALANCER", *worker, r->server);
128 if (PROXY_WORKER_IS_USABLE(*worker)) {
129 (*worker)->s->lbstatus += (*worker)->s->lbfactor;
130 total_factor += (*worker)->s->lbfactor;
131 if (!mycandidate || (*worker)->s->lbstatus > mycandidate->s->lbstatus)
132 mycandidate = *worker;
143 "proxy: byrequests selected worker \"%s\" : busy %" APR_SIZE_T_FMT " : lbstatus %d",
155 proxy_worker **worker;
156 worker = (proxy_worker **)balancer->workers->elts;
157 for (i = 0; i < balancer->workers->nelts; i++, worker++) {
158 (*worker)->s->lbstatus = 0;
170 * 1. Create func which determines "best" candidate worker