When writing the software that uses the REST API, the following should be noted about the way REST API POST messages are handled by cOS Core:
cOS Core must receive at least one POST message per minute. If no message has been received for one minute, the server is considered to be unavailable and no connections are allocated to it. The next POST message it sends will make it available again (provided the maintenance is set to no).
There is no upper limit how often a server can send a POST message. However, messages sent in excess of one every second will not improve load distribution and will only consume resources on the server and the firewall.
It is recommended to only send a POST message when there is a significant change in the server load. A load change equal to or greater than 3% is recommended for a typical deployment.
If the load remains stable then a POST message should be sent anyway at least every 15 seconds so that cOS Core continues to view the server as available and has an accurate view of the load.
Until it receives at least one POST message from all servers after the last system start, cOS Core will use the round robin algorithm to allocate connections between servers. Once all servers have reported their loading, it will begin to allocate connections to the least loaded server.
When the server sends back a load of 100%, connections could still be allocated to it if it has the least "estimated" load of all servers when all have reported 100% loading. When cOS Core allocates connections to servers it adjusts up its estimation of the loading to account for the connections added since the last time the server reported its load. In this way, cOS Core could estimate that a server's load is above 100%.