lundi 9 mars 2020

Laravel horizon: multiple supervisord process; need seperation of concern

I have a laravel app setup on AWS ECS, I have dockerized my application and I am running the horizon supervisord in a separate container. All of the app containers are stateless and connect to one single redis/postgres server. Now since my application is in production I have two container instance running to divide the traffic load, And hence there are 2 supervisord queue workers spawning, And because of this the problem i am facing is that some of the jobs do not execute(atleast that is my analysis). Below is the horizon dashboard for better understanding.

enter image description here

You can see that the name [supervisor-1] of the process is the same and the queue they are listening are same as well. I feel this can be the reason of problem.

found this -> https://medium.com/@setkyarwalar/setting-up-multiple-horizon-workers-f75b233db521, which shows a setup of multiple horizon workers which are listening to different queues all together. That is not exactly my use case though.

I need to understand how i can solve the problem of concurrency happening, How could i have 2 separate workers listening to the same queue and still be able to execute all jobs smoothly?

Any help is appreciated in advance



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire