Re: Add new comfiguration paeametr to httpd.conf
yes, dynamic load balancing module for Apache -Tomcat integration but still it has some problems. Any way I need user to set some parameters from httpd.conf . I dont know how to do it?. Can any body help me?. Iroshan
Add new comfiguration paeametr to httpd.conf
Hi all, I have developed a new Apache module. I want to put some parameter at httpd.conf . How can I add new a parameter for httpd.conf?. Iroshan
process creation in side a module
Hi All, I tried to open TCP socket in side a new apache module the socket should live for ever. I used new apr thread to create this socket . But Thread is terminate after the execute of my hook function and the socket also close with it. Then I uses a new process to create live tcp socket insted of thread. its working nicly. Is there is any draw back ,if we create new process in side a module?. Best Regards, Iroshan
Re: Add a new property for proxy_worker in mod_proxy.h
Hi All, Actualy I think my qustion was not very clear. I need to add a new variable to the proxy_worker struct as follow. I added a variable MyValue and compile the mod_proxy_balancer with apxs tool. Mosule compiled without any error. But cannot start the server it logs [Fri Jul 10 04:16:54 2009] [notice] child pid 15651 exit signal Segmentation fault (11) in error.log please help me to solve this struct proxy_worker { int id; /* scoreboard id */ apr_interval_time_t retry; /* retry interval */ int lbfactor; /* initial load balancing factor */ const char *name; const char *scheme;/* scheme to use ajp|http|https */ const char *hostname; /* remote backend address */ int MyValue ; . . Thank You , Iroshan
Re: Add a new property for proxy_worker in mod_proxy.h
Sorry for my first mail. By mistakenly half typed mail was sent to the mailing list. Actually I need to add another property variable for proxy_worker. I did it as follow struct proxy_worker { int id; /* scoreboard id */ apr_interval_time_t retry; /* retry interval */ int lbfactor; /* initial load balancing factor */ const char *name; const char *scheme;/* scheme to use ajp|http|https */ const char *hostname; /* remote backend address */ int MyValue . . But when load balancer manager with newly added property it never load. How can I add a new property value for proxy_worker definition. Please Help me Iroshan.
Add a new property for proxy_worker in mod_proxy.h
Hi All, I need to add another property variable for proxy_worker. I did it as follow struct proxy_worker { int id; /* scoreboard id */ apr_interval_time_t retry; /* retry interval */ int lbfactor; /* initial load balancing factor */ const char *name; const char *scheme;/* scheme to use ajp|http|https */ const char *hostname; /* remote backend address */ int MyValue . .
new Hook doesn't work
Hi All, I created a new hook for some additional task in mod_proxy_balancer .I clearly followed the steps at http://213.11.80.10/manual/developer/hooks.html . I register my Hook as follows static void ap_proxy_balancer_register_hook(apr_pool_t *p) { //additional code goes here proxy_hook_my_request(proxy_balancer_my_request, NULL, NULL, APR_HOOK_MIDDLE); } By using apxs tool this module and mod_proxy module can compile without any error. When my server runs, the proxy_balancer_my_request function never execute and all the other hooks execute there functions without any problem. Even there is no any error message in error log also. I want to know why this proxy_balancer_my_reques function never execute? Please Help me Iroshan.
Re: Creating a new thread inside a module
Hi All, I am still unable to create a new thread inside the balancer_init function. Here the way that I tried. But in this way new thread was created and it terminate after the balancer_init function finish its context. I want run this new thread for ever until the server stop. Please help me to solve this problem... static int balancer_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { apr_status_t rv; apr_thread_t *tp; apr_threadattr_t *thd_attr; rv =apr_thread_create(&tp, thd_attr, doit, ptemp, p); apr_thread_detach(tp); //do some thing here // // return 0; } here is the function passes for creation new thread static void* APR_THREAD_FUNC doit(apr_thread_t *thread, void *data) { while(1){ printf("ok"); //do some thing here } } Iroshan.
Re: Creating a new thread inside a module
Hi William and Mladen, Thanks both of you but i am still struggling with my thread creation. I create my background thread inside the balancer_init method at mod_proxy_balancer module. But after finished the execution of balancer_init method my thread also terminate automatically please help me Iroshan.
Re: Creating a new thread inside a module
Hi Mladen Turk, Thank you very much. I roughly gone throug the mod_watchdog. I create my background thread inside the balancer_init method at mod_proxy_balancer module. But after finished the execution of balancer_init method my thread also terminate automatically. Do you or any body have idea to avoid this. I need to run my background thread until the server stop by user. Best Regards, Iroshan.
Re: Creating a new thread inside a module
Hi All Actually I need *to* modify *Apache* and *run* one custom background *thread *. In addition, my custom modules have *to* be able *to* access the shared memory and it should be done through the background *thread*. Did anybody do this before? Is *there* an example I can use as a starting point? please help me. Best Regards, Iroshan Under graduate UCSC Sri Lanka.
Re: Creating a new thread inside a module
Hi Mladen Turk, Thank you .In Apache 2.2.x trunk there is no such a module mod_watchdog. Is this is from later version?. Can I compile this in DSO mode with mod_proxy_balancer.? Help me Iroshan. > Take a look at trunk's mod_watchdog. > It should compile with 2.2 without a problem. > However it requires to be statically compiled so it > can survive the child death. > > If that's not feasible, hack it ;) > > > Regards > -- > ^(TM) >
Creating a new thread inside a module
Hi All, I want to open a port to communicate my Apache hhtpd (2.2) with small software run on a separate machine .Without affecting the httpd how can i create a new thread to listen to that software. Also I want to start this thread when the mod_proxy_balancer is initialize its balancer members(balancer_init). please helpp me, thank you, Iroshan Under graduate-UCSC Ari Lanka
Re: build mod_proxy by source
hi Kevac Marko, apxs -c -o mod_proxy.so mod_proxy.c proxy_util.c above command not generate mod_proxy.so . Please help me Regards Iroshan
Re: build mod_proxy by source
hi Kevac Marko, Thank you very much.
build mod_proxy by source
Hi All, I need to build mod_proxy by source rather than enable in the configuration. I dont know how to build it by apxs as it has two dependent files (proxy_util.c and mod_proxy.c) .Please help me to over come this problem. Best Regards, Iroshan Under Graduate-UCSC Sri Lanka
Re: mod_proxy_balancer dynamic change properties
Hi jean-frederic clere, Thanks lot, Is there any technical documentation for these modules,Such as mod_cluster,mod_proxy_balaner. Regards, Iroshan
Re: mod_proxy_balancer dynamic change properties
Hi kevac Marko, Thank you very much .I just want to do the same thing here. My workers are Tomcat and I am going to change lbfactor according to there Memory usage.Can we use normal socket connection to retrieve information from the workers or is there any simple way to communicate with worker node?. Currently I am doing ,when the balancer init the workers ,I initialise another thread with socket server wich is listining for the Worker node. Worker node also have Socket client it send there Memeory usage to the Server Side. But I know thuis is not the way to do that. I want to do this in a satnderd way please help me.. Thank you, Regards Iroshan 4th year under graduate in computer science University Of Colombo Sri Lanka
Re: mod_proxy_balancer dynamic change properties
Hi RĂ¼diger, thanks lot , I already followed the source code of the mod_cluster. Its uses another shared memory implementation called slotmem rather than using scorebord. Are you sure is it possible to change this scorebord lbfactor property dynamically and it will affect the request distribution according to that dynamically updated lbfactor value.Please help me. Regards Iroshan 4th year under graduate in computer science University Of Colombo Sri Lanka
Re: mod_proxy_balancer dynamic change properties
Hi RĂ¼diger and all, Actually I want to know ,can't we done it by changing the source code of mode proxy balancer.Because properties of the mod_proxy_balancer gets from the config. After first time set values for the scoreboard properties by config file , mod_proxy_balancer uses this scoreboard lbfactor value. lbfactor value never updated again and again So is it possible to update scoreboard lbfactor by source code periodically in order to provide dyanamic load balancing mechanism to this module. please help me Regards, Iroshan 4th year under graduate in computer science University Of Colombo Sri Lanka
mod_proxy_balancer dynamic change properties
Hi All, I want to know whether the mod_proxy_balancer can dynamically change there propertis during the run time. For ex- can we change lbfactor's values for workers periodically according to there work load. If it is ok, is it possible to do that by updating theworkers lbfactor values in the scoreboard. Please help me. Regards Iroshan 4th year under graduate in computer science University Of Colombo Sri Lanka
load balancing with Apache for Tomcat workers
Hi All, I want to configure mod_proxy_balancer to distribute load among two back end Tomcat workers. How can I find more information relevant to this. Best Regards, Iroshan
mod_proxy_balancer
hi all, please can I know is there any technical documentation for mod_proxy_balancer module. Best Regards, H. Iroshan
Re: Apache 2.2 architecture
Dear All, Actually I need to know the complete functionality of mod_proxy_balancer. Is there any technical documentation on this module. Thanks and Best Regards H . Iroshan
Apache 2.2 architecture
Hi All, I am interesting to study the source code of Apache HTTP 2.2 . Can I find any detailed technical documentation or Architecture of Apache 2.2. Thank you and Best Regards, H. Iroshan