<?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[Yasar's blog]]></title><description><![CDATA[Yasar's blog]]></description><link>https://blogs.yasararafath.in</link><generator>RSS for Node</generator><lastBuildDate>Thu, 30 Apr 2026 01:35:13 GMT</lastBuildDate><atom:link href="https://blogs.yasararafath.in/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Vercel's fluid compute]]></title><description><![CDATA[The good
I’ve been a fan of serverless functions for a long time. In the early years, it was partly because of the fancy term “serverless” — it felt like magic, straight out of a fantasy. Ever since AWS Lambda launched in 2014, it has been a hot topi...]]></description><link>https://blogs.yasararafath.in/vercels-fluid-compute</link><guid isPermaLink="true">https://blogs.yasararafath.in/vercels-fluid-compute</guid><category><![CDATA[Vercel]]></category><category><![CDATA[FluidCompute]]></category><category><![CDATA[serverless]]></category><dc:creator><![CDATA[Yasar Arafath]]></dc:creator><pubDate>Thu, 10 Jul 2025 18:17:04 GMT</pubDate><content:encoded><![CDATA[<h3 id="heading-the-good">The good</h3>
<p>I’ve been a fan of serverless functions for a long time. In the early years, it was partly because of the fancy term “serverless” — it felt like magic, straight out of a fantasy. Ever since AWS Lambda launched in 2014, it has been a hot topic in the infrastructure world. It eliminates most of the infrastructure overhead: just write some code, package it, deploy it as a function, and it scales like magic. Sounds good, right?</p>
<h3 id="heading-the-bad">The bad</h3>
<p>Although serverless makes the most sense for stateless applications, it comes with some serious downsides — most notably, cold starts. While services like AWS Lambda have reduced cold start times significantly, it's still one of the drawbacks of serverless architecture. On top of that, CPU timings and wall-clock timings make cost predictions harder, adding another layer of complexity.</p>
<h2 id="heading-fluid-compute">Fluid compute</h2>
<p>Vercel’s new computing solution is called <strong>Fluid Compute</strong>, and I think it addresses some of the key problems we’ve had with traditional serverless architecture. While nothing has fundamentally changed, Fluid Compute allows the reuse of the same underlying hardware to run multiple functions. This greatly reduces costs, as multiple functions share the same resources.</p>
<p>Some sources suggest that Vercel still uses AWS Lambda under the hood, but they’ve engineered a sophisticated layer on top to achieve high levels of application concurrency. Since the same hardware is used to run multiple functions simultaneously, cold start times are also significantly reduced.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752169801716/3c0c7ed1-c4b7-4db7-897b-f70a579a6980.png" alt class="image--center mx-auto" /></p>
<p>The thing I’m most excited about is <strong>application concurrency</strong> — it can significantly reduce application latency.</p>
<p>If you want to learn more about Fluid Compute, I highly recommend reading <a target="_blank" href="https://vercel.com/blog/introducing-fluid-compute">Original article</a> from vercel.</p>
<p>If the sources are correct — and Vercel is indeed using AWS under the hood while still achieving this level of application concurrency — then I believe they could do an even better job if they owned the infrastructure themselves.</p>
<p>Let me know what do you think 😉.</p>
]]></content:encoded></item><item><title><![CDATA[Deploying python docker containers on aws lambda]]></title><description><![CDATA[In this article, we are going to go through how to deploy your Python Docker containers to AWS Lambda.
Architecture of AWS Lambda
AWS Lambda architecture is slightly different from traditional server architecture. It runs functions as code, meaning y...]]></description><link>https://blogs.yasararafath.in/deploying-python-docker-containers-on-aws-lambda</link><guid isPermaLink="true">https://blogs.yasararafath.in/deploying-python-docker-containers-on-aws-lambda</guid><category><![CDATA[Docker]]></category><category><![CDATA[aws lambda]]></category><category><![CDATA[serverless]]></category><category><![CDATA[Python]]></category><dc:creator><![CDATA[Yasar Arafath]]></dc:creator><pubDate>Sun, 02 Feb 2025 06:42:08 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1738477013586/472730d4-5947-4c1e-9583-79be58b65d98.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this article, we are going to go through how to deploy your Python Docker containers to AWS Lambda.</p>
<h2 id="heading-architecture-of-aws-lambda">Architecture of AWS Lambda</h2>
<p>AWS Lambda architecture is slightly different from traditional server architecture. It runs functions as code, meaning you define your logic in a function of code and let Lambda take care of deploying and running your code.</p>
<p>So, let’s get started.</p>
<h2 id="heading-code">Code</h2>
<p>In <a target="_blank" href="http://app.py"><code>app.py</code></a>:</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> json

<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">lambda_handler</span>(<span class="hljs-params">event, context</span>):</span>
    <span class="hljs-keyword">return</span> {
        <span class="hljs-string">"statusCode"</span>: <span class="hljs-number">200</span>,
        <span class="hljs-string">"headers"</span>: {
            <span class="hljs-string">"Content-Type"</span>: <span class="hljs-string">"application/json"</span>
        },
        <span class="hljs-string">"body"</span>: json.dumps({<span class="hljs-string">"message"</span>: <span class="hljs-string">"Hello from AWS Lambda!"</span>})
    }
</code></pre>
<p>In <code>Dockerfile</code>:</p>
<pre><code class="lang-dockerfile"><span class="hljs-keyword">FROM</span> public.ecr.aws/lambda/python:<span class="hljs-number">3.11</span>

<span class="hljs-keyword">COPY</span><span class="bash"> app.py /var/task/</span>

<span class="hljs-keyword">CMD</span><span class="bash"> [<span class="hljs-string">"app.lambda_handler"</span>]</span>
</code></pre>
<p>Here, the Python base image must be pulled from AWS ECR. We have to log in to Docker with AWS ECR (assuming the reader has AWS account access):</p>
<pre><code class="lang-bash">aws ecr get-login-password --region &lt;your-region&gt; | docker login --username AWS --password-stdin &lt;aws-account-id&gt;.dkr.ecr.&lt;your-region&gt;.amazonaws.com
</code></pre>
<p>Replace your account ID and your region in this command, and you'll be good to go.</p>
<p>Now, tag the Docker image you just built with the repository name in AWS ECR:</p>
<pre><code class="lang-bash">docker tag &lt;container_name&gt;:latest &lt;ecr_repository_name&gt;:latest
</code></pre>
<p>Now we can finally push our image to AWS ECR:</p>
<pre><code class="lang-bash">docker push &lt;ecr_repository_name&gt;:latest
</code></pre>
<h2 id="heading-lambda">Lambda</h2>
<p>In the AWS Lambda management console, go ahead and create a new function.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738953157417/d3299249-8293-4b87-924e-e505287e4f78.png" alt class="image--center mx-auto" /></p>
<p>Click on "Create function," choose the container image option, and select the ECR repository from the dropdown.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738953185618/9297efc3-ccd0-4767-a8c1-26b7ae630745.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738953205004/f9c33ca1-c372-4882-9e06-9756d578bbcc.png" alt class="image--center mx-auto" /></p>
<p>That’s it! Your function is now ready.</p>
<p>We can also check its functionality by clicking on the test button to make sure everything is working as expected.</p>
<p>Now that we have set up our Lambda function, we need to make the function available to the public internet. To do this, we are using AWS API Gateway.</p>
]]></content:encoded></item></channel></rss>