logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Dynamically route requests based on response from an App?
Author
j4sonryu



Joined: 10 Jan 2018
Posts: 1
Location: Seoul

PostPosted: Wed 10 Jan '18 9:33    Post subject: Dynamically route requests based on response from an App? Reply with quote

Hi Apache experts,

Is there a way to make Apache dynamically route requests based on the response from an App on Tomcat?

The usage scenario is following:
    1. Apache server is distributing requests to 3 different Tomcat nodes.
    2. There's a status checking URL provided by the application running on Tomcat, and it returns an HTTP response and a JSON payload describing the state of the node. if the node is running ok, it returns "RUNNING" and "200 OK".
    3. I want to distribute requests from Apache to the app on Tomcat only when Apache gets back "RUNNING" status or "200 OK", and ignore the Tomcat node when Apache gets something else. (and distribute to other nodes in this case)


Is this doable with Apache? Any plugin to do this?

Thanks,

Jason
Back to top
mraddi



Joined: 27 Jun 2016
Posts: 152
Location: Schömberg, Baden-Württemberg, Germany

PostPosted: Thu 11 Jan '18 0:06    Post subject: Reply with quote

Hi Jason,

you may check https://httpd.apache.org/docs/2.4/mod/mod_proxy_hcheck.html#examples - this apache-module looks like the thing you want to have Very Happy

Greetings
Matthias
Back to top


Reply to topic   Topic: Dynamically route requests based on response from an App? View previous topic :: View next topic
Post new topic   Forum Index -> Apache