Reverse proxy Health Checks of downstream servers

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Reverse proxy Health Checks of downstream servers

Post by Jaymer »

What would you use to check the availability of an aware server [IN CADDY or NGINX ONLY]!
(this is about the Health Checks that are part of normal operation in these products)

1. I've observed that Tomcat can be up and Aware down. So I don't think hitting a static .html file will suffice.

2. I'd hate to keep logging in once a minute because of extra/unnecessary Login processes

3. I thought maybe hitting a /REST function for a value (actually, Caddy just checks for a status code 200-399). This would be a 'secret' endpoint that will have minimum overhead.

Anyone have any ideas?
Last edited by Jaymer on Tue Feb 14, 2023 4:33 pm, edited 1 time in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Reverse proxy Health Checks of downstream servers

Post by hpl123 »

As you write the tomcat up/Aware down + static html check so I guess you have read the forum posts about uprobot etc. etc.. Should work in most cases I would say, how often is Tomcat up and Aware down?

The REST thing could probably work, I am not sure though how much server and Aware server resources an REST call would take and another thing, are we 100% sure the REST functionality works ("is up" and receiving) 100% of the time?

Another thing you could do is have the Aware server do some scheduled action every minute or so, either a REST call somewhere or save an logentry in an external DB (that some other thing thing checks). A variation of this is having Aware export an static html page with date and time in title and then use something like uprobot to check that (assuming uprobot or some other uptime monitoring tool can have rules/logic checking for specific things. OS tasks can maybe even be set up for this i.e to check for a particular file etc. and if not found do something).

Please share if you come up with something smart.
Henrik (V8 Developer Ed. - Windows)
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Reverse proxy Health Checks of downstream servers

Post by Jaymer »

hpl123 wrote: Tue Feb 14, 2023 2:58 pm As you write the tomcat up/Aware down + static html check so I guess you have read the forum posts about uprobot etc. etc.. Should work in most cases I would say, how often is Tomcat up and Aware down?
I've had both... Tomcat confused because 'garbage' was sent to it,
and Aware down (ie html login page responds, but will not login to Aware)

How is uptimerobot appropriate to this?
Caddy and NGinx have health checks - this needs to be done inside these products, not an outside test service.
"robot" is just going to send an email - that does nothing for re-routing to the alternate sever.
hpl123 wrote: Tue Feb 14, 2023 2:58 pm The REST thing could probably work, I am not sure though how much server and Aware server resources an REST call would take and another thing, are we 100% sure the REST functionality works ("is up" and receiving) 100% of the time?
yes, its fine.
hpl123 wrote: Tue Feb 14, 2023 2:58 pm Another thing you could do is have the Aware server do some scheduled action every minute or so, either a REST call somewhere or save an logentry in an external DB (that some other thing thing checks). A variation of this is having Aware export an static html page with date and time in title and then use something like uprobot to check that (assuming uprobot or some other uptime monitoring tool can have rules/logic checking for specific things. OS tasks can maybe even be set up for this i.e to check for a particular file etc. and if not found do something).
sure, i could write a file somewhere. but we can't guarantee an EXACT time the Aware scheduler will run. A timestamp in this file isn't supported in the Health Checks of these products. And the presence of the file isn't valid - because something has to remove the file after the Health Check which isn't possible either.

again, needs to be compatible with the Health Checks for the reverse proxy.
(modifying the OP)
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Reverse proxy Health Checks of downstream servers

Post by hpl123 »

Jaymer wrote: Tue Feb 14, 2023 4:32 pm
hpl123 wrote: Tue Feb 14, 2023 2:58 pm As you write the tomcat up/Aware down + static html check so I guess you have read the forum posts about uprobot etc. etc.. Should work in most cases I would say, how often is Tomcat up and Aware down?
I've had both... Tomcat confused because 'garbage' was sent to it,
and Aware down (ie html login page responds, but will not login to Aware)

How is uptimerobot appropriate to this?
Caddy and NGinx have health checks - this needs to be done inside these products, not an outside test service.
"robot" is just going to send an email - that does nothing for re-routing to the alternate sever.
hpl123 wrote: Tue Feb 14, 2023 2:58 pm The REST thing could probably work, I am not sure though how much server and Aware server resources an REST call would take and another thing, are we 100% sure the REST functionality works ("is up" and receiving) 100% of the time?
yes, its fine.
hpl123 wrote: Tue Feb 14, 2023 2:58 pm Another thing you could do is have the Aware server do some scheduled action every minute or so, either a REST call somewhere or save an logentry in an external DB (that some other thing thing checks). A variation of this is having Aware export an static html page with date and time in title and then use something like uprobot to check that (assuming uprobot or some other uptime monitoring tool can have rules/logic checking for specific things. OS tasks can maybe even be set up for this i.e to check for a particular file etc. and if not found do something).
sure, i could write a file somewhere. but we can't guarantee an EXACT time the Aware scheduler will run. A timestamp in this file isn't supported in the Health Checks of these products. And the presence of the file isn't valid - because something has to remove the file after the Health Check which isn't possible either.

again, needs to be compatible with the Health Checks for the reverse proxy.
(modifying the OP)

Ok, then I understand. I only thought you were interested in uptime check/monitoring.
Henrik (V8 Developer Ed. - Windows)
Post Reply