You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by ricardo13 <ri...@gmail.com> on 2008/10/21 04:07:37 UTC

Howto implement a new algorithm scheduler in mod_proxy_balancer

Hi,

I wanted implement a new algorithm scheduler to mod_proxy_balancer.
I built a new algorithm and want test in apache2.

Thank you

Ricardo
-- 
View this message in context: http://www.nabble.com/Howto-implement-a-new-algorithm-scheduler-in-mod_proxy_balancer-tp20082207p20082207.html
Sent from the Apache HTTP Server - Module Writers mailing list archive at Nabble.com.


Re: Howto implement a new algorithm scheduler in mod_proxy_balancer

Posted by Kevac Marko <mk...@gmail.com>.
What's monitor hook?

On Wed, Oct 22, 2008 at 11:58 PM, Jim Jagielski <ji...@jagunet.com> wrote:
> Sounds like 2 questions there: (1) is there anyway to create
> some sort of scheduler that does periodic functions and (2) how
> to obtain external server info (like CPU, etc...).
>
> Re #1: Under 2.2, there is a monitor hook, but it is pretty
> limited. Best thing is to create an external process which
> runs separately and adjusts shared memory data.
>
> Re #2: It ain't trivial.
>
> On Oct 22, 2008, at 2:38 PM, ricardo13 wrote:
>
>>
>> hi,
>>
>> I saw the link.
>> So one more question.
>>
>> Can I development a scheduler that receive datas from cluster.
>> For example:
>>
>>  If machine1 == overloaded CPU
>>     sent requisition to machine2
>>
>> How to do scheduler (via programming) obtain information of CPU from
>> others
>> machines ??
>>
>> Thank You
>>
>> Ricardo
>>
>>
>> Rainer Jung-3 wrote:
>>>
>>> ricardo13 schrieb:
>>>>
>>>> I don't find that examples. I find in the folder
>>>> httpd.2.2.9/modules/proxy/
>>>> .....there isn't folder example
>>>> Where can I find ??? Is there any link ???
>>>
>>> It's not yet in the stable branch 2.2, but you can find it in the trunk:
>>>
>>> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/examples/
>>>
>>> to watch it with a browser, or
>>>
>>> http://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/proxy/examples/
>>>
>>> as a URL to check it out via svn.
>>>
>>> Regards,
>>>
>>> Rainer
>>>
>>>> Jim Jagielski wrote:
>>>>>
>>>>> Not sure what the question is... is it how to test your algo or
>>>>> how to implement it?
>>>>>
>>>>> There is a quick-and-dirty example submodule in trunk (under modules/
>>>>> proxy/examples)
>>>>> that give some basic overview.
>>>>>
>>>>> On Oct 20, 2008, at 10:07 PM, ricardo13 wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I wanted implement a new algorithm scheduler to mod_proxy_balancer.
>>>>>> I built a new algorithm and want test in apache2.
>>>>>>
>>>>>> Thank you
>>>>>>
>>>>>> Ricardo
>>>>>> --
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Howto-implement-a-new-algorithm-scheduler-in-mod_proxy_balancer-tp20082207p20117149.html
>> Sent from the Apache HTTP Server - Module Writers mailing list archive at
>> Nabble.com.
>>
>
>



-- 
С уважением, Кевац Марко
Sincerely yours, Kevac Marko

Re: Howto implement a new algorithm scheduler in mod_proxy_balancer

Posted by ricardo13 <ri...@gmail.com>.
Hi Jim,


