Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AWS Route 53 Health Check
#2
HI ioan,

I have several endpoints that my health monitor can call.  The main one is
http://beta.governmenttools.com/CrashMag...#36;LOADED
I can also call $SYSCONNECTION or $SYSTABLE to do a more thorough test.  I currently only check $LOADED. I get a text when that returns FALSE.

I respond to the call from the ServerController -> BaseBeforeDispatch().  This avoids having a session created. (it also means that it checks for this specific request on every call - but that's pretty fast - just looking for '$LOADED')
```
if pos( '$LOADED', uppercase( aRequest.PathInfo )) > 0 then
   begin
     aResponse.WriteString( pdmisc.iif( Serving, 'TRUE', 'FALSE' ));
     aResponse.Expires := now;
     Handled := true;
   end
```

When I upgraded to IW 15, I started moving things over to CustomContent handlers.  So I've also got this:
http://beta.governmenttools.com/CrashMag...36;Version
If I understand it correctly, I've specified that a session is not needed for this call. I'm not exactly sure when custom handlers get checked and how they affect sessions if they don't need one.  I don't worry too much about spinning up new sessions as long as they are destroyed when done.  I also require a login to get a "real" session - and that's the more heavy-weight session.

The nice thing about any of these solutions is that you're not just testing for a response, but you can do any processing you like before responding.  You can even return different results if your monitor supports it.

Hope that helps.
Pete
Reply


Messages In This Thread
AWS Route 53 Health Check - by ioan - 04-05-2019, 06:54 PM
RE: AWS Route 53 Health Check - by pete@pdmagic.com - 04-05-2019, 08:41 PM
RE: AWS Route 53 Health Check - by DanBarclay - 04-06-2019, 12:53 AM
RE: AWS Route 53 Health Check - by ioan - 04-08-2019, 06:09 PM
RE: AWS Route 53 Health Check - by lfeliz - 04-09-2019, 03:46 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)