Programmatic access to balancer manager

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Programmatic access to balancer manager

Niranjan Rao
Greetings,


On Apache 2.4.18, Ubuntu.

I am looking for a way to access balancer manager programmatically. I
tried searching around, but could not find any officially documented API
or interfaces.


We are a small organization hosted in AWS. Sometimes we have a need to
add/remove a load balancer worker in/from traffic as per current
conditions and to save the costs.  We are trying to automate these
actions  to avoid mistakes and control these processes via tools/scripts.


We have scripts that can spawn or stop AWS instances and now I'm looking
for extending those scripts add/remove members as per need.


I came across few curl scripts, but wanted to check if there is any
official programmatic access to balancer manager to add a member.


Also it's not clear if I tinker with worker members using manager gui
like documented at
https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypass, do I
need to reload the server again or changes will be automatically applied.


Regards,


Niranjan


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Programmatic access to balancer manager

Nick Folino
Changes made in balancer-manager do not require a restart to take effect.  You might try Python/Beautiful Soup for programmatic access.

Nick


On Thu, Sep 24, 2020 at 12:11 PM Niranjan Rao <[hidden email]> wrote:
Greetings,


On Apache 2.4.18, Ubuntu.

I am looking for a way to access balancer manager programmatically. I
tried searching around, but could not find any officially documented API
or interfaces.


We are a small organization hosted in AWS. Sometimes we have a need to
add/remove a load balancer worker in/from traffic as per current
conditions and to save the costs.  We are trying to automate these
actions  to avoid mistakes and control these processes via tools/scripts.


We have scripts that can spawn or stop AWS instances and now I'm looking
for extending those scripts add/remove members as per need.


I came across few curl scripts, but wanted to check if there is any
official programmatic access to balancer manager to add a member.


Also it's not clear if I tinker with worker members using manager gui
like documented at
https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypass, do I
need to reload the server again or changes will be automatically applied.


Regards,


Niranjan


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Programmatic access to balancer manager

Jim Jagielski
All the balancer manager does is create HTTP requests to the Apache web server, so you can easier use the shell and curl for example to automate a lot of stuff.

It is true that a formal API isn't documented (I should get on that... it *is* long overdue) but it is easy to determine it via looking at the balancer_handler function in https://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c?view=markup or by looking at the HTML of the balancer manager page.

On Sep 24, 2020, at 2:18 PM, Nick Folino <[hidden email]> wrote:

Changes made in balancer-manager do not require a restart to take effect.  You might try Python/Beautiful Soup for programmatic access.

Nick


On Thu, Sep 24, 2020 at 12:11 PM Niranjan Rao <[hidden email]> wrote:
Greetings,


On Apache 2.4.18, Ubuntu.

I am looking for a way to access balancer manager programmatically. I
tried searching around, but could not find any officially documented API
or interfaces.


We are a small organization hosted in AWS. Sometimes we have a need to
add/remove a load balancer worker in/from traffic as per current
conditions and to save the costs.  We are trying to automate these
actions  to avoid mistakes and control these processes via tools/scripts.


We have scripts that can spawn or stop AWS instances and now I'm looking
for extending those scripts add/remove members as per need.


I came across few curl scripts, but wanted to check if there is any
official programmatic access to balancer manager to add a member.


Also it's not clear if I tinker with worker members using manager gui
like documented at
https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypass, do I
need to reload the server again or changes will be automatically applied.


Regards,


Niranjan


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Programmatic access to balancer manager

Niranjan Rao
Thank you Jim, I think this might be overdue need.

Time permitting, I'll try to create a small write up within next couple of weeks based on my experience. Will you be ok to use it as your starting point?

Problem with documenting in the API format is it does get locked up as soon as you publish it and I really don't know how frequently these pieces change.

Regards,

Niranjan

On 9/25/20 4:34 AM, Jim Jagielski wrote:
All the balancer manager does is create HTTP requests to the Apache web server, so you can easier use the shell and curl for example to automate a lot of stuff.

It is true that a formal API isn't documented (I should get on that... it *is* long overdue) but it is easy to determine it via looking at the balancer_handler function in https://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c?view=markup or by looking at the HTML of the balancer manager page.

On Sep 24, 2020, at 2:18 PM, Nick Folino <[hidden email]> wrote:

Changes made in balancer-manager do not require a restart to take effect.  You might try Python/Beautiful Soup for programmatic access.

Nick


On Thu, Sep 24, 2020 at 12:11 PM Niranjan Rao <[hidden email]> wrote:
Greetings,


On Apache 2.4.18, Ubuntu.

I am looking for a way to access balancer manager programmatically. I
tried searching around, but could not find any officially documented API
or interfaces.


We are a small organization hosted in AWS. Sometimes we have a need to
add/remove a load balancer worker in/from traffic as per current
conditions and to save the costs.  We are trying to automate these
actions  to avoid mistakes and control these processes via tools/scripts.


We have scripts that can spawn or stop AWS instances and now I'm looking
for extending those scripts add/remove members as per need.


I came across few curl scripts, but wanted to check if there is any
official programmatic access to balancer manager to add a member.


Also it's not clear if I tinker with worker members using manager gui
like documented at
https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypass, do I
need to reload the server again or changes will be automatically applied.


Regards,


Niranjan


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]