<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Queues on Brian Faust</title><link>https://vacua.dev/tags/queues/</link><description>Recent content in Queues on Brian Faust</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Mon, 01 Jan 0001 00:00:00 +0000</lastBuildDate><atom:link href="https://vacua.dev/tags/queues/rss.xml" rel="self" type="application/rss+xml"/><item><title>A Worker Count Is Not a Throughput Plan</title><link>https://vacua.dev/a-worker-count-is-not-a-throughput-plan/</link><pubDate>Wed, 01 Jan 2025 00:00:00 +0000</pubDate><guid>https://vacua.dev/a-worker-count-is-not-a-throughput-plan/</guid><description>&lt;p&gt;Four Laravel queue workers complete 114 waiting jobs per second where one
worker completes 37. Keep the worker count at four, make every job update the
same database row, and the rate falls to 32. Make each job fail twice before
succeeding, and those four workers perform 540 attempts to produce 180 effects.&lt;/p&gt;
&lt;p&gt;Nothing is wrong with the worker setting. It is answering three different
workloads.&lt;/p&gt;
&lt;p&gt;A worker count describes available executors. It says nothing about whether a
job can run in parallel, which dependency must absorb the concurrency, or how
many attempts are needed for one business effect. A throughput plan needs those
parts too.&lt;/p&gt;</description></item><item><title>A Queued Command Changes the Contract</title><link>https://vacua.dev/a-queued-command-changes-the-contract/</link><pubDate>Sat, 01 Apr 2023 00:00:00 +0000</pubDate><guid>https://vacua.dev/a-queued-command-changes-the-contract/</guid><description>&lt;p&gt;Send the same payment-capture request through two Laravel routes.&lt;/p&gt;
&lt;p&gt;The synchronous route returns 204 after the provider has created charge
&lt;code&gt;ch_001&lt;/code&gt; and the order records that reference. When the provider returns 503,
the HTTP request returns 500 and the order remains unpaid.&lt;/p&gt;
&lt;p&gt;The queued route returns 202 while the order is still unpaid and the provider
ledger is empty. Its response contains an operation URL. Cancel the order
before a worker starts and that operation later becomes &lt;code&gt;refused&lt;/code&gt;; the
provider is never called.&lt;/p&gt;</description></item></channel></rss>