Jim Jagielski wrote:
> 
> Sounds like 2 questions there: (1) is there anyway to create
> some sort of scheduler that does periodic functions and (2) how
> to obtain external server info (like CPU, etc...).
> 
> Re #1: Under 2.2, there is a monitor hook, but it is pretty
> limited. Best thing is to create an external process which
> runs separately and adjusts shared memory data.
> 
> Re #2: It ain't trivial.
> It's very hard ???
> What monitor ???
> Are there any book or tutorials about memory shared ??
> 
> Thank You
>  
> On Oct 22, 2008, at 2:38 PM, ricardo13 wrote:
> 
>>
>> hi,
>>
>> I saw the link.
>> So one more question.
>>
>> Can I development a scheduler that receive datas from cluster.
>> For example:
>>
>>   If machine1 == overloaded CPU
>>      sent requisition to machine2
>>
>> How to do scheduler (via programming) obtain information of CPU from  
>> others
>> machines ??
>>
>> Thank You
>>
>> Ricardo
>>
>>
>> Rainer Jung-3 wrote:
>>>
>>> ricardo13 schrieb:
>>>> I don't find that examples. I find in the folder
>>>> httpd.2.2.9/modules/proxy/
>>>> .....there isn't folder example
>>>> Where can I find ??? Is there any link ???
>>>
>>> It's not yet in the stable branch 2.2, but you can find it in the  
>>> trunk:
>>>
>>> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/ 
>>> examples/
>>>
>>> to watch it with a browser, or
>>>
>>> http://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/proxy/examples/
>>>
>>> as a URL to check it out via svn.
>>>
>>> Regards,
>>>
>>> Rainer
>>>
>>>> Jim Jagielski wrote:
>>>>> Not sure what the question is... is it how to test your algo or
>>>>> how to implement it?
>>>>>
>>>>> There is a quick-and-dirty example submodule in trunk (under  
>>>>> modules/
>>>>> proxy/examples)
>>>>> that give some basic overview.
>>>>>
>>>>> On Oct 20, 2008, at 10:07 PM, ricardo13 wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I wanted implement a new algorithm scheduler to  
>>>>>> mod_proxy_balancer.
>>>>>> I built a new algorithm and want test in apache2.
>>>>>>
>>>>>> Thank you
>>>>>>
>>>>>> Ricardo
>>>>>> -- 
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Howto-implement-a-new-algorithm-scheduler-in-mod_proxy_balancer-tp20082207p20117149.html
>> Sent from the Apache HTTP Server - Module Writers mailing list  
>> archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Howto-implement-a-new-algorithm-scheduler-in-mod_proxy_balancer-tp20082207p20129583.html
Sent from the Apache HTTP Server - Module Writers mailing list archive at Nabble.com.


Re: Howto implement a new algorithm scheduler in mod_proxy_balancer

Posted by Sander Temme <sc...@apache.org>.
On Oct 25, 2008, at 7:57 PM, ricardo13 wrote:

> I will build a scheduler that receive a little message from cluster.  
> At
> cluster, there is a process that send messages about CPU.

Like an SNMP agent?  That way you wouldn't have to re-invent the wheel.

> Then the server I need to build a separate program that receives that
> message and passes to the apache.
>
> Can I use socket to communicate external process with apache ??? Or  
> shared
> memory ??

You can set up a shared memory area from your Apache server and have  
your monitoring process access that as well.  Whether you have that be  
an external program or something forked from the httpd parent doesn't  
matter, as long as they (are allowed to) attach to the same shared  
memory segment.

S.

-- 
Sander Temme
sctemme@apache.org
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF




Re: Howto implement a new algorithm scheduler in mod_proxy_balancer

Posted by ricardo13 <ri...@gmail.com>.
Hi

I will build a scheduler that receive a little message from cluster. At
cluster, there is a process that send messages about CPU.
Then the server I need to build a separate program that receives that
message and passes to the apache.

Can I use socket to communicate external process with apache ??? Or shared
memory ??

Thank you

Ricardo
-- 
View this message in context: http://www.nabble.com/Howto-implement-a-new-algorithm-scheduler-in-mod_proxy_balancer-tp20082207p20169165.html
Sent from the Apache HTTP Server - Module Writers mailing list archive at Nabble.com.


Re: Howto implement a new algorithm scheduler in mod_proxy_balancer

Posted by Jim Jagielski <ji...@jaguNET.com>.
For number 2 you need the remote servers to "broadcast" various
load information (CPU usage, memory usage, load average, etc) and
somehow have the load balancer "listen" on that broadcast to obtain
that info.

On Oct 22, 2008, at 4:13 PM, Houser, Rick wrote:

