Loopback API in Kong

Hi,
We have the flow like below
Consumer–>LB–>Kong Servers–>Upstream API
Here LB need a https monitoring service on Kong which returns 200 response code. So we need a loopback service/api which responds to LB . How we can achieve this in Kong.

Hi nisha,

It sounds like the /status endpoint on the admin api might fit your needs.

https://getkong.org/docs/0.13.x/admin-api/#retrieve-node-status

@nisha - the suggestion from @kikito is a good one, and note that the /status endpoint will return 200 even if Kong cannot connect to the datastore.

Another Option Tieski gave in a different topic was creating a proxy endpoint and placing the request termination plugin on top of it. Using the /status endpoint works too but its always doing the underlying nginx stub_status call which does a little nginx processing under the hood.

1 Like

Good reminder @jeremyjpj0916 !

@nisha you’ll find that helpful approach here Kong public status endpoint

1 Like

Thank @kikito yes /status worked for us :slightly_smiling_face:

1 Like