0

I am working with 3 HTTP servers using the same Laravel app and sharing the same DATABASE, where the first server realize the LoadBalance using nginx, basically with the same weight.

The application works in many queue of jobs using the database's drive on table "jobs". The only server that proccess the jobs (php artisan queue:listen) is the app1.

I would like to know if i can proccess the jobs in the others servers or has some advices about it and if someone had the same experience.

Tuyoshi Vinicius
  • 861
  • 8
  • 22
  • You'll need to separate the jobs. The easiest way to do this is to have each app use a different database table to store its jobs. https://stackoverflow.com/questions/41294337/customising-job-and-job-table-in-laravel-queue-rename-jobs-table – ceejayoz Sep 27 '18 at 17:42
  • @ceejayoz great! but do you know if that is a problem if i continue using the same table? – Tuyoshi Vinicius Sep 27 '18 at 17:51
  • Yes, it'd be a problem using the same table. The apps will try to run each other's jobs, and be unable to find the code to do so, which will result in exceptions and job failures. – ceejayoz Sep 27 '18 at 17:52

0 Answers0