> part #2 sounds more like the kind of a task you would want to use at
> least an external process, if not a separate physical machine for.
> Basically, you are looking for an intelligent load balancer, correct?
>
>
>
> Thanks,
>
> Rick Houser
> Auto-Owners Insurance
> Systems Support
> (517)703-2580
>
> -----Original Message-----
> From: Jim Jagielski [mailto:jim@jaguNET.com]
> Sent: Wednesday, October 22, 2008 3:58 PM
> To: modules-dev@httpd.apache.org
> Subject: Re: Howto implement a new algorithm scheduler in
> mod_proxy_balancer
>
> Sounds like 2 questions there: (1) is there anyway to create some sort
> of scheduler that does periodic functions and (2) how to obtain  
> external
> server info (like CPU, etc...).
>
> Re #1: Under 2.2, there is a monitor hook, but it is pretty limited.
> Best thing is to create an external process which runs separately and
> adjusts shared memory data.
>
> Re #2: It ain't trivial.
>
> On Oct 22, 2008, at 2:38 PM, ricardo13 wrote:
>
>>
>> hi,
>>
>> I saw the link.
>> So one more question.
>>
>> Can I development a scheduler that receive datas from cluster.
>> For example:
>>
>>  If machine1 == overloaded CPU
>>     sent requisition to machine2
>>
>> How to do scheduler (via programming) obtain information of CPU from
>> others machines ??
>>
>> Thank You
>>
>> Ricardo
>>
>>
>> Rainer Jung-3 wrote:
>>>
>>> ricardo13 schrieb:
>>>> I don't find that examples. I find in the folder
>>>> httpd.2.2.9/modules/proxy/ .....there isn't folder example Where  
>>>> can
>
>>>> I find ??? Is there any link ???
>>>
>>> It's not yet in the stable branch 2.2, but you can find it in the
>>> trunk:
>>>
>>> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/
>>> examples/
>>>
>>> to watch it with a browser, or
>>>
>>> http://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/proxy/ 
>>> examp
>>> les/
>>>
>>> as a URL to check it out via svn.
>>>
>>> Regards,
>>>
>>> Rainer
>>>
>>>> Jim Jagielski wrote:
>>>>> Not sure what the question is... is it how to test your algo or  
>>>>> how
>
>>>>> to implement it?
>>>>>
>>>>> There is a quick-and-dirty example submodule in trunk (under
>>>>> modules/
>>>>> proxy/examples)
>>>>> that give some basic overview.
>>>>>
>>>>> On Oct 20, 2008, at 10:07 PM, ricardo13 wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I wanted implement a new algorithm scheduler to
>>>>>> mod_proxy_balancer.
>>>>>> I built a new algorithm and want test in apache2.
>>>>>>
>>>>>> Thank you
>>>>>>
>>>>>> Ricardo
>>>>>> --
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Howto-implement-a-new-algorithm-scheduler-in- 
>> mod
>> _proxy_balancer-tp20082207p20117149.html
>> Sent from the Apache HTTP Server - Module Writers mailing list  
>> archive
>
>> at Nabble.com.
>>
>
>
>


RE: Howto implement a new algorithm scheduler in mod_proxy_balancer

Posted by "Houser, Rick" <Ho...@aoins.com>.
part #2 sounds more like the kind of a task you would want to use at
least an external process, if not a separate physical machine for.
Basically, you are looking for an intelligent load balancer, correct?



Thanks,

Rick Houser
Auto-Owners Insurance
Systems Support
(517)703-2580

-----Original Message-----
From: Jim Jagielski [mailto:jim@jaguNET.com] 
Sent: Wednesday, October 22, 2008 3:58 PM
To: modules-dev@httpd.apache.org
Subject: Re: Howto implement a new algorithm scheduler in
mod_proxy_balancer

Sounds like 2 questions there: (1) is there anyway to create some sort
of scheduler that does periodic functions and (2) how to obtain external
server info (like CPU, etc...).

Re #1: Under 2.2, there is a monitor hook, but it is pretty limited.
Best thing is to create an external process which runs separately and
adjusts shared memory data.

Re #2: It ain't trivial.

On Oct 22, 2008, at 2:38 PM, ricardo13 wrote:

>
> hi,
>
> I saw the link.
> So one more question.
>
> Can I development a scheduler that receive datas from cluster.
> For example:
>
>   If machine1 == overloaded CPU
>      sent requisition to machine2
>
> How to do scheduler (via programming) obtain information of CPU from 
> others machines ??
>
> Thank You
>
> Ricardo
>
>
> Rainer Jung-3 wrote:
>>
>> ricardo13 schrieb:
>>> I don't find that examples. I find in the folder 
>>> httpd.2.2.9/modules/proxy/ .....there isn't folder example Where can

