<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Uttkarsh singh</title>
    <description>The latest articles on DEV Community by Uttkarsh singh (@uttkarsh123shiv).</description>
    <link>https://dev.to/uttkarsh123shiv</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3948650%2F6f9d1b43-623a-4895-9dba-c0d36c2fead9.png</url>
      <title>DEV Community: Uttkarsh singh</title>
      <link>https://dev.to/uttkarsh123shiv</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/uttkarsh123shiv"/>
    <language>en</language>
    <item>
      <title>#2 Why I Chose BullMQ Instead of Processing Files Inside the API</title>
      <dc:creator>Uttkarsh singh</dc:creator>
      <pubDate>Fri, 05 Jun 2026 06:20:03 +0000</pubDate>
      <link>https://dev.to/uttkarsh123shiv/-why-i-chose-bullmq-instead-of-processing-files-inside-the-api-2npo</link>
      <guid>https://dev.to/uttkarsh123shiv/-why-i-chose-bullmq-instead-of-processing-files-inside-the-api-2npo</guid>
      <description>&lt;p&gt;While building a file conversion and sharing app, my first implementation handled file conversion directly inside the API request.&lt;/p&gt;

&lt;p&gt;It worked.&lt;/p&gt;

&lt;p&gt;But as file sizes increased, requests stayed open for hundreds of milliseconds while the server was busy processing files.&lt;/p&gt;

&lt;p&gt;The problem wasn't the conversion itself.&lt;/p&gt;

&lt;p&gt;The problem was that users were waiting for work that didn't need to happen synchronously.&lt;/p&gt;

&lt;p&gt;So I moved file conversion to BullMQ workers backed by Redis.&lt;/p&gt;

&lt;p&gt;The flow became:&lt;/p&gt;

&lt;p&gt;Upload → Job added to BullMQ → API responds immediately → Worker processes file → Status updated → User receives result&lt;/p&gt;

&lt;p&gt;Why BullMQ worked better here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Faster API responses&lt;/li&gt;
&lt;li&gt;Request handling separated from heavy file processing&lt;/li&gt;
&lt;li&gt;Better scalability through worker concurrency&lt;/li&gt;
&lt;li&gt;Retries and failure handling built into the queue&lt;/li&gt;
&lt;li&gt;More predictable system behavior under load&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Results from load testing&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API p95 latency reduced by &lt;strong&gt;212x&lt;/strong&gt; (800 ms → 3.8 ms)&lt;/li&gt;
&lt;li&gt;Throughput increased by &lt;strong&gt;4.8x&lt;/strong&gt; (1.3 → 6.2 requests/sec)&lt;/li&gt;
&lt;li&gt;Tested with 20 concurrent requests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tradeoff:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Additional infrastructure (Redis + workers)&lt;/li&gt;
&lt;li&gt;More operational complexity&lt;/li&gt;
&lt;li&gt;Eventual consistency instead of immediate completion&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If every request needed an instant response, synchronous processing might still be the simpler choice.&lt;/p&gt;

&lt;p&gt;This was a good reminder that performance improvements often come from moving work out of the critical request path rather than making the work itself faster.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>node</category>
      <category>performance</category>
    </item>
    <item>
      <title>#1 Why I Chose Polling Over WebSockets for File Processing?</title>
      <dc:creator>Uttkarsh singh</dc:creator>
      <pubDate>Sun, 24 May 2026 07:06:59 +0000</pubDate>
      <link>https://dev.to/uttkarsh123shiv/1-why-i-chose-polling-over-websockets-for-file-processing--4242</link>
      <guid>https://dev.to/uttkarsh123shiv/1-why-i-chose-polling-over-websockets-for-file-processing--4242</guid>
      <description>&lt;p&gt;While building a file conversion and sharing app, I needed a way to show users the status of their file processing.&lt;/p&gt;

&lt;p&gt;My initial thought was WebSockets.&lt;/p&gt;

&lt;p&gt;Realtime updates sounded like the obvious choice.&lt;/p&gt;

&lt;p&gt;But after thinking about the actual requirement, I realized users didn’t need instant push notifications — they only needed occasional feedback about whether conversion had finished.&lt;/p&gt;

&lt;p&gt;So I went with polling every 2 seconds.&lt;/p&gt;

&lt;p&gt;The flow became:&lt;/p&gt;

&lt;p&gt;Upload → Job queued (BullMQ) → Worker processes file → Frontend polls status → Result ready&lt;/p&gt;

&lt;p&gt;Why polling worked better here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simpler architecture&lt;/li&gt;
&lt;li&gt;No persistent connections to manage&lt;/li&gt;
&lt;li&gt;No communication layer between workers and socket server&lt;/li&gt;
&lt;li&gt;Easier to debug and reason about&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tradeoff:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More HTTP requests&lt;/li&gt;
&lt;li&gt;Users continue polling until processing completes&lt;/li&gt;
&lt;li&gt;Not suitable for low-latency or collaborative experiences&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the requirements change to things like chat, live collaboration, or instant notifications, I’d revisit WebSockets.&lt;/p&gt;

&lt;p&gt;This was a good reminder that architecture decisions depend more on requirements than technology preferences.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>systemdesign</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
