Package com.networknt.health
Class HealthGetHandler
- java.lang.Object
-
- com.networknt.health.HealthGetHandler
-
- All Implemented Interfaces:
LightHttpHandler,io.undertow.server.HttpHandler
public class HealthGetHandler extends Object implements LightHttpHandler
This is a server health handler that output OK to indicate the server is alive. Normally, it will be use by F5 to check if the server is health before route request to it. Another way to check server health is to ping the ip and port and it is the standard way to check server status for F5. However, the service instance is up and running doesn't mean it is functioning. This is the reason to provide a this handler to output more information about the server for F5 or maybe in the future for the API marketplace. Note that we only recommend to use F5 as reverse proxy for services with static IP addresses that act like traditional web server. These services will be sitting in DMZ to serve mobile native and browser SPA and aggregate other services in the backend. For services deployed in the cloud dynamically, there is no reverse proxy but using client side service discovery. TODO support cascade health check with configuration, for example, database etc.- Author:
- Steve Hu
-
-
Field Summary
Fields Modifier and Type Field Description static StringHEALTH_RESULT_OKstatic StringHEALTH_RESULT_OK_JSON-
Fields inherited from interface com.networknt.handler.LightHttpHandler
AUDIT_CONFIG_NAME, AUDIT_ON_ERROR, AUDIT_STACK_TRACE, auditConfig, auditOnError, auditStackTrace, CONFIG_NAME, ERROR_NOT_DEFINED
-
-
Constructor Summary
Constructors Constructor Description HealthGetHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleRequest(io.undertow.server.HttpServerExchange exchange)static voidreload()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.networknt.handler.LightHttpHandler
setExchangeStatus, setExchangeStatus, setExchangeStatus
-
-
-
-
Field Detail
-
HEALTH_RESULT_OK
public static final String HEALTH_RESULT_OK
- See Also:
- Constant Field Values
-
HEALTH_RESULT_OK_JSON
public static final String HEALTH_RESULT_OK_JSON
-
-