Load balancing using an API
Hello team,
We have a bunch of hosts running behind F5.
Every host is running few services.
One particular service is capable of providing free memory information through the API we developed:
GET http://hostname/myservice/usageAPI
Response:
{
"freeMemory": 369959592
}
Is it possible to consume this API in F5, and load balance accordingly?
E.g. If freeMemory is less than threshold, than no request should be sent to that host for the time being.
After sometime, when freeMemory is above the threshold value, then F5 should redirect request to that host.
How to load balance in F5 through such API?
Note that we don't want to mark server/host status Up and Down. We just want to make sure that particular service has enough memory to take up the next memory intensive request.
We know Dynamic Ratio Load Balancing but that considers the overall health of the host.
We want to load balance based on status of one service out of few other services running on the host.