>>> I find ??? Is there any link ???
>>
>> It's not yet in the stable branch 2.2, but you can find it in the
>> trunk:
>>
>> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/
>> examples/
>>
>> to watch it with a browser, or
>>
>> http://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/proxy/examp
>> les/
>>
>> as a URL to check it out via svn.
>>
>> Regards,
>>
>> Rainer
>>
>>> Jim Jagielski wrote:
>>>> Not sure what the question is... is it how to test your algo or how

>>>> to implement it?
>>>>
>>>> There is a quick-and-dirty example submodule in trunk (under 
>>>> modules/
>>>> proxy/examples)
>>>> that give some basic overview.
>>>>
>>>> On Oct 20, 2008, at 10:07 PM, ricardo13 wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I wanted implement a new algorithm scheduler to 
>>>>> mod_proxy_balancer.
>>>>> I built a new algorithm and want test in apache2.
>>>>>
>>>>> Thank you
>>>>>
>>>>> Ricardo
>>>>> --
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Howto-implement-a-new-algorithm-scheduler-in-mod
> _proxy_balancer-tp20082207p20117149.html
> Sent from the Apache HTTP Server - Module Writers mailing list archive

> at Nabble.com.
>




Re: Howto implement a new algorithm scheduler in mod_proxy_balancer

Posted by Jim Jagielski <ji...@jaguNET.com>.
Sounds like 2 questions there: (1) is there anyway to create
some sort of scheduler that does periodic functions and (2) how
to obtain external server info (like CPU, etc...).

Re #1: Under 2.2, there is a monitor hook, but it is pretty
limited. Best thing is to create an external process which
runs separately and adjusts shared memory data.

Re #2: It ain't trivial.

On Oct 22, 2008, at 2:38 PM, ricardo13 wrote:

>
> hi,
>
> I saw the link.
> So one more question.
>
> Can I development a scheduler that receive datas from cluster.
> For example:
>
>   If machine1 == overloaded CPU
>      sent requisition to machine2
>
> How to do scheduler (via programming) obtain information of CPU from  
> others
> machines ??
>
> Thank You
>
> Ricardo
>
>
> Rainer Jung-3 wrote:
>>
>> ricardo13 schrieb:
>>> I don't find that examples. I find in the folder
>>> httpd.2.2.9/modules/proxy/
>>> .....there isn't folder example
>>> Where can I find ??? Is there any link ???
>>
>> It's not yet in the stable branch 2.2, but you can find it in the  
>> trunk:
>>
>> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/ 
>> examples/
>>
>> to watch it with a browser, or
>>
>> http://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/proxy/examples/
>>
>> as a URL to check it out via svn.
>>
>> Regards,
>>
>> Rainer
>>
>>> Jim Jagielski wrote:
>>>> Not sure what the question is... is it how to test your algo or
>>>> how to implement it?
>>>>
>>>> There is a quick-and-dirty example submodule in trunk (under  
>>>> modules/
>>>> proxy/examples)
>>>> that give some basic overview.
>>>>
>>>> On Oct 20, 2008, at 10:07 PM, ricardo13 wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I wanted implement a new algorithm scheduler to  
>>>>> mod_proxy_balancer.
>>>>> I built a new algorithm and want test in apache2.
>>>>>
>>>>> Thank you
>>>>>
>>>>> Ricardo
>>>>> -- 
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Howto-implement-a-new-algorithm-scheduler-in-mod_proxy_balancer-tp20082207p20117149.html
> Sent from the Apache HTTP Server - Module Writers mailing list  
> archive at Nabble.com.
>


Re: Howto implement a new algorithm scheduler in mod_proxy_balancer

Posted by ricardo13 <ri...@gmail.com>.
hi,

I saw the link.
So one more question.

Can I development a scheduler that receive datas from cluster.
For example: 

   If machine1 == overloaded CPU
      sent requisition to machine2

How to do scheduler (via programming) obtain information of CPU from others
machines ??

Thank You

Ricardo


