Loopback API in Kong


#1

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.


#2

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


#3

@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.


#4

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.


#5

Good reminder @jeremyjpj0916 !

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


#6

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