Multiple App Laravel using the same App table

Asked

Viewed 100 times

3

I have in my scenario 3 servers http running the same application Laravel and sharing the same database, where the first server LoadBalance using nginx, basically with the same load weight.

The application works with several Jobs queues using the drive database in the "Jobs" table. The only server that processes jobs (php artisan queue:listen) is the app1.

I would like to know if there are any contraindications about prosecuting jobs also on other servers and if anyone has had any similar experience.

1 answer

0

As long as the balance is adequate, I see no problems.

I believe you should do a comparative analysis:

  • If I run a single application on a single queue server, and this application/server supports, say, 10K (ten thousand) hour queues ... compared to three applications running a single queue server, is the volume the same? So there’s no contraindication

  • Already, the possibility of using different connections for different queues is precisely so that you can balance correctly, again say, if the three applications run 2k queues, and a single run 30k queues, it is more likely that it is necessary to balance with running queues on different connections/servers for this single application as opposed to the three cited.

I hope to have been clear that the evaluative question here is the demand/volume of execution of Jobs and the computational cost (processing+memory) required by each job, to really identify if there is a contraindication, as you mentioned, in running multiple system queues on a single server/connection.

For those who need more understanding on how to set up different connections to run queues in Laravel, access the section of documentation

Browser other questions tagged

You are not signed in. Login or sign up in order to post.