title: Laravel/PHP - the right choice for running jobs in parallel?
body: <p>My current application holds the status of round about 5000 network nodes in a database. Each node should get updated minutely to provide the current status. Updating process looks like the following:</p>
  
  <ol>
  <li>Get old entry from database to get its IP</li>
  <li>Send a RPC to the node</li>
  <li>Update database entry with returned data</li>
  </ol>
  
  <p>For this I'm running Laravel horizon that provides me a neat job scheduler based on redis. Every minute a cron gets all node-entries and pushs each <code>UpdateNode(id)</code> task to the scheduler.</p>
  
  <p>With number of nodes increasing I have to constantly increase the schedule workers as well. Currently 60 PHP threads are only responsible for updating nodes to keep the minutely update-circle running.</p>
  
  <p>That fact again leads to a huge ressource problem (currently 80% RAM and 70% CPU on a 40$ DigitalOcean Droplet) which leads me again to my main questions:</p>
  
  <ol>
  <li>Is Laravel (or much more PHP) still the right candidate for this job?</li>
  <li>Am I maybe doing something wrong from a Laravel-perspective? Normaly getting a DB-Entry, sending an RPC and update the entry with new data should be no big deal. </li>
  </ol>
  
  <p>//edit: Here is my <code>iostat</code>:
  <a href="https://i.stack.imgur.com/8KGIg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8KGIg.png" alt="enter image description here"></a></p>
  
  <p>//for all who are interested here is the project: <a href="https://github.com/nknx-org/nknx-api" rel="nofollow noreferrer">https://github.com/nknx-org/nknx-api</a>
  The job we're talking about is <a href="https://github.com/nknx-org/nknx-api/blob/master/app/Jobs/UpdateNode.php" rel="nofollow noreferrer">https://github.com/nknx-org/nknx-api/blob/master/app/Jobs/UpdateNode.php</a></p>