Apache HTTPD
Functions | Variables
mod_proxy_balancer.c File Reference
#include "mod_proxy.h"
#include "proxy_util.h"
#include "scoreboard.h"
#include "ap_mpm.h"
#include "apr_version.h"
#include "ap_hooks.h"
#include "apr_date.h"
#include "util_md5.h"
#include "mod_watchdog.h"

Go to the source code of this file.

Functions

static int balancer_pre_config (apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
 
static int proxy_balancer_canon (request_rec *r, char *url)
 
static void init_balancer_members (apr_pool_t *p, server_rec *s, proxy_balancer *balancer)
 
static charget_path_param (apr_pool_t *pool, char *url, const char *name, int scolon_sep)
 
static charget_cookie_param (request_rec *r, const char *name)
 
static proxy_workerfind_route_worker (proxy_balancer *balancer, const char *route, request_rec *r, int recursion)
 
static proxy_workerfind_session_route (proxy_balancer *balancer, request_rec *r, char **route, const char **sticky_used, char **url)
 
static proxy_workerfind_best_worker (proxy_balancer *balancer, request_rec *r)
 
static int balancer_fixup (request_rec *r, proxy_worker *worker, char **url)
 
static void force_recovery (proxy_balancer *balancer, server_rec *s)
 
static apr_status_t decrement_busy_count (void *worker_)
 
static int proxy_balancer_pre_request (proxy_worker **worker, proxy_balancer **balancer, request_rec *r, proxy_server_conf *conf, char **url)
 
static int proxy_balancer_post_request (proxy_worker *worker, proxy_balancer *balancer, request_rec *r, proxy_server_conf *conf)
 
static void recalc_factors (proxy_balancer *balancer)
 
static apr_status_t lock_remove (void *data)
 
static const charmake_server_id (server_rec *s, apr_pool_t *p, int full)
 
static apr_array_header_tmake_servers_ids (server_rec *main_s, apr_pool_t *p)
 
static int balancer_post_config (apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
 
static void create_radio (const char *name, unsigned int flag, request_rec *r)
 
static void push2table (const char *input, apr_table_t *params, const char *allowed[], apr_pool_t *p)
 
static int safe_referer (request_rec *r, const char *ref)
 
static int balancer_process_balancer_worker (request_rec *r, proxy_server_conf *conf, proxy_balancer *bsel, proxy_worker *wsel, apr_table_t *params)
 
static apr_status_t balancer_manage (request_rec *r, apr_table_t *params)
 
static void balancer_display_page (request_rec *r, proxy_server_conf *conf, proxy_balancer *bsel, proxy_worker *wsel, int usexml)
 
static int balancer_handler (request_rec *r)
 
static void balancer_child_init (apr_pool_t *p, server_rec *s)
 
static void ap_proxy_balancer_register_hook (apr_pool_t *p)
 

Variables

static const charbalancer_mutex_type = "proxy-balancer-shm"
 
ap_slotmem_provider_tstorage = NULL
 
static apr_OFN_set_worker_hc_param_tset_worker_hc_param_f = NULL
 
static int(* ap_proxy_retry_worker_fn )(const char *proxy_function, proxy_worker *worker, server_rec *s) = NULL
 
static apr_OFN_hc_show_exprs_thc_show_exprs_f = NULL
 
static apr_OFN_hc_select_exprs_thc_select_exprs_f = NULL
 
static apr_OFN_hc_valid_expr_thc_valid_expr_f = NULL
 
static int *const aplog_module_index = &( proxy_balancer_module.module_index)
 

Function Documentation

◆ ap_proxy_balancer_register_hook()

static void ap_proxy_balancer_register_hook ( apr_pool_t p)
static

Definition at line 2038 of file mod_proxy_balancer.c.

◆ balancer_child_init()

static void balancer_child_init ( apr_pool_t p,
server_rec s 
)
static

Definition at line 2002 of file mod_proxy_balancer.c.

◆ balancer_display_page()

static void balancer_display_page ( request_rec r,
proxy_server_conf conf,
proxy_balancer bsel,
proxy_worker wsel,
int  usexml 
)
static

Definition at line 1423 of file mod_proxy_balancer.c.

◆ balancer_fixup()

static int balancer_fixup ( request_rec r,
proxy_worker worker,
char **  url 
)
static

< Module has handled this stage.

Definition at line 393 of file mod_proxy_balancer.c.

◆ balancer_handler()

static int balancer_handler ( request_rec r)
static

< Module declines to handle

RFC 2616: HTTP

RFC 2616: HTTP

< Module declines to handle

RFC 2616: HTTP

< Module has served the response completely * - it's safe to die() with no more output

Definition at line 1892 of file mod_proxy_balancer.c.

◆ balancer_manage()

static apr_status_t balancer_manage ( request_rec r,
apr_table_t params 
)
static

Definition at line 1387 of file mod_proxy_balancer.c.

◆ balancer_post_config()

static int balancer_post_config ( apr_pool_t pconf,
apr_pool_t plog,
apr_pool_t ptemp,
server_rec s 
)
static

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

Definition at line 848 of file mod_proxy_balancer.c.

◆ balancer_pre_config()

static int balancer_pre_config ( apr_pool_t pconf,
apr_pool_t plog,
apr_pool_t ptemp 
)
static

< Module has handled this stage.

Definition at line 48 of file mod_proxy_balancer.c.

◆ balancer_process_balancer_worker()

static int balancer_process_balancer_worker ( request_rec r,
proxy_server_conf conf,
proxy_balancer bsel,
proxy_worker wsel,
apr_table_t params 
)
static

Definition at line 1117 of file mod_proxy_balancer.c.

◆ create_radio()

static void create_radio ( const char name,
unsigned int  flag,
request_rec r 
)
static

Definition at line 1047 of file mod_proxy_balancer.c.

◆ decrement_busy_count()

static apr_status_t decrement_busy_count ( void *  worker_)
static

Definition at line 450 of file mod_proxy_balancer.c.

◆ find_best_worker()

static proxy_worker * find_best_worker ( proxy_balancer balancer,
request_rec r 
)
static

Definition at line 328 of file mod_proxy_balancer.c.

◆ find_route_worker()

static proxy_worker * find_route_worker ( proxy_balancer balancer,
const char route,
request_rec r,
int  recursion 
)
static

Definition at line 201 of file mod_proxy_balancer.c.

◆ find_session_route()

static proxy_worker * find_session_route ( proxy_balancer balancer,
request_rec r,
char **  route,
const char **  sticky_used,
char **  url 
)
static

Definition at line 272 of file mod_proxy_balancer.c.

◆ force_recovery()

static void force_recovery ( proxy_balancer balancer,
server_rec s 
)
static

Definition at line 414 of file mod_proxy_balancer.c.

◆ get_cookie_param()

static char * get_cookie_param ( request_rec r,
const char name 
)
static

Definition at line 165 of file mod_proxy_balancer.c.

◆ get_path_param()

static char * get_path_param ( apr_pool_t pool,
char url,
const char name,
int  scolon_sep 
)
static

Definition at line 139 of file mod_proxy_balancer.c.

◆ init_balancer_members()

static void init_balancer_members ( apr_pool_t p,
server_rec s,
proxy_balancer balancer 
)
static

Definition at line 106 of file mod_proxy_balancer.c.

◆ lock_remove()

static apr_status_t lock_remove ( void *  data)
static

Definition at line 718 of file mod_proxy_balancer.c.

◆ make_server_id()

static const char * make_server_id ( server_rec s,
apr_pool_t p,
int  full 
)
static

Definition at line 741 of file mod_proxy_balancer.c.

◆ make_servers_ids()

static apr_array_header_t * make_servers_ids ( server_rec main_s,
apr_pool_t p 
)
static

Definition at line 803 of file mod_proxy_balancer.c.

◆ proxy_balancer_canon()

static int proxy_balancer_canon ( request_rec r,
char url 
)
static

< Module declines to handle

< Module has handled this stage.

Definition at line 71 of file mod_proxy_balancer.c.

◆ proxy_balancer_post_request()

static int proxy_balancer_post_request ( proxy_worker worker,
proxy_balancer balancer,
request_rec r,
proxy_server_conf conf 
)
static

< Module has handled this stage.

Definition at line 638 of file mod_proxy_balancer.c.

◆ proxy_balancer_pre_request()

static int proxy_balancer_pre_request ( proxy_worker **  worker,
proxy_balancer **  balancer,
request_rec r,
proxy_server_conf conf,
char **  url 
)
static

< Module declines to handle

Definition at line 461 of file mod_proxy_balancer.c.

◆ push2table()

static void push2table ( const char input,
apr_table_t params,
const char allowed[],
apr_pool_t p 
)
static

Definition at line 1058 of file mod_proxy_balancer.c.

◆ recalc_factors()

static void recalc_factors ( proxy_balancer balancer)
static

Definition at line 697 of file mod_proxy_balancer.c.

◆ safe_referer()

static int safe_referer ( request_rec r,
const char ref 
)
static

Definition at line 1102 of file mod_proxy_balancer.c.

Variable Documentation

◆ ap_proxy_retry_worker_fn

int(* ap_proxy_retry_worker_fn) (const char *proxy_function, proxy_worker *worker, server_rec *s) ( const char proxy_function,
proxy_worker worker,
server_rec s 
) = NULL
static

Definition at line 36 of file mod_proxy_balancer.c.

◆ aplog_module_index

int* const aplog_module_index = &( proxy_balancer_module.module_index)
static

Definition at line 2057 of file mod_proxy_balancer.c.

◆ balancer_mutex_type

const char* balancer_mutex_type = "proxy-balancer-shm"
static

Definition at line 29 of file mod_proxy_balancer.c.

◆ hc_select_exprs_f

apr_OFN_hc_select_exprs_t* hc_select_exprs_f = NULL
static

Definition at line 40 of file mod_proxy_balancer.c.

◆ hc_show_exprs_f

apr_OFN_hc_show_exprs_t* hc_show_exprs_f = NULL
static

Definition at line 39 of file mod_proxy_balancer.c.

◆ hc_valid_expr_f

apr_OFN_hc_valid_expr_t* hc_valid_expr_f = NULL
static

Definition at line 41 of file mod_proxy_balancer.c.

◆ set_worker_hc_param_f

apr_OFN_set_worker_hc_param_t* set_worker_hc_param_f = NULL
static

Definition at line 34 of file mod_proxy_balancer.c.

◆ storage

Definition at line 30 of file mod_proxy_balancer.c.