This series is about how connections are kept alive between different components along the route.
Browser - Load Balancer - Web Server - mod jk - Tomcat
Part 1 : Browser - Load Balancer.
Part 2 : Load Balancer - Apache HTTP Server
Part 3 : Apache HTTP Server - Mod jk
Part 4 : Mod jk - Tomcat
Apache Web Server - Mod jk
Does mod_jk changes how Apache web server handles its connection with the clients?
Mod jk is a module that runs within the Apache web server. Apache web server will manage the connections between itself and the clients, usually web browsers or a load balancer, and pass the request to a chain of modules.
Using the example described in an Apache module tutorial, a module will register a hook with the web server and the web server will pass a request_rec to the module.
//register the hook
static void mod_tut1_register_hooks (apr_pool_t *p)
{
ap_hook_handler(mod_tut1_method_handler, NULL, NULL, APR_HOOK_LAST);
}
{
ap_hook_handler(mod_tut1_method_handler, NULL, NULL, APR_HOOK_LAST);
}
//The hook takes a parameter as request_rec
static int mod_tut1_method_handler (request_rec *r){
fprintf(stderr,"apache2_mod_tut1: A request was made.\n");
fflush(stderr);
return DECLINED;
}
No comments:
Post a Comment