machinebox / issues

Machine Box issues, bugs and feature requests
2 stars 0 forks source link

Add ability to increase videobox concurrency #16

Closed montanaflynn closed 6 years ago

montanaflynn commented 6 years ago

If we have a lot of face|tag|nude boxes running behind a load balancer videobox should be able to take advantage of the increased capacity.

Based on FramesComplete in the videobox response it appears that 25 frames are sent at a time to the underlying boxes. Having that be configurable in an environment variable or request parameter would allow us to speed up videobox by scaling up the underlying boxes and setting a higher concurrent frame processing number. We're running all our machine boxes on kubernetes so scaling up the boxes is as simple as:

kubectl scale deploy mb-nudebox --replicas=10

The missing piece is letting videobox know there is an increased capacity.

I'm not sure if it makes more sense to have the env var or request param a global concurrency rate or having a separate one for each of facebox, tagbox and nudebox. I think the lowest / slowest one will be the bottleneck but that would depend on processing speed.

matryer commented 6 years ago

Thanks @montanaflynn - this is on our roadmap.

matryer commented 6 years ago

This feature is complete. The latest edition of Videobox supports concurrency.