When a new connection to a live stream arrives, query the server's current CPU load. If CPU load is >80%, redirect the new connection to another server.
1) Our Wowza servers are virtual and the amount of CPU they have at a given time can fluctuate. Therefore, we can't always assume that a server can handle a predetermined number of connections (an assumption made by the LoadBalancer module).
2) Once we fill up our local Wowza servers with enough live connections to reach ~80% CPU utilization, we want to direct new connections to a CDN. Obviously we can't configure that CDN's servers to participate in a LoadBalancer configuration with our local servers.
1) In our custom module, is there a command for querying the server's current CPU load? Since instantaneous CPU load may fluctuate, is there a way to query the average load over the past several seconds?
2) What other thoughts or suggestions do you have on this approach?