Question

i am trying to do a video converter that grabs some files from a html form and converts them.

i would like to do the conversion on another server, .11, since i don't want to overload the main server .10

i can set up a network folder between the two servers, /media, and have a convert.php on .11 that will run the ffmpeg command.

if i run that php file from .10 then will the video conversion process take resources from .11 or from .10 ? Seems to me that .10 will be affected even if the php file is on .11.

I could do a cron job, but i really don't want to.

For this project i am using zend framework

Any ideas how to solve this issue?

thanks

Was it helpful?

Solution

I would definitely recommend implementing a Queue for these kind of tasks. Your queue could be simply a MySQL database that maintains a list of outstanding tasks. The workers can check this database for any tasks to be run.

This will provide you with far more flexibility in terms of scaling up. Tomorrow, if you decide to add two more worker servers/systems, they will fit seamlessly into the queue-model.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top