Rainer Jung-3 wrote:
> 
> ricardo13 schrieb:
>> I don't find that examples. I find in the folder
>> httpd.2.2.9/modules/proxy/
>> .....there isn't folder example
>> Where can I find ??? Is there any link ???
> 
> It's not yet in the stable branch 2.2, but you can find it in the trunk:
> 
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/examples/
> 
> to watch it with a browser, or
> 
> http://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/proxy/examples/
> 
> as a URL to check it out via svn.
> 
> Regards,
> 
> Rainer
> 
>> Jim Jagielski wrote:
>>> Not sure what the question is... is it how to test your algo or
>>> how to implement it?
>>>
>>> There is a quick-and-dirty example submodule in trunk (under modules/ 
>>> proxy/examples)
>>> that give some basic overview.
>>>
>>> On Oct 20, 2008, at 10:07 PM, ricardo13 wrote:
>>>
>>>> Hi,
>>>>
>>>> I wanted implement a new algorithm scheduler to mod_proxy_balancer.
>>>> I built a new algorithm and want test in apache2.
>>>>
>>>> Thank you
>>>>
>>>> Ricardo
>>>> -- 
> 
> 

-- 
View this message in context: http://www.nabble.com/Howto-implement-a-new-algorithm-scheduler-in-mod_proxy_balancer-tp20082207p20117149.html
Sent from the Apache HTTP Server - Module Writers mailing list archive at Nabble.com.


Re: Howto implement a new algorithm scheduler in mod_proxy_balancer

Posted by Rainer Jung <ra...@kippdata.de>.
ricardo13 schrieb:
> I don't find that examples. I find in the folder httpd.2.2.9/modules/proxy/
> .....there isn't folder example
> Where can I find ??? Is there any link ???

It's not yet in the stable branch 2.2, but you can find it in the trunk:

http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/examples/

to watch it with a browser, or

http://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/proxy/examples/

as a URL to check it out via svn.

Regards,

Rainer

> Jim Jagielski wrote:
>> Not sure what the question is... is it how to test your algo or
>> how to implement it?
>>
>> There is a quick-and-dirty example submodule in trunk (under modules/ 
>> proxy/examples)
>> that give some basic overview.
>>
>> On Oct 20, 2008, at 10:07 PM, ricardo13 wrote:
>>
>>> Hi,
>>>
>>> I wanted implement a new algorithm scheduler to mod_proxy_balancer.
>>> I built a new algorithm and want test in apache2.
>>>
>>> Thank you
>>>
>>> Ricardo
>>> -- 

Re: Howto implement a new algorithm scheduler in mod_proxy_balancer

Posted by ricardo13 <ri...@gmail.com>.
Hi Jim,

I don't find that examples. I find in the folder httpd.2.2.9/modules/proxy/
.....there isn't folder example
Where can I find ??? Is there any link ???


Thank You

Ricardo


Jim Jagielski wrote:
> 
> Not sure what the question is... is it how to test your algo or
> how to implement it?
> 
> There is a quick-and-dirty example submodule in trunk (under modules/ 
> proxy/examples)
> that give some basic overview.
> 
> On Oct 20, 2008, at 10:07 PM, ricardo13 wrote:
> 
>>
>> Hi,
>>
>> I wanted implement a new algorithm scheduler to mod_proxy_balancer.
>> I built a new algorithm and want test in apache2.
>>
>> Thank you
>>
>> Ricardo
>> -- 
>> View this message in context:
>> http://www.nabble.com/Howto-implement-a-new-algorithm-scheduler-in-mod_proxy_balancer-tp20082207p20082207.html
>> Sent from the Apache HTTP Server - Module Writers mailing list  
>> archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Howto-implement-a-new-algorithm-scheduler-in-mod_proxy_balancer-tp20082207p20110978.html
Sent from the Apache HTTP Server - Module Writers mailing list archive at Nabble.com.


Re: Howto implement a new algorithm scheduler in mod_proxy_balancer

Posted by Jim Jagielski <ji...@jaguNET.com>.
Not sure what the question is... is it how to test your algo or
how to implement it?

There is a quick-and-dirty example submodule in trunk (under modules/ 
proxy/examples)
that give some basic overview.

On Oct 20, 2008, at 10:07 PM, ricardo13 wrote:

>
> Hi,
>
> I wanted implement a new algorithm scheduler to mod_proxy_balancer.
> I built a new algorithm and want test in apache2.
>
> Thank you
>
> Ricardo
> -- 
> View this message in context: http://www.nabble.com/Howto-implement-a-new-algorithm-scheduler-in-mod_proxy_balancer-tp20082207p20082207.html
> Sent from the Apache HTTP Server - Module Writers mailing list  
> archive at Nabble.com.
>