I have a Laravel app that does video processing. I am currently doing the encoding in the same server. Now, I want to create 3 more servers to do the "encoding" in parallel in multiple servers.
Is this possible multiple servers doing the same queue?
--- Server 1
My App -- --- Server 2
--- Server 3
These Server 1, 2, 3 only run "encoding" task.
The job class would look something like:
class MyJob implements ShouldQueue {
// use traits
private $video;
public function __construct($video) {
$this->video = $video;
}
public function handle() {
// Encode Video and save
$this->video->update([
'processed_at' => now()
]);
}
}
I'd appreciate any answer or if there are any resources on this topic.
For this do I need a separate database server and cache server?