<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Collins Blog]]></title><description><![CDATA[Collins Blog]]></description><link>https://aura-movies.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 26 Oct 2026 15:53:46 GMT</lastBuildDate><atom:link href="https://aura-movies.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How I Built a Free Streaming Site Handling 18k Requests/Day (React + Netlify)]]></title><description><![CDATA[How I built a React-based streaming site (Aura Movies) to handle 18k requests/day using Netlify and Sentry for performance monitoring.]]></description><link>https://aura-movies.hashnode.dev/how-i-built-a-free-streaming-site-handling-18k-requestsday-react-netlify</link><guid isPermaLink="true">https://aura-movies.hashnode.dev/how-i-built-a-free-streaming-site-handling-18k-requestsday-react-netlify</guid><category><![CDATA[react web development]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[sentry]]></category><category><![CDATA[side project]]></category><dc:creator><![CDATA[Collins Otieno]]></dc:creator><pubDate>Sat, 27 Dec 2025 21:03:24 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1767116673895/9647b4b6-f0a8-4e0e-8045-e280b6dab196.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-the-uncle-please-moment">The "Uncle Please" Moment</h2>
<p>It was 11 PM on a Friday. My dinner was getting cold, and I just wanted to watch a movie. But the internet had other plans.</p>
<p>I visited "Site A", it assaulted me with 5 pop-up gambling ads. I visited "Site B", it asked for a credit card for a "Free Trial." I visited "Site C" ,and hit the dreaded <strong>"Invitation Code Only"</strong> wall.</p>
<p>I found myself scouring Reddit threads, scrolling past hundreds of people commenting <em>"Uncle please, DM me a code."</em> It was pathetic. I felt like a beggar in a digital city.</p>
<p>That's when the frustration turned into code. I closed the browser, opened VS Code, and made a promise: <strong>I am going to build a streaming site that just works. No login. No begging. No ads.</strong></p>
<h2 id="heading-the-architecture-speed-or-nothing">The Architecture: Speed or Nothing</h2>
<p>I didn't have a budget for servers, so I had to be smart. I needed a stack that was free to start but could handle a sudden spike (spoiler: I was right to worry about this).</p>
<ul>
<li><p><strong>The Engine:</strong> <strong>React + Vite</strong>. I needed the site to load instantly. Old school MPAs (Multi-Page Apps) were too slow for the "app-like" feel I wanted.</p>
</li>
<li><p><strong>The Edge:</strong> <strong>Netlify</strong>. I used their global CDN to serve the frontend. This ensures that a user in Nairobi gets the same speed as a user in New York.</p>
</li>
<li><p><strong>The Style:</strong> <strong>Tailwind CSS</strong>. Because I didn't want to spend 6 hours debugging a CSS class named <code>.wrapper-inner-div-final-2</code>.</p>
</li>
</ul>
<h2 id="heading-the-oh-st-moment">The "Oh S**t" Moment</h2>
<p>I shipped the MVP on Sunday night. I named it <a target="_blank" href="https://auramovies.top"><strong>Aura Movies</strong></a>.</p>
<p>I shared the link in a small group chat and went to sleep.</p>
<p>When I woke up, my phone was hot. I checked my Netlify dashboard and my heart skipped a beat. <strong>Requests: 18,492.</strong> <strong>Bandwidth: Spiking.</strong></p>
<p>The internet had found the link. People were sharing it as a "hidden gem." But as I clicked through the live site, it felt... <em>heavy</em>. After watching three movie trailers, my browser tab started lagging. My laptop fans spun up like a jet engine.</p>
<p>Something was wrong. My app was bleeding memory, and I was flying blind.</p>
<h2 id="heading-the-ghost-in-the-machine">The Ghost in the Machine</h2>
<p>I couldn't reproduce the lag on my local server (<code>localhost:5173</code>). Everything seemed fine. But in production, users were reporting crashes.</p>
<p>I realized I couldn't debug 18,000 users by guessing. I needed X-Ray vision.</p>
<p>I installed <strong>Sentry</strong> (an error tracking tool). Within 5 minutes of deploying the tracker, the dashboard lit up red. The error?</p>
<p><code>MaxListenersExceededWarning: Possible EventEmitter memory leak detected.</code></p>
<p><strong>The Diagnosis:</strong> In my rush to build the video player component, I had committed a classic React sin. Every time a user clicked "Next Movie," I was mounting a new instance of the VideoJS player. But—<strong>and this is the critical part</strong>. I wasn't <em>killing</em> the old one.</p>
<p>If a user browsed 10 movies, I had 10 invisible video players running in the background, all listening for events, eating up the user's RAM until their browser crashed.</p>
<h2 id="heading-the-one-line-fix">The One-Line Fix</h2>
<p>The solution wasn't a bigger server. It was <strong>Garbage Collection</strong>.</p>
<p>I went into my <code>useEffect</code> hook and added a cleanup function. This tells React: <em>"Hey, when the user leaves this page, destroy this player immediately."</em></p>
<p>JavaScript</p>
<pre><code class="lang-plaintext">useEffect(() =&gt; {
  // Initialize the player
  const player = videojs(videoNode, options);

  // The Cleanup Phase (The Savior)
  return () =&gt; {
    if (player) {
      player.dispose(); // 🗑️ Kill the zombie component
    }
  };
}, [options]);
</code></pre>
<p>I pushed the fix. The error rate on Sentry dropped to <strong>zero</strong> instantly. The site was buttery smooth again.</p>
<h2 id="heading-whats-next">What's Next?</h2>
<p>Aura Movies is now stable and serving thousands of users daily without costing me a cent.</p>
<p>My next engineering challenge? <strong>Africa-First Optimization.</strong> I am building a "Data Saver" mode that uses aggressive compression to allow users with expensive mobile data bundles to stream high-quality content without draining their wallets.</p>
<p><strong>You can check out the live build here:</strong> <a target="_blank" href="https://auramovies.top"><strong>auramovies.top</strong></a> <em>(And yes, you can try to break it. I'm watching the logs )</em></p>
]]></content:encoded></item></channel></rss>