<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ashan Dimantha Herath on Medium]]></title>
        <description><![CDATA[Stories by Ashan Dimantha Herath on Medium]]></description>
        <link>https://medium.com/@ashandimanthalk?source=rss-e4d8b3c30029------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*htSwUh02_9EZgw0gqYJ9rw.jpeg</url>
            <title>Stories by Ashan Dimantha Herath on Medium</title>
            <link>https://medium.com/@ashandimanthalk?source=rss-e4d8b3c30029------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 02:26:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ashandimanthalk/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AWS Regions, Availability Zones, and Latency: How to Choose Where to Host Your App]]></title>
            <link>https://blog.stackademic.com/aws-regions-availability-zones-and-latency-how-to-choose-where-to-host-your-app-3ee18e6a354c?source=rss-e4d8b3c30029------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ee18e6a354c</guid>
            <category><![CDATA[amazon-web-services]]></category>
            <category><![CDATA[resilience]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Ashan Dimantha Herath]]></dc:creator>
            <pubDate>Thu, 19 Nov 2026 06:19:51 GMT</pubDate>
            <atom:updated>2026-11-19T06:19:51.161Z</atom:updated>
            <content:encoded><![CDATA[<p>When we first deploy an application on AWS, we’re asked to pick a region from a dropdown in AWS Console, and what we should do is accept the default and move on. That choice affects how fast our app feels to users, which services we can use, what we pay, whether we meet legal requirements, and how well our system survives a failure. Changing it later make chaos, usually means migrating data, updating DNS, and retesting everything, so it’s worth understanding before you click.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I9c1MbWgXmS76q7lqFN0mw.png" /></figure><p>So through this blog, let’s deep dive the building blocks of AWS infrastructure, the physics of latency, and a practical process for choosing the optimal place to our app to live. 🌐</p><h3>The building blocks: Regions, Availability Zones, and more</h3><p>Let’s start with regions 🗺️</p><h4>Regions</h4><p>A Region is a geographic area like US East (N. Virginia), which is us-east-1, or Europe (Ireland), which is eu-west-1. Each Region is an independent collection of AWS infrastructure. <strong>Resources we create in one Region are, by default, isolated from other Regions</strong>. As an example, a EC2 we create in us-east-1 doesn’t exist in eu-west-1 unless you create one there or set up replication.</p><p>AWS operates dozens of Regions worldwide, and new ones appear regularly. Some Regions are “opt-in,” meaning we must enable them in our account settings before we use them. We can list the Regions available to your account with:</p><pre>aws ec2 describe-regions --all-regions</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HV9HE3oyAri3rTUxwYFIqw.png" /></figure><blockquote>But for this we need to make sure we have installed and configured AWS CLI already. Otherwise follow the doc 📔</blockquote><p><a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html#getting-started-install-instructions">Installing or updating to the latest version of the AWS CLI — AWS Command Line Interface</a></p><h4>Availability Zones</h4><p>Inside each Region, there are Availability Zones, usually <em>abbreviated AZs.</em> An AZ is one or more discrete data centers <strong>with independent power, cooling, and networking</strong>. Most Regions have at least three AZs, and they’re named by appending a letter to the Region code, such as us-east-1a, us-east-1b, and us-east-1c.</p><p>AZs are <strong>physically separated </strong>enough that a power failure, fire, or natural disaster or something else in one shouldn’t take down the others. They’re connected by fast, low-latency private links, so applications can span multiple AZs with little performance penalty. The key idea is that AZs provide fault isolation within a Region.</p><p>Note that AZ names are mapped per account. As an example, our us-east-1a may correspond to a different physical data center than someone else account’s us-east-1a.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QAfoElOn0BWzKd1OA-kQgw.png" /></figure><h4>Edge locations</h4><p>Edge locations are smaller sites used by Amazon CloudFront and Route 53 <strong>to cache content and answer DNS queries close to users</strong>. They’re far more numerous than Regions, and they’re where you put static assets and cached responses to cut latency for global audiences. <strong>We don’t choose an edge location directly</strong>; CloudFront routes each user to a nearby one.</p><h4>Local Zones and Wavelength</h4><p>Some workloads need compute closer to users than a Region can provide. AWS Local Zones extend a Region into a metropolitan area, which helps with real-time gaming, media production, or applications serving a specific city. AWS Wavelength embeds compute in telecom networks for very low latency to mobile devices. Both are specialized, but they’re worth knowing about when a standard Region is too far away.</p><h4>Outposts</h4><p>AWS Outposts can run AWS infrastructure in our own data center or on-premises facility. It’s useful when data must stay on-site or when latency to local systems is critical. It’s a larger commitment than the other options, so it’s typically for enterprises with specific requirements.</p><h3>Understanding latency</h3><p>Latency is <strong>the time it takes for data to travel between two points</strong>, usually measured as round-trip time (RTT). Its main physical limit is the speed of light. Light travels through optical fiber at roughly two-thirds of its speed in a vacuum, which works out to about 200,000 kilometers per second. Signals also don’t travel in straight lines, and routers, switches, and transoceanic cables add delay. As a result, real-world latency is always higher than the theoretical minimum.</p><p>A rough rule of thumb is that <em>each 1,000 kilometers of fiber adds about 10 milliseconds of round-trip time</em>, before routing overhead. As example let’s take approximate round-trip times from a user in New York look like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gnNkRI3j2c1QilCB4Iu-_A.png" /><figcaption>These figures are estimates and vary with network conditions, so measure your own before making decisions.</figcaption></figure><h4>Why latency matters</h4><p>For a page that makes several sequential requests, each round trip adds up. A dashboard that makes ten calls in sequence to a server 150 ms away spends 1.5 seconds just waiting on the network, before any processing. Latency also affects database performance when an application chats frequently with its data store, and it affects real-time features like chat, collaboration, and gaming.</p><p>The effect varies by workload. <em>A nightly batch job barely notices 150 ms. A video call or trading system notices it immediately.</em></p><h4>Measuring latency yourself</h4><p>Before choosing a Region, measure the latency from where the users are. Useful approaches like followings:</p><ul><li><strong>CloudPing (cloudping.info)</strong>, a public tool that measures latency from your browser to every AWS Region.</li><li><strong>curl timing</strong> against a test endpoint in each candidate Region:</li></ul><pre>curl -o /dev/null -s -w &quot;Connect: %{time_connect}s  TTFB: %{time_starttransfer}s  Total: %{time_total}s\n&quot; https://your-test-endpoint.example.com/health</pre><p><em>For above test, the easiest way is deploying a simple AWS Lambda test endpoint in few regions.</em></p><ul><li><strong>Real user monitoring</strong> from our production app, once you have traffic, so you’re measuring actual users rather than assumptions.</li></ul><h3>How Regions, AZs, and latency fit together</h3><p>As we know, choosing a Region and choosing AZs solve different problems. The <strong>Region decides where our application lives</strong> and how far it is from the users. <strong>AZs decide how well our application survives failures within that Region</strong>. 😉</p><p>Inside a <strong>single Region, latency between AZs is very low</strong>, usually around a millisecond or two. That’s why it’s common to run a web tier, application tier, and database spread across three AZs with almost no user-facing penalty <em>(time)</em>. Across Regions, latency is measured in tens or hundreds of milliseconds, <strong>so cross-Region calls in the request path are generally avoided</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jtg1zF-lAHw5XhAECO7n8A.png" /></figure><p>Also in terms of cost, it is also affected. <strong>Data transfer between AZs in the same Region is charged, typically per gigabyte in each direction</strong>, so chatty architectures that send lots of data across zones can add up. Data transfer between Regions is charged as well, and it’s usually higher than within a Region. Traffic from AWS to the internet is charged too, which is why egress costs deserve attention when you choose where to serve data.</p><p>Before you start, it is recommended to check the current AWS data transfer pricing page for exact rates, as they change.</p><h3>Factors to weigh when choosing a Region</h3><p>Now, let’s move towards one of the most important part of this blog. 😁</p><h4>1. Where our users are</h4><p>We have to start with your audience. If our most users are in Germany, Ireland or Frankfurt will serve them better than Virginia. If our users are spread across continents, you may need a primary Region near your largest group and CloudFront or a multi-Region design for the rest.</p><p><em>That’s the way we have to choose 😉</em></p><h4>2. Legal and compliance requirements</h4><p>Data residency rules can override everything else. Regulations such as the GDPR, CCPA or sector rules in healthcare and finance, may require personal data to stay in specific countries or Regions. Some government and public sector workloads also have strict location requirements. Review these requirements within our legal or compliance team before deciding, because moving data after launch is expensive and sometimes impossible without notice to customers.</p><p><em>That is a point sometimes developers miss when they are in technical mindset, But must to consider that too👨‍💻</em></p><h4>3. Service availability</h4><p>Not every AWS service is available in every Region, and new services often launch first in a handful of Regions, usually including us-east-1. Before committing, confirm that every service you plan to use is available in your candidate Region. The AWS Regional Services List page shows this, and the console’s service pages indicate availability too.</p><h4>4. Price</h4><p>Pricing differs by Region. The same EC2 instance type can cost more in one Region than another, and s<strong>ome services have different rates or free tier behavior</strong>. For cost-sensitive workloads, compare prices in the AWS Pricing Calculator for each candidate.</p><p><strong>You can visit it here</strong> : <a href="https://calculator.aws/#/">https://calculator.aws/#/</a></p><p>Keep in mind that the <strong>cheapest Region isn’t always the best choice</strong> once latency, compliance, and data transfer are included.</p><h4>5. Resilience requirements</h4><p>Our availability target determines how many AZs and possibly Regions we need. For many applications, running across three AZs within one Region provides strong protection against most failures. A Region-wide failure is rare, but it has happened, so mission-critical systems may need a second Region with a documented failover plan. Each added Region multiplies complexity and cost, so match the design to the real business impact of downtime.</p><p><em>These resilience requirements are very critical when deciding where our data lives and how we spread infrastructure across zones and regions with the ongoing conflicts, geopolitical instability and security risks . ⚠️</em></p><h4>6. Existing services</h4><p>If your company already runs workloads in a Region, keeping new services there reduces network complexity, simplifies access controls, and avoids cross-Region data transfer. A Region choice that makes architecture simpler is often more valuable than one that saves a few percent on compute.</p><p><em>Then, let’s move towarda a practical way to decide is to work through a short sequence. 😜</em></p><h3>A step-by-step process for choosing</h3><ol><li><strong>Identify our users and their locations.</strong> Use analytics to see where traffic comes from today, or estimate for a new product.</li><li><strong>Check legal and data residency constraints.</strong> These are non-negotiable, so apply them first.</li><li><strong>Shortlist two or three Regions</strong> that satisfy the constraints and sit close to your users.</li><li><strong>Confirm service availability</strong> for every service in your architecture in each shortlisted Region.</li><li><strong>Measure latency</strong> from representative locations using the tools above.</li><li><strong>Compare costs</strong> with the AWS Pricing Calculator, including data transfer.</li><li><strong>Decide on AZ and Region redundancy</strong> based on your availability target.</li><li><strong>Document the decision</strong> and the reasons behind it, so future team members understand the trade-offs.</li></ol><h3>A worked example 😁</h3><p>Imagine a small SaaS company based in Toronto with customers mostly in Canada and the northeastern United States. The product stores customer records, and the company’s contract requires that Canadian customer data stay in Canada.</p><p>The first step is data residency. Canada has the Canada (Central) Region, ca-central-1, which satisfies the requirement. The team then checks service availability for their planned stack, which uses Lambda, API Gateway, Aurora PostgreSQL, S3, and CloudFront. All are available in ca-central-1.</p><p>Next, the team measures latency from Toronto and Montreal to ca-central-1 and to us-east-1 for comparison. The Canadian Region offers noticeably lower round-trip times for local users, and the difference is more visible in their real-time dashboard, which makes several sequential calls.</p><p>For resilience, they deploy Aurora across three AZs in ca-central-1 and enable automated backups. They decide against a second Region for now, because their availability target is satisfied by multi-AZ, and a cross-Region disaster recovery plan can be added later if customers require it. CloudFront serves static assets from edge locations near the northeastern US customers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7hhbhm3b6jICfxER13mlJw.png" /><figcaption>high-level diagram for the example</figcaption></figure><p>The result is a design that meets the legal requirement, delivers good latency to most users, and stays simple enough for a small team to operate. The team documents the decision and sets a review date.</p><p><em>Okay then, let’s wrap up 😝</em></p><h3>Wrapping up</h3><p>Choosing where to host our application is one of the most important early decisions on AWS. Regions determine proximity to users, legal compliance, service availability, and cost. Availability Zones provide fault tolerance within a Region, and they usually give you most of the resilience a typical application needs. Latency is governed by physics, so measure it from where your users actually are rather than relying on assumptions.</p><p>Start with the requirements that are fixed, such as data residency. Shortlist a few Regions, confirm the services are available, measure latency, and compare costs. Spread the workload across at least three AZs, and add a second Region only when your availability needs justify the added complexity. A clear, documented decision made this way will serve your application well as it grows.</p><p>&lt;Happy Coding 😉/&gt;</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ee18e6a354c" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/aws-regions-availability-zones-and-latency-how-to-choose-where-to-host-your-app-3ee18e6a354c">AWS Regions, Availability Zones, and Latency: How to Choose Where to Host Your App</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From React Assets to CDN: Optimizing Image Delivery with AWS S3 and CloudFront: A Complete Guide…]]></title>
            <link>https://aws.plainenglish.io/from-react-assets-to-cdn-optimizing-image-delivery-with-aws-s3-and-cloudfront-a-complete-guide-77a059ffd3fd?source=rss-e4d8b3c30029------2</link>
            <guid isPermaLink="false">https://medium.com/p/77a059ffd3fd</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-cloudfront]]></category>
            <category><![CDATA[seo]]></category>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Ashan Dimantha Herath]]></dc:creator>
            <pubDate>Thu, 10 Sep 2026 05:43:44 GMT</pubDate>
            <atom:updated>2026-09-10T05:43:44.446Z</atom:updated>
            <content:encoded><![CDATA[<h3>From React Assets to CDN: Optimizing Image Delivery with AWS S3 and CloudFront: A Complete Guide with SEO Practices</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mn-6RpladGMCvX1j3ZdL4Q.png" /></figure><p>As we know images are one of the critical parts of modern web applications. We use them to make website more interactive and aesthetic. However, improperly handling images in a web application can significantly slow down performance, increase bundle size, and negatively impact SEO.</p><p>Many developers initially store images inside their project and import them directly into components. While this works, it is not the best approach for production-grade applications.</p><p>So from this guide you can get complete step by step guide with explanation including:</p><ul><li>Why storing images inside web apps is inefficient</li><li>How AWS S3 and CloudFront solve this problem</li><li>Step-by-step setup instructions</li><li>How to use images correctly in React</li><li>SEO best practices for image delivery</li><li>Common errors and solutions</li></ul><p>I’ve written this blog for beginners and requires no prior AWS experience. For just for reference, I’ve used React, a JavaScript library, you can use any.</p><h3>Why Storing Images Inside React is Not Ideal</h3><p>Firts let’s see how the common approach in React projects is storing images inside the project folder.</p><pre>src/assets/images/hero.webp<br>src/assets/images/gallery/photo1.webp</pre><p>And importing them like this:</p><pre>import heroImage from &quot;../assets/images/hero.webp&quot;;</pre><p>This approach creates several problems in production as follows.</p><h4>1. Increased Bundle Size</h4><p>When images are imported, they become part of the our application bundle. Then the larger bundles increase load time and reduce performance too.</p><h4>2. Slower Loading Speed</h4><p>Images are served from the application origin instead of a global Content Delivery Network (CDN). It leads to slower loading speeds.</p><h4>3. Negative Impact on SEO</h4><p>Page speed is a ranking factor in search engines. Slow image delivery reduces SEO performance depending on that.</p><h3>The Recommended Solution: AWS S3 + CloudFront</h3><p>The industry-standard solution is to store images in Amazon S3 and deliver them using Amazon CloudFront.</p><blockquote><strong><em>Please Note: </em></strong>If you are using a server/back-end service you need to configure to upload the image directly to the S3 instead of this. But this is just a beginners guide to get the fundamental idea of how S3 and CloudFront work.</blockquote><p>Architecture:</p><pre>React Application<br>        ↓<br>CloudFront (CDN)<br>        ↓<br>Amazon S3 (Image Storage)</pre><p>Before jumping into the implementation, let’s take a moment to understand the terms and their use cases.</p><p>Understanding <em>why</em> we are using these services is more important than simply following a series of steps without knowing what they actually do. It helps you make better architectural decisions and understand what is happening behind the scenes 🤪</p><h4>Amazon S3 Bucket</h4><p><strong>Amazon S3 bucket</strong> is cloud-based storage that we can store our files such as images, videos, documents, and other static assets. For a web application like this project, an S3 bucket can act as a centralized and scalable place to store images separately from our application itself.</p><p><strong>In simple terms:</strong></p><blockquote><em>S3 is where our images are stored.</em></blockquote><h4>CDN (Content Delivery Network)</h4><p>In simple terms, a <strong>CDN</strong> is a network of servers distributed across different geographic locations. It caches and delivers the website’s static content like images, CSS, JavaScript from a location closer to the user. <em>(Eg: web user)</em></p><p>This reduces latency and can make content load significantly faster.</p><p><strong>In simple terms:</strong></p><blockquote><em>A CDN is a network that delivers our files faster by serving them from a nearby location.</em></blockquote><h4>Amazon CloudFront</h4><p><strong>Amazon CloudFront</strong> is AWS’s CDN service. It sits between our users and our S3 bucket, caching your images at AWS edge locations around the world.</p><p><strong><em>Then what happens is S3 stores our images, while CloudFront delivers those images quickly to users around the world as the CDN </em></strong>✨</p><h4><strong>Benefits</strong></h4><ul><li>Faster global delivery</li><li>Reduced application bundle size</li><li>Efficient caching</li><li>Better scalability</li><li>Improved SEO performance</li></ul><h3>Step 1: Create an S3 Bucket</h3><p>First, open AWS Console and navigate to <strong>Amazon S3</strong>.🪣</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bvCi02sLAE9GYxVAB23N8g.png" /></figure><p>Then click:</p><pre>Create bucket</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XwJEptS9YsDF7aACS2PLsw.png" /></figure><p>Provide a unique bucket name:</p><pre>my-app-images</pre><p>Select your preferred region.</p><p>Disable:</p><pre>Block all public access</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tu7tTdI17-3QVbmx8h1S1g.png" /></figure><p>Now, we can confirm the warning and create the bucket.</p><h3>Step 2: Organize and Upload Images</h3><p>Open the bucket and create folders to organize images:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zNAS-rV_gdLl5hS9xwoXVQ.png" /></figure><p>Example structure:</p><pre>assets/<br>   images/<br>      hero/<br>      gallery/<br>      products/</pre><p>Upload images into appropriate folders.</p><p>Example:</p><pre>assets/images/hero/hero-image.webp</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qsOUz0-fwmX5lHTirz9-uA.png" /></figure><p>Now we can try from the “Object URL” provide for the images you uploaded.</p><p>But you would get a “Access Denied” page as bellow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f0mcGMYJZSN58Tg9XmbEnQ.png" /></figure><p>Let’s see how to solve that then.</p><h3>Step 3: Configure Public Access Policy</h3><p>To allow images to be accessible publicly, we need to configure the bucket policy.</p><p>Navigate to:</p><pre>Bucket → Permissions → Bucket Policy</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qpe0d7p2JyGiJEYFegPPVw.png" /></figure><p>Add the following policy:</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Sid&quot;: &quot;PublicReadAccess&quot;,<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Principal&quot;: &quot;*&quot;,<br>      &quot;Action&quot;: &quot;s3:GetObject&quot;,<br>      &quot;Resource&quot;: &quot;arn:aws:s3:::my-app-images/*&quot;<br>    }<br>  ]<br>}</pre><p>This allows public read access to objects and now you can see the images using “Object URL”</p><h3>Step 4: Configure CORS Policy</h3><p>CORS configuration allows your web application to access S3 resources.</p><p>Navigate to:</p><pre>Bucket → Permissions → CORS configuration</pre><p>Add:</p><pre>[<br>  {<br>    &quot;AllowedHeaders&quot;: [&quot;*&quot;],<br>    &quot;AllowedMethods&quot;: [&quot;GET&quot;],<br>    &quot;AllowedOrigins&quot;: [&quot;*&quot;]<br>  }<br>]</pre><blockquote><strong><em>Note</em></strong>: This allows all the origins, methods and headers. But it is not recommended in real-world production environments. So it’s better to allow only required CORS.</blockquote><h3>Step 5: Create a CloudFront Distribution</h3><p>Now from the AWS Console, navigate to <strong>Amazon CloudFront</strong>. ☁️</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uivyjlblzKzd3BLXqVaHxg.png" /></figure><p>Click:</p><pre>Create Distribution</pre><p>Then you have to select plan. We can just depend on the Free plan with 0$ of cost.</p><p>Add distribution name, and distribution type as “Single website or app”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sgJ527SIT1T_bsQPmW6lPg.png" /></figure><p>Then we can select Amazon S3 as the “Origin Type” and your S3 bucket as the origin.</p><p>Leave default settings and create the distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gmewomklwLgIIOw1kg37IA.png" /></figure><p>Click “Create distribution” and wait until deployment completes.</p><p>Then you can see, CloudFront provides a domain like:</p><pre>https://dxxxxx.cloudfront.net</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tfH4lHJAuhy3pxnVc2TXWw.png" /></figure><p>Now we can test image access via CloudFront URL:</p><pre>https://dxxxxx.cloudfront.net/assets/images/hero/hero-image.webp</pre><h3>Step 6: Use CloudFront Images in React</h3><p>Now we can use the CloudFront URL instead of importing images like before 😁.</p><p>It’ better to create a configuration file:</p><pre>src/config/images.js</pre><pre>const IMAGE_BASE_URL =<br>  &quot;https://dxxxxx.cloudfront.net/assets/images&quot;;</pre><pre>export const IMAGES = {<br>  HERO: `${IMAGE_BASE_URL}/hero/hero-image.webp`,<br>  GALLERY_1: `${IMAGE_BASE_URL}/gallery/photo1.webp`,<br>};</pre><blockquote><strong>Note</strong>: Above is just a demonstration only. You can use the images as globally or component-wise depending on your requirements. Also it’s not recommended to keep the base URL in the code. You can put that in a secret.</blockquote><p>Then we can use in components like usual:</p><pre>import { IMAGES } from &quot;../config/images&quot;;</pre><pre>function Hero() {<br>  return (<br>    &lt;img<br>      src={IMAGES.HERO}<br>      alt=&quot;Website hero banner&quot;<br>      loading=&quot;lazy&quot;<br>    /&gt;<br>  );<br>}</pre><p>This ensures images load directly from CloudFront 😉.</p><h3>Why This Approach Improves Performance</h3><h4>Smaller Bundle Size</h4><p>Now, images are not included in the application bundle. It’s with CDN.</p><h4>Faster Delivery via CDN</h4><p>CloudFront delivers images from the nearest edge location.</p><h4>Better Caching</h4><p>Images are cached globally.</p><h4>Improved Scalability</h4><p>Unlimited image storage without increasing application size.</p><h3>SEO Best Practices for Images</h3><h4>Use Descriptive File Names</h4><p>Bad:</p><pre>img1.webp</pre><p>Good:</p><pre>hotel-room-ocean-view.webp</pre><p>We can use meaningful names for the images and the assets we are using. Then search engines can use filenames to understand content.</p><h4>Use Alt Attributes</h4><pre>&lt;img<br>  src={IMAGES.HERO}<br>  alt=&quot;Luxury hotel room with ocean view&quot;<br>/&gt;</pre><p>Alt attributes improve accessibility and SEO.</p><h4>Use Modern Image Formats</h4><p>We can use WebP format for better compression and performance.</p><p><strong>Benefits:</strong></p><ul><li>Smaller file size</li><li>Faster load time</li></ul><h4>Enable Lazy Loading</h4><pre>loading=&quot;lazy&quot;</pre><p>Through lazy loading we can improve page speed and performance score.</p><h3>Common Errors and Solutions</h3><h4>CORS Error</h4><p><strong>Solution</strong>: Configure CORS policy in S3.</p><h4>MIME Type Error</h4><p><strong>Cause</strong>: Attempting to import external images.</p><p><strong>Solution</strong>: Use image URLs instead of import statements.</p><p>Eg:</p><pre>&lt;img src=&quot;https://cloudfront-url/image.webp&quot; /&gt;</pre><p>Following this guide you can ensure your web applications are optimized for performance, scalability, and search engine visibility with images.</p><p>&lt;Happy Coding 😉/&gt;</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77a059ffd3fd" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/from-react-assets-to-cdn-optimizing-image-delivery-with-aws-s3-and-cloudfront-a-complete-guide-77a059ffd3fd">From React Assets to CDN: Optimizing Image Delivery with AWS S3 and CloudFront: A Complete Guide…</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy Like a Pro: The Only Guide You Need to Host Your Web App on AWS with Custom Domain & SSL]]></title>
            <link>https://aws.plainenglish.io/deploy-like-a-pro-the-only-guide-you-need-to-host-your-web-app-on-aws-with-custom-domain-ssl-8f55d3eaa145?source=rss-e4d8b3c30029------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f55d3eaa145</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[web-hosting]]></category>
            <category><![CDATA[domains]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Ashan Dimantha Herath]]></dc:creator>
            <pubDate>Thu, 08 Jan 2026 18:53:27 GMT</pubDate>
            <atom:updated>2026-01-12T07:16:07.388Z</atom:updated>
            <content:encoded><![CDATA[<p>Are you ready to launch your web application to the world but feeling overwhelmed by the technicalities of domain registration, SSL certificates, and hosting?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2bJGphHH4fWJQp1i0ymcvw.png" /></figure><p>This step-by-step guide will walk you through the industry-standard process of hosting your web app on the AWS ecosystem professionally, including Amplify, securing it with a wildcard SSL certificate from AWS Certificate Manager (ACM), and connecting your custom domain registered with Amazon Route 53. I’ll break down each step in detail, making it beginner-friendly and <strong>ensuring you have all the in-depth, comprehensive information you need to succeed.</strong> That’s the most north-start of learning. Knowing what you are doing!!</p><p><strong>By the end of this tutorial, you’ll have:</strong></p><p>✅ Your own custom domain (paid)</p><p>✅ A secure SSL certificate (that padlock icon in the browser!)</p><p>✅ Your web app gets hosted on AWS Amplify</p><p>✅ Everything connected and working together</p><p><strong>What You’ll Need:</strong></p><p>✅ An AWS account (free tier is fine to start)</p><p>✅ A credit/debit card for domain registration (~$12–15/year)</p><p>✅ Your web app code ready (HTML/CSS/JS, React, Angular, etc.)</p><p>✅ About 30–45 minutes of your time</p><p><strong>Cost Breakdown:</strong></p><p>💰Domain registration: $12–15/year (varies by TLD)</p><p>💰SSL Certificate: FREE (via AWS Certificate Manager)</p><p>💰AWS Amplify: Free tier includes 1000 build minutes/month and 15GB served/month</p><p>💰Route 53: $0.50/month per hosted zone</p><h4><strong>Overview — What we’ll do and why</strong></h4><ol><li>Buy a domain in Amazon Route 53 (Eg: www.example.com)</li><li>Request a wildcard SSL/TLS certificate in AWS Certificate Manager (ACM) and validate it via DNS.</li><li>Host your web app in AWS Amplify (connect your GitHub repo, configure build) and deploy.</li></ol><h3><strong>Step 1: Register Your Domain with Amazon Route 53</strong></h3><h4>🫨First of all, your question, what is DNS??</h4><p>We use different names to access the website or access resources on the internet. Eg: Wikipedia.com, facebook.com</p><p>Think if we have to remember and type IP addresses (Eg: 184.12.160.17) instead of typing these names? That’s where DNS comes.</p><blockquote>Think of DNS as the internet’s phonebook translates human-readable domain names (like example.com) into IP addresses that computers understand.</blockquote><blockquote>Route 53 is AWS’s domain registration and DNS (Domain Name System) service. It is a highly available and scalable cloud Domain Name System (DNS) web service. It’s a perfect place to register and manage your domain.</blockquote><p>Let’s dig in!</p><p>First, you have to sign in to the AWS Console: <a href="https://aws.amazon.com/console/">https://aws.amazon.com/console/</a></p><figure><img alt="AWS Console" src="https://cdn-images-1.medium.com/max/1024/0*nsZTXCaWeU2fg6jE.jpg" /></figure><p>You can simply search for ‘Route 53’. In the Route 53 dashboard, click on “Registered domains” in the left navigation pane, then click “Register domain.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EuwbFUiftDQr8UOFOjQK9Q.png" /><figcaption>Amazon Route 53</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kOT9lBbPnQ0IPhionO6xrA.png" /><figcaption>Search Results for Route 53</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3MpSLtUf4e6d9dx1PLZmUw.png" /><figcaption>Get Started — AWS Route 53</figcaption></figure><p>Enter your desired domain name and click Search. Eg: ‘example.com’ and click “Check” to see its availability. If it’s available, you can see a list of available top-level domains (TLDs) like .com, .net, .io, etc. Select the domain name you want and click “Add to cart.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8sW465pt4WWY3yPUAAOKXQ.png" /><figcaption>Register domains</figcaption></figure><p>Follow the prompts to configure your “Pricing”, “Contact Information”, “Review and Submit” nnd complete the purchase. Enter accurate contact details (required by ICANN regulations). Keep “Privacy Protection” ENABLED, this hides your personal information from public WHOIS databases. If you want, you can enable auto-renewal to automatically renew your domain. Otherwise, you can uncheck it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tuxU3uIB-FZZhX0zbhaKtw.png" /><figcaption>Pricing</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Ur-gCTOoZONhDlvN4ueVw.png" /><figcaption>Contact Information</figcaption></figure><p>Then you can review all details carefully and check the terms and conditions box, and click “Submit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fiEcE7Qnd63qTX0ZPXHupA.png" /><figcaption>Review and Submit</figcaption></figure><p>After successful completion, you have to wait for a confirmation email with the invoice (registration can take minutes to hours). Finally, click the verification link within 15 days, or your domain will be suspended. Then the domain will appear in your “Registered domains” list with status “Available”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gXRJzzdNIid_82epO2ox3A.png" /></figure><p>Great! Now you have a domain for you 😎</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EH_US3F7ZPpUUqx8Feb5OA.jpeg" /></figure><p>When you register a domain through Route 53, AWS automatically creates a Hosted Zone for you.</p><blockquote>A hosted zone is a container for DNS records that tell the internet how to route traffic for your domain, such as pointing a website’s address to its IP address. It includes Name Servers (NS records: Tell other DNS servers where to find information about your domain), SOA record, etc.</blockquote><p>To view your hosted zone, you can go to the Route 53 dashboard, click “Hosted zones” in the left sidebar and click on your domain name. Then you’ll see several DNS records already created.</p><p><strong>Important</strong>: Keep your hosted zone’s name servers unchanged — these are automatically configured when you register through Route 53.</p><h3>Step 2: Get a Wildcard SSL Certificate from AWS Certificate Manager (ACM)</h3><p>🫨<em>Have you seen a padlock icon in the browser?</em></p><p>🫨<em>URLs starting with https:// instead of </em><a href="http://"><em>http://</em></a><em>?</em></p><blockquote>SSL (Secure Sockets Layer) certificates encrypt data between your users and your server. Without SSL, browsers will warn users that your site is “Not Secure”, definitely it’s not the first impression you want!</blockquote><h4>🫨Then what is a wildcard?</h4><p>Have you seen a web address like blog.example.com, store.example.com?</p><p>Those are subdomains.</p><blockquote>A wildcard certificate secures your main domain AND all subdomains with a single certificate.</blockquote><p>This is incredibly convenient and cost-effective (and FREE on AWS!)</p><p>In the AWS console search bar, select “Certificate Manager” and select it. Then click on “Request a certificate.” Make sure you are in the us-east-1 region. Amplify custom domains ONLY work with ACM certificates in us-east-1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*263AAcTPviSVln02GGaxfQ.jpeg" /><figcaption>AWS Certified Manager</figcaption></figure><p>Then select “Request a public certificate” and click “Next.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vvueEIiRKbuBO64B8MRRAA.jpeg" /><figcaption>Request certificate</figcaption></figure><p>You can enter your root domain (e.g., example.com) and then add a wildcard entry for all subdomains (*.myawesomeapp.com). Or if you want, you can explicitly add your desired domains and click ‘Next’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hXBfc3x6eN5ywSdAMTfw7w.jpeg" /><figcaption>Request public certificate — 1</figcaption></figure><p>Choose “DNS validation” as it’s the easiest when using Route 53. Click “Next.” Finally, review your certificate details and click “Request.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ydqblafdvxh0uG4zCmzvuw.jpeg" /><figcaption>Request public certificate — 2</figcaption></figure><h4>🫨Why DNS validation?</h4><blockquote>DNS validation is recommended because it enables automatic renewal and is straightforward with Route 53.</blockquote><p>On the next screen, for each domain name, click the “Create records in Route 53” button. You’ll see a success message with your certificate request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nWddf0RFXJIdRi6s6C-SPQ.jpeg" /></figure><p>Click “View certificate” on the success page, and then you can see the status as “Pending validation”. This will automatically add the necessary CNAME records to your Route 53 hosted zone to validate your certificate. These records prove you control the domain. This will automatically add a CNAME validation record.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L7xxFp6jT4KUkSkzT-aHmA.jpeg" /></figure><p>Yeahh! Now you have SSL too 😎</p><h3>Step 3: Hosting Your Web App with AWS Amplify</h3><h4>What is AWS Amplify?</h4><p>AWS Amplify is a powerful serverless platform that makes it incredibly easy to build, deploy, and host web and mobile applications.</p><p>It provides a CI/CD pipeline which automatically builds and deploys your code from GitHub, automatic scaling, and a global content delivery network (CDN) for fast performance.</p><h4>Before deploying,</h4><p>You can make sure your project is ready for hosting. For a basic static site, make sure it has an<strong> index.html </strong>file in your root directory and all assets (CSS, JS, images) properly linked.</p><p>For React/Vue/Angular apps, you can ensure your project builds successfully locally. You can test with <strong>npm run build</strong> or equivalent</p><h4>Let’s deploy!!</h4><p>As we did before for previous steps search for “Amplify” in the AWS Console and click on “AWS Amplify”.</p><p>Click “Get Started” under “Amplify Hosting”. You’ll see options to deploy from Git or deploy without Git.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PpFQPELnA_2aq0vW_DSCew.jpeg" /><figcaption>AWS Amplify</figcaption></figure><p><strong>Best Practice:</strong> Push your code to a Git repository (GitHub, GitLab, or Bitbucket) for easy deployment and updates.</p><p>You can click “GitHub” (or your preferred Git provider) and “Continue”. Then you have to authorize AWS Amplify to access your repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iRDeRX3bth1xqjn4QktvTg.jpeg" /><figcaption>Start building with Amplify</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*zKShvenwviXMJnULxupgqA.jpeg" /><figcaption>Authorize AWS Amplify with GitHub</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*YF0C1INt4c1ss_Wne9lopg.jpeg" /><figcaption>Giving access to the account</figcaption></figure><p>Select the branch to deploy (usually main or master), which includes the deploy-ready updates. Click “Next”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6WSkmZiLyV14UjYwC_xgXw.jpeg" /><figcaption>Add repository and branch</figcaption></figure><p>Now you can review all settings one final time and click “Save and deploy”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IIAoJ1Q25jsiMpI97AmXBg.jpeg" /><figcaption>App settings</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IU4KF5yp90vZgP9CvJnfxw.jpeg" /><figcaption>Review</figcaption></figure><p>Now it’s time to deploy your app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m7ikDJ9IbL8kAGVNHi1W_A.jpeg" /><figcaption>Deploying</figcaption></figure><p>Amplify will now:</p><ul><li>Provision resources</li><li>Download your code (if from Git)</li><li>Build your application</li><li>Deploy to the CDN</li><li>Generate a temporary domain</li></ul><p>Now you’ll see a real-time build log which includes stages like Provision → Build → Deploy → Verify</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hDaIyyQj3uKj0A0yXgkcbw.jpeg" /><figcaption>App Overview</figcaption></figure><p>The entire process takes 3–5 minutes for most apps<br>A green checkmark means success! ✅</p><p>❌Otherwise, you have seen what has happened to your code and should debug it. Then you can push that to your deployment-ready branch in GitHub. It automatically triggers the deployment again.</p><p>Once deployed, you’ll see a URL like: <a href="https://main.d1a2b3c4d5e6f7.amplifyapp.com/">https://main.a1a7b3d4d5e6f6.amplifyapp.com</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p-S4T6ti9LoY3XFaOm1VSg.jpeg" /><figcaption>Domain management</figcaption></figure><p>Click the link to view your live app. Now it’s time to test and make sure your app works correctly before connecting your custom domain.</p><p>You may have to set your secrets or environment variables if you have a requirement.</p><h3>Step 4: Connecting Your Domain to Amplify</h3><p>Now for the most exciting part, connecting your custom domain to your hosted app!</p><p>In your Amplify app console, click “Hosting” in the left sidebar, click the “Custom domains” and ‘Add domain’.</p><p>You can see domains in your AWS account. Select the domain you registered in Route 53.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gBVtZLbpuC250edj29lcTA.jpeg" /><figcaption>Add domain</figcaption></figure><p>Click “Configure domain”</p><p>Under “SSL certificate,” select “Custom SSL certificate” and choose the wildcard certificate you created earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y5tD8I274Jt-80QsvYE_xw.jpeg" /><figcaption>Custom SSL certificate</figcaption></figure><p>Then, a message will appear: “SSL setup in progress…”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fJeGlX1a7fJiuaJDRP148g.jpeg" /><figcaption>Domain activation</figcaption></figure><p>Behind the scenes, AWS is automatically adding DNS records to your Route 53 hosted zone. This usually takes minutes but may take up to 24 hours.</p><p>You can keep refreshing the page periodically. You’ll see status changes from “Domain activation” to “Available”. SSL certificate status changes from “Pending validation” to “Success”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MQJD2SvX6HQHLeUgROam4Q.jpeg" /></figure><p>Open a new browser tab and visit <a href="https://example.com/">https://example.com</a> and <a href="https://www.example.com/">https://www.example.com</a>. Both should load your app with the padlock icon!</p><h4>Yeaah!! 🥳You did it!!!</h4><p>You now have a professionally hosted web application with</p><p>✅ Custom domain<br>✅ SSL/HTTPS security<br>✅ Global CDN for fast loading<br>✅ Automatic deployments</p><p>Wow, you have just learned how to set up a complete, production-ready web hosting infrastructure on AWS! This same setup is used by most of the companies of all sizes, from startups to enterprises.</p><p>&lt;/Happy-Coding&gt;</p><p>#Amplify #ACM #Route53 #CustomDomain</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f55d3eaa145" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/deploy-like-a-pro-the-only-guide-you-need-to-host-your-web-app-on-aws-with-custom-domain-ssl-8f55d3eaa145">Deploy Like a Pro: The Only Guide You Need to Host Your Web App on AWS with Custom Domain &amp; SSL</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[First Step to AWS API Gateway: Your API’s Best Friend!]]></title>
            <link>https://aws.plainenglish.io/run-c-c-program-on-java-using-java-native-interface-jni-cfa13b74c10f?source=rss-e4d8b3c30029------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfa13b74c10f</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[api-gateway]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Ashan Dimantha Herath]]></dc:creator>
            <pubDate>Wed, 05 Feb 2025 17:34:35 GMT</pubDate>
            <atom:updated>2026-01-29T20:05:01.898Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Have you ever wondered how your favourite apps seamlessly talk to each other </em>🤔<em>? How do they share data and make magic happen?</em></p><p>Well, behind many of those interactions there’s a powerful guardian called an API Gateway, a digital traffic cop 👮🏻. And today, we’re going to dive into the world of AWS API Gateway, a service that makes building and managing APIs a breeze!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gIIRdj3uJL0BDZ2d3i96TQ.png" /></figure><h4>The Story Begins: A World Without Gateways 🫨</h4><p>Think we’re building a new application, and it requires connecting to various backend services, maybe one for user authentication, another one for processing payments and next for product information. In a world without something called API Gateway, our application would have to talk directly to each of these services, manage their individual addresses, and implement their own security, including potential rate limits. Sounds like a lot of work, right? And think about what would happen if one of those services changed its address! We’d have to update our application every single time we do this.</p><p>It would be like trying to navigate a bustling city without any traffic lights or clear signs. What a chaos! 🥲</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DW0jFrWvzB2pcAX7sf4VUg.png" /></figure><h4>Enter the Hero to rescuer: API Gateway!</h4><p>An occasion like above is where an API Gateway steps in as our superhero🦸! Think of it as a <strong>single, intelligent entry point for all your API calls</strong>.</p><p>It helps to talk to a simply a single endpoint instead of our application talking directly to multiple backend services. The Gateway has the intelligence to route those requests to the relevant backend, manages traffic, manages security, and even transforms data if required.</p><p><strong>An API Gateway is a single-entry point for your backend services</strong></p><p>🚪 A front door for your APIs</p><p>🛂 A security guard</p><p>🚦 A traffic controller</p><p>📊 A monitoring assistant</p><h4><strong><em>An analogy</em></strong></h4><p>It’s like having a super-efficient luxury hotel. You can tell the concierge what you need, and they know exactly which department to send you to, ensuring a smooth and secure experience.</p><h4>Why an API Gateway?</h4><p>The benefits of using an API Gateway can significantly streamline our development process. It improves the application’s performance and security. When it comes to security, API Gateway acts as a protective shield, allowing us to implement robust authentication and authorization mechanisms before requests even reach the backend services. API Gateways provide detailed logs and metrics on usage patterns, errors, and performance. This helps the users identify and troubleshoot issues quickly. Request Throttling and Rate Limiting set limits on how many requests a client can make within a certain timeframe. This feature ensures the backend services remain stable and responsive.</p><h3>Why Choose the AWS Solution?</h3><p>While there are other different products out there for API Gateways, AWS API Gateway is like a bouncer in an event with superpowers, which has world-class expertise, like high security and performance.</p><h4>Pay-as-you-Go</h4><p>We don’t have to pay for the bouncer to stand there; you only pay when someone actually walks through the door.</p><h4>Scalability</h4><p>AWS handles the load automatically, whether 10 people or 10 million requests show up at once.</p><h4>Security</h4><p>AWS API Gateway can block “bad actors” before they even touch our data. If we want, we can use API Keys or even integration with Amazon Cognito to ensure only logged-in users get through.</p><h4>Throttling</h4><p>Think a moment, if one user is trying to enter 1,000 times a second, the Gateway can say, “Slow down,” and keep protecting our server from crashing.</p><h4>Caching</h4><p>Gateway can remember the answers that are usually asked by users by simply caching them and telling them immediately without asking the back every single time. This makes our app feel lightning-fast.</p><h4>Serverless Synergy</h4><p>AWS API Gateway perfectly integrates with AWS Lambda. So, we don’t have to manage any servers. Just the gateway can trigger the code when a request comes in.</p><h4>Monitoring</h4><p>It can keep logs of everyone who visited, how long they stayed, and if they ran into any errors and many more things.</p><h3>Hands-on AWS API Gateway</h3><p>To wrap up our story, let’s look at how you actually build an AWS API Gateway</p><p>As usual, let’s start with “Hello World!”. We are going to integrate an AWS API Gateway with a simple Lambda function.</p><p><strong>Step 1: Start with AWS Lambda</strong></p><p>First, search for AWS Lambda Console. Now you can click ‘Create function’ and choose ‘Author from scratch’. Then name it ‘<em>HelloWorldFunction’</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W5IdGuKK-uDUErdEHQa4Bg.png" /></figure><p>Keep the default code that returns “Hello from Lambda!”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zK6en4-2TWLHv_tppbHpCQ.png" /></figure><p>Click Deploy.</p><p><strong>Step 2: API Gateway</strong></p><p>Next, search for “API Gateway Console” and choose HTTP API. As for beginners,s it’s the fastest and cheapest. Now add a name and click “Next”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*54A0UlXw8WB88xtnHs_4lg.png" /></figure><p>Now we can configure routes as “/hello” and select the Lambda we created in the integration phase.</p><p><strong>Step 3: Deploy and Test</strong></p><p>Finally, create the default “Stage” as $default and click “Create”. Everything is done,e and now AWS will give you an Invoke URL like <a href="https://xxxx-id.execute-api.xx.xxxx.amazonaws.com/"><em>https://xxxx-id.execute-api.xx.xxxx.amazonaws.com</em></a></p><p>Lastly, copy that URL, paste it into your browser, and add /hello at the end.</p><p><strong><em>See that magic happens 🪄</em></strong></p><p>Yeehh!! You done it 🎉🎉</p><p>Start simple, grow confidently, and let AWS handle the heavy lifting. ☁️🚀</p><p><em>&lt;/Happy Coding&gt;</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfa13b74c10f" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/run-c-c-program-on-java-using-java-native-interface-jni-cfa13b74c10f">First Step to AWS API Gateway: Your API’s Best Friend!</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TCP Explained: Capture, Analyze, and Learn with Wireshark]]></title>
            <link>https://blog.stackademic.com/a-practical-guide-to-tcp-analysis-with-wireshark-483a1db48802?source=rss-e4d8b3c30029------2</link>
            <guid isPermaLink="false">https://medium.com/p/483a1db48802</guid>
            <category><![CDATA[tcp]]></category>
            <category><![CDATA[wireshark]]></category>
            <category><![CDATA[transmission-control]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[osi]]></category>
            <dc:creator><![CDATA[Ashan Dimantha Herath]]></dc:creator>
            <pubDate>Thu, 19 Dec 2024 17:00:34 GMT</pubDate>
            <atom:updated>2024-12-19T17:06:29.754Z</atom:updated>
            <content:encoded><![CDATA[<p>In the world of networking, TCP (Transmission Control Protocol) is the backbone of reliable communication. In this blog, let’s look at what TCP is, break down its lifecycle, explain TCP flags, and demonstrate how to capture TCP traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4oFi1GLS02kUG1pQRoWyOQ.png" /></figure><h3><strong>What is TCP?</strong></h3><p>Transmission Control Protocol (TCP) is a communications standard that allows devices and applications to exchange messages over a network. It is between the Application and Network Layers in OSI (Open Systems Interconnection), which provide data communication between different entities. It ensures reliable and efficient data transmission over the internet and guarantees that information is delivered accurately in the correct sequence by managing the flow of data between computers. TCP establishes a connection before data is transferred and it has the ability to handle re-delivery if something goes wrong.</p><h3><strong>The TCP Flags</strong></h3><p>TCP uses flags to manage communication and control the state of a connection.</p><p><strong>SYN (Synchronize):</strong> The SYN flag is used to initiate a new TCP connection. It is the first step of the three-way handshake, which is used to initiate communication between two devices.</p><p><strong>ACK (Acknowledgement):</strong> This ACK flag confirms that data has been successfully received. Almost every packet in TCP communication carries the ACK flag, as TCP ensures that every piece of data is acknowledged to guarantee reliability.</p><p><strong>FIN (Finish):</strong> Indicates the sender wants to end the connection. It is used during the four-step connection termination process. Either side can terminate the connection by sending a packet with the FIN flag.</p><p><strong>RST (Reset): </strong>Abruptly terminates a connection due to an error or a condition where the connection cannot be established.</p><p><strong>PSH (Push):</strong> Tells the receiver to process the data immediately instead of buffering it.</p><p><strong>URG (Urgent):</strong> Signals that ask to process the data urgently.</p><p><strong>WND (Window):</strong> The Window Size field specifies the amount of data (in bytes) that the receiver can currently receive. This prevents the sender from overwhelming the receiver with too much data at once.</p><p><strong>SEQ (Sequence Number):</strong> This flag is used to keep track of which byte in the stream of data is being sent. Each data segment is assigned a sequence number that indicates its position in the stream.</p><p><strong>CHK (Checksum):</strong> The Checksum flag is a crucial field for ensuring the integrity of the TCP segment. It is a form of error-checking that allows the receiver to detect if any data was corrupted during transmission. The checksum is calculated based on the contents of the TCP header and data.</p><h3><strong>The TCP Lifecycle</strong></h3><p>The lifecycle of a TCP connection can be broken down into a series of steps. These are represented through the three-way handshake (connection establishment) and the four-step termination (connection closure).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*RymATQbq_Le5mVSH.png" /><figcaption><a href="https://medium.com/@anojan_va/tcp-life-cycle-2f3204eae9d9">TCP Life cycle. Transmission Control Protocol | by Anojan Vanniyasingam | Medium</a></figcaption></figure><h4><strong>1. Three-Way Handshake (Connection Establishment)</strong></h4><p>This process ensures that both sender and receiver are ready for communication:</p><p><strong>SYN: </strong>The client sends a SYN packet to the server, requesting a connection.</p><p><strong>SYN-ACK: </strong>The server responds with a SYN-ACK packet, indicating it’s ready.</p><p><strong>ACK: </strong>The client sends an ACK packet, confirming the connection is established.</p><h4><strong>2. Data Transfer</strong></h4><p>Once the connection is established, data is transferred. TCP ensures that every packet of data is sent successfully and acknowledged by the receiver. If the sender doesn’t receive an acknowledgement, it will retransmit the data.</p><h4><strong>3. Four-Step Termination (Connection Closure)</strong></h4><p>Once the data transfer is complete, the connection is terminated gracefully</p><p><strong>FIN: </strong>The sender sends a FIN packet to signal the end of the communication.</p><p><strong>ACK:</strong> The receiver acknowledges the FIN.</p><p><strong>FIN:</strong> The receiver sends its own FIN when it is done sending data.</p><p><strong>ACK: </strong>The sender acknowledges the receiver’s FIN, and the connection is closed.</p><p>Now let’s dive into the above concepts practically using Wireshark, a powerful network analysis tool. It allows us to see exactly what’s happening on our network.</p><h3><strong>Capturing TCP Traffic with Wireshark</strong></h3><p>First, we have to download and install Wireshark from its official website. <a href="https://www.wireshark.org/download.html">Wireshark · Download</a></p><p>We can start Wireshark and select the network interface that we want to capture traffic (e.g., Ethernet, Wi-Fi, or lo for localhost).</p><p>For the tutorial, I’ll share some code snippets that we can use to make clients and servers using JavaScript (Node).</p><pre>// Server Code<br><br>var net = require(&quot;net&quot;);<br><br>var port = 3000;<br>var host = &quot;127.0.0.1&quot;;<br><br>var server = net.createServer((socket) =&gt; {<br>  socket.on(&quot;end&quot;, () =&gt; {<br>    console.log(`Server: Client Disconnected`);<br>  });<br>});<br><br>server.on(&quot;connection&quot;, (socket) =&gt; {<br>  console.log(`connected from: ${socket.remoteAddress}:${socket.remotePort}`);<br>  socket.write(&quot;hello client&quot;);<br>  socket.end();<br>});<br><br>server.on(&quot;error&quot;, (err) =&gt; {<br>  throw err;<br>});<br><br>server.listen(port, host);</pre><pre>//Client Code<br><br>var net = require(&quot;net&quot;);<br><br>var port = 3000;<br>var host = &quot;127.0.0.1&quot;;<br><br>  var client = new net.Socket();<br><br>client.connect(port, host, () =&gt; {<br>  console.log(`Connected to Server : ${host} on ${port}`);<br>});<br><br>client.on(&quot;data&quot;, (data) =&gt; {<br>  console.log(`Received : ${data}`);<br>});<br><br>client.on(&quot;close&quot;, (data) =&gt; {<br>  console.log(`Client: Disconnected from Server`);<br>});</pre><p>In Wireshark, we can set the filter to TCP to only capture TCP traffic. We can filter by a specific port to get only the required for the expected results.</p><p>According to the above code snippets,</p><pre>tcp.port == 3000</pre><p>After starting the server and sending the request from the client, we can see TCP packets flowing in Wireshark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HT138T7HLtqoFwcYwXJhuw.png" /></figure><p>Each packet has detailed information about the source and destination IPs, port numbers, and flags like SYN, ACK, and FIN.</p><p>Once you’ve captured the traffic, look for the SYN, SYN-ACK, and ACK packets to observe the three-way handshake. This is the beginning of the TCP connection. After the handshake, you’ll see the data packets being transferred between the client and server, followed by the FIN and ACK packets marking the end of the connection.</p><p>The first packet in the capture will have the SYN flag set. It’s the client’s request to start a connection. The server responds with a SYN-ACK, indicating readiness to connect. Finally, the client responds with an ACK, and the connection is established.</p><p>After the handshake, data is transferred. You’ll notice several ACK flags during this phase, confirming that data is being received correctly. In the fourth line, we can see the received data which is “hello client”. The size of the length also changed. From next line onwards the value of ‘ACK’ is increased due to the length.</p><p>Once the transfer is complete, a FIN flag appears in the captured packets, marking the end of the connection.</p><h3>Conclusion</h3><p>With tools like Wireshark, we can dive deep into how TCP actually works, from the handshake to termination, and see it all happening with the requests and responses. Whether you’re a network enthusiast or a developer, understanding TCP and how to capture traffic is an invaluable skill for troubleshooting and performance optimization.</p><p><em>Happy Coding!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=483a1db48802" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/a-practical-guide-to-tcp-analysis-with-wireshark-483a1db48802">TCP Explained: Capture, Analyze, and Learn with Wireshark</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What, Where, When, and How to Kafka or RabbitMQ: A Detailed Comparison]]></title>
            <link>https://blog.stackademic.com/what-where-when-and-how-to-kafka-or-rabbitmq-a-detailed-comparison-c4baf6f862d4?source=rss-e4d8b3c30029------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4baf6f862d4</guid>
            <category><![CDATA[rabbitmq]]></category>
            <category><![CDATA[message-queue]]></category>
            <category><![CDATA[kafka]]></category>
            <category><![CDATA[message-broker]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[Ashan Dimantha Herath]]></dc:creator>
            <pubDate>Mon, 02 Dec 2024 14:04:59 GMT</pubDate>
            <atom:updated>2024-12-02T14:04:59.215Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s fast-growing digital world, efficiently handling massive amounts of data is crucial. As per the scale of business requirements, the complexity of their systems also increases. In this scenario, as IT professionals we are in charge of engineering super-fast solutions to fulfil the demanded requirements. In this blog, I’ll break down when, where, and how to use Kafka or RabbitMQ, giving you a clear understanding of which tool to pick based on your needs and context.</p><h3><strong>Is HTTP not enough?</strong></h3><p>With HTTP (Hypertext Transfer Protocol), services communicate directly and operate synchronously. Simply, the sender must need to wait for the receiver to be available for the request to be processed. But for the development of the application we want to build, we use a set of design principles for building web APIs (Application Program Interfaces) like REST (Representational State Transfer). Although these REST APIs are asynchronous services, the HTTP protocol is synchronous. Then the performance and efficiency of the application are reduced. Also, HTTP does not guarantee message delivery or persistence. This can lead to data loss, especially in high-throughput environments. Also, HTTP are often tightly coupled, they must be aware of each other, including the exact endpoints to call. This creates fragility in the system.</p><p>These are some of the biggest bottlenecks developers face and to avoid these loopholes message brokers are coming to the table to reduce this performance lack and enhance productivity.</p><h3><strong>The need for a message broker</strong></h3><p>Message brokers are software systems that facilitate the exchange of messages between different applications, services, or components in a distributed system. They act as a mediator, enabling reliable communication, often used in event-driven architectures or microservices to ensure data is passed efficiently and without loss. The above bottlenecks are being solved with these broker implementations. These allow for asynchronous communication and the client can send a message to the broker and continue its work without waiting for an immediate response. And they ensure messages are stored safely until they are successfully processed by consumers. Considering the decoupling, the producer (senders) doesn’t need to know anything about the consumers (receivers) and the broker only takes care of delivering them. This allows each service to operate independently.</p><h3><strong>What is Kafka?</strong></h3><p>Kafka is an open-source distributed streaming platform released in 2011 by Apache built for low-latency data streaming using a specification called topics. It’s developed with Java and Scala and excellent for processing continuous streams of data in real-time. Kafka is known for its ability to scale out horizontally and maintain high availability.</p><h3><strong>What is RabbitMQ?</strong></h3><p>RabbitMQ is an open-source, traditional and lightweight message queueing system which follows the FCFO (First Come First Out) approach, where messages are exchanged to queues and consumed by applications according to the order they come. RabbitMQ supports various messaging protocols like AMQP (Advanced Message Queue Protocol).</p><h3><strong>Comparison Between Kafka and RabbitMQ</strong></h3><p>Kafka and RabbitMQ, are two of the most popular messaging systems used to handle messages between two sources. The choice between these two message brokers depends on the architecture of our system and our business goals. But we should be attentive to the technologies or tools we are requiring, not the all features they provide. Deciding what to use Kafka or RabbitMQ can be tricky, but it becomes easier if you break it down.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZUxpVbkykpHFGM3LLtIbqw.png" /></figure><h4><strong>When?</strong></h4><p>If our proposed system needs to process a high volume of data in real-time like activity tracking, stock market data, or long-running tasks that occur in the background, Kafka is the best fit. It excels in event-driven architecture and the ability to scale horizontally of Kafka makes it a powerful choice and it is capable of processing millions of messages daily. RabbitMQ is not able to scale horizontally simply, but scales vertically and is better suited for smaller-scale systems or those needing complex message routing.</p><p>Kafka has a higher throughput than RabbitMQ, making it better suited for handling large volumes of data. On the other hand, if our system involves tasks that can be queued and executed asynchronously, such as email notifications, and image processing, RabbitMQ would be the best suit.</p><h4><strong>Where?</strong></h4><p>Kafka works well in environments with huge data inflows like streaming platforms e-commerce platforms, order processing, and financial transactions and it is ideal for systems where you need to handle real-time data streams or need to fetch data from many sources, such as event sourcing or large-scale data analytics.</p><p>RabbitMQ is best suited for workload distribution, task scheduling, task, queuing, scenarios with complex routing, background processing and managing messages between microservices.</p><h4><strong>How?</strong></h4><p>The architectural design of RabbitMQ consists of private integration, only the module knows what exactly does inside. Kafka’s architectural design is different, it allows for different modules for system interaction and the whole system knows what Kafka does and how the transaction works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GQlQ80ySLqpNwIgoi3XWCw.png" /><figcaption>Kafka Architecture</figcaption></figure><p>Kafka employs a “pull-based” approach, it lets users request message batches from specific offsets. By employing offset, it arranges the data in the partitions’ order. But RabbitMQ supports the push-based mechanism and it prevents the consumer from being aware of any message retrieval. It prevents overwhelming the consumers via a prefetch limit configured for consumers. RabbitMQ supports fair dispatching. It is a method that ensures a balanced distribution of messages to consumers, preventing some workers from becoming overloaded while others remain idle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PWJxTYO7LeJibMKd87BxSA.jpeg" /><figcaption><a href="https://betterprogramming.pub/rabbitmq-vs-kafka-1ef22a041793">RabbitMQ Architecture</a></figcaption></figure><p>Kafka has a retaining policy, does not delete the message after the consumption and stores it permanently on disk and it has higher durability but low latency than RabbitMQ. Both Kafka and RabbitMQ contain an acknowledgement mechanism to make sure messages reach the customer called ‘ACK’ and ‘NACK’ are used to get feedback from the messages and the messages are stored in memory.</p><p>Considering the message ordering, while RabbitMQ does not support ordering, Kafka provides message ordering via its partitions. In Kafka, message ordering is provided via its partitioning. By message key, messages are sent to topics. Message key can be configured before or it can follow an equation of ‘MOD(key, No. of producers)’ and get the reminder. Kafka uses a tool named ‘Consumer Offset’ as a unique identifier for a message in a partition of a Kafka topic. But in RabbitMQ we can set priorities and consumers consume messages in the order of highest priority. All of these configurations should be completed before establishment.</p><h3>An analogy</h3><p>To make the differences distinguished and clearer, let’s explore some real-world scenarios.</p><h4>Kafka in Action</h4><p>A major e-commerce platform could use Kafka to stream and process user actions (e.g., clicks, page views, purchases) in real time. This data could then feed into a recommendation engine to provide personalized product suggestions or into a fraud detection system to flag suspicious behaviour instantly.</p><h4>RabbitMQ in Action</h4><p>A ride-hailing app could use RabbitMQ to manage background tasks such as sending notifications to riders or drivers, processing payments, and updating trip statuses. In this scenario, RabbitMQ would ensure that all tasks are executed in the proper order, even if there’s a delay in processing.</p><h3><strong>Conclusion</strong></h3><p>Choosing between Kafka and RabbitMQ largely depends on the nature of your data flow, scalability needs, and desired features. Both tools are excellent in many cases. Kafka excels its features at managing streams of events and it is much suited for large deployments with massive data processing which needs higher durability, while RabbitMQ is excellent for handling specific tasks and message queues, it’s comparatively lightweight and has low latency. Choose the one that best fits your system’s architecture and future scalability requirements!</p><p>Happy coding!</p><h3>References</h3><ul><li><a href="https://aws.amazon.com/compare/the-difference-between-rabbitmq-and-kafka/">RabbitMQ vs Kafka - Difference Between Message Queue Systems - AWS</a></li><li><a href="https://www.simplilearn.com/kafka-vs-rabbitmq-article">Kafka Vs RabbitMQ: Key Differences &amp; Features Explained</a></li><li><a href="https://betterprogramming.pub/rabbitmq-vs-kafka-1ef22a041793">RabbitMQ vs. Kafka</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FZpoBYFsMPSI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZpoBYFsMPSI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FZpoBYFsMPSI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fbe8cfce7bd0adc4fd3e6275ac43bf7b/href">https://medium.com/media/fbe8cfce7bd0adc4fd3e6275ac43bf7b/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4baf6f862d4" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/what-where-when-and-how-to-kafka-or-rabbitmq-a-detailed-comparison-c4baf6f862d4">What, Where, When, and How to Kafka or RabbitMQ: A Detailed Comparison</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Floating Point Errors and How to Avoid Them (with JavaScript Examples)]]></title>
            <link>https://javascript.plainenglish.io/understanding-floating-point-errors-and-how-to-avoid-them-with-javascript-examples-aade8df393b3?source=rss-e4d8b3c30029------2</link>
            <guid isPermaLink="false">https://medium.com/p/aade8df393b3</guid>
            <category><![CDATA[floating-points]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[solution-architect]]></category>
            <category><![CDATA[floating-point-error]]></category>
            <dc:creator><![CDATA[Ashan Dimantha Herath]]></dc:creator>
            <pubDate>Mon, 14 Oct 2024 17:19:49 GMT</pubDate>
            <atom:updated>2026-10-25T18:02:08.504Z</atom:updated>
            <content:encoded><![CDATA[<p><em>In the world of computing,</em> numbers don’t always work as precisely as we expect. Imagine you’re a software developer, and your computer suddenly starts giving you inaccurate results or you might have faced different strange behaviors when doing simple calculations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BCpoHqshaRgNVyLa7TXzDA.jpeg" /></figure><p>In this blog, I’ll talk about floating-point numbers, the errors behind their calculations, why errors occur, and what are the ways to avoid them.</p><p>Let’s dive in 😁</p><h3><strong>How do computers represent Floating-Point Numbers?</strong></h3><p>Modern computers use the <a href="https://standards.ieee.org/ieee/754/6210/">IEEE 754 standard</a> to represent floating-point numbers. This standard defines several formats, including 32-bit single-precision, 64-bit double-precision, and 128-bit extended precision (long double). Although these formats vary in size and precision.</p><p>Let’s take the 32-bit single-precision floating-point representation as an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*pdfRUfakNRlpML9OKDF7nQ.png" /></figure><p>The first bit is the <strong>Sign bit</strong> <strong>(S)</strong>, which indicates whether the number is positive or negative using 0 (zero) for positives and 1 (one) for negatives.<br>The next 8 bits represent the <strong>Exponent (E)</strong>, which helps determine the magnitude of the number. The remaining 23 bits are used for the <strong>Mantissa (M)</strong>, also known as the significand or fraction, which holds the actual digits of the number.</p><p>Together, these bits allow computers to store a wide range of real numbers, both very large and very small, but they lead to the floating-point errors we see in calculations.</p><h3><strong>What is a Floating-Point Error?</strong></h3><p>To understand floating point errors, let’s start with how computers handle numbers. Computers store numbers in binary format, but many decimal numbers cannot be operated precisely.</p><p>For example, the decimal number 0.1 in binary becomes a repeating decimal like 0.0001100110011… (it goes on forever, recurring) after converting it from Decimal to Binary. But computers can’t store an infinite number of digits, so they have to round it off, which introduces inaccuracies. These small differences lead to the errors you see when working with floating point numbers.</p><p>Let’s get some examples using JavaScript code snippets.</p><pre>console.log(0.1 + 0.2);<br>// Output: 0.30000000000000004<br><br>console.log(0.1 + 0.2 === 0.3);<br>// Output: false</pre><p>In this example, you can see output getting instead of just 0.3, the result is 0.30000000000000004. The difference seems very tiny, but it can lead to serious issues when considering some financial calculations.</p><h3><strong>Why Does This Happen?</strong></h3><p>Most programming languages use the <a href="https://standards.ieee.org/ieee/754/6210/">IEEE 754 standard</a> for floating point calculations, which provides only approximate values for most decimal fractions. This limitation means the calculations will round off and be limited to some digits. This limitation and not consideration of all points is the cause for this issue.</p><h3><strong>How to Avoid Floating Point Errors</strong></h3><h4>Method 1</h4><p>Let’s look at ways to manage and avoid these errors in JavaScript.</p><p>One simple way to reduce floating point errors is by rounding off numbers to a fixed number of decimal places using<em> toFixed()</em></p><pre>let result = (0.1 + 0.2).toFixed(2);<br>console.log(result);<br>// Output: &quot;0.30&quot;</pre><p>Here, <em>toFixed(2)</em> rounds the number to two decimal places. While this doesn’t fix the complete error, it helps by hiding just small inaccuracies from view.</p><p>Also, it is necessary to keep in mind that toFixed() returns a string, and we have to convert it back to a number when performing calculations.</p><pre>let result = Number((0.1 + 0.2).toFixed(2));<br>console.log(result);<br>// Output: 0.3</pre><h4>Method 2</h4><p>When we are working on a project that needs high precision, and high accuracy like financial or scientific applications, we can use a dedicated library. When JavaScript, has several libraries developed to handle floating-point numbers accurately. <a href="https://www.npmjs.com/package/big.js/v/5.2.2"><strong>Big.js</strong></a> and<strong> </strong><a href="https://www.npmjs.com/package/mathjs"><strong>Math.js</strong></a> are some of them.</p><p>After installing <a href="https://www.npmjs.com/package/mathjs">Math.js</a> using the necessary npm package we can utilize it for computations without inaccuracies.</p><pre>const math = require(&#39;mathjs&#39;);<br><br>let result = math.add(0.1, 0.2);<br>console.log(result);<br>// Output: 0.3</pre><p>This library provides tools to work with numbers, matrices, and more while reducing floating-point errors.</p><h3>Conclusion</h3><p>Floating point errors are a common issue in programming, but they’re not something we can neglect.</p><p>We have to understand how numbers are represented in binary and we can choose the optimal strategy for our applications.</p><p>But in day-to-day coding, these differences might not always be considered. But for financial and scientific applications floating-point values are precocious, it’s essential to be aware of floating-point errors and to use these methods to avoid unexpected results.</p><p><em>Happy coding!</em></p><h3>References</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F2VM028vpguU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D2VM028vpguU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F2VM028vpguU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/610dbd84c89fa19dc2370eecdf451081/href">https://medium.com/media/610dbd84c89fa19dc2370eecdf451081/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F8EYBJhQoDNc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D8EYBJhQoDNc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F8EYBJhQoDNc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cbce0212663e8d45414a7be1066d60da/href">https://medium.com/media/cbce0212663e8d45414a7be1066d60da/href</a></iframe><p><a href="https://standards.ieee.org/ieee/754/6210/">IEEE SA — IEEE 754–2019</a></p><p><a href="https://mathjs.org/docs/getting_started.html">math.js | an extensive math library for JavaScript and Node.js (mathjs.org)</a></p><p><a href="https://www.geeksforgeeks.org/floating-point-error-in-python/">Floating point error in Python — GeeksforGeeks</a></p><p><a href="https://ellenaua.medium.com/floating-point-errors-in-javascript-node-js-21aadd897bf8">Floating Point errors in JavaScript/Node.js | by Elena Sharovar | Medium</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aade8df393b3" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/understanding-floating-point-errors-and-how-to-avoid-them-with-javascript-examples-aade8df393b3">Understanding Floating Point Errors and How to Avoid Them (with JavaScript Examples)</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Streamlining State Management in React: A Deep Dive into Redux Toolkit with an analogy (simple…]]></title>
            <link>https://blog.stackademic.com/streamlining-state-management-in-react-a-deep-dive-into-redux-toolkit-with-an-analogy-simple-a87a8e0cb7b2?source=rss-e4d8b3c30029------2</link>
            <guid isPermaLink="false">https://medium.com/p/a87a8e0cb7b2</guid>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[state-management-in-react]]></category>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[redux-toolkit]]></category>
            <dc:creator><![CDATA[Ashan Dimantha Herath]]></dc:creator>
            <pubDate>Sun, 21 Jul 2024 16:46:04 GMT</pubDate>
            <atom:updated>2024-07-21T16:46:04.832Z</atom:updated>
            <content:encoded><![CDATA[<h3>Streamlining State Management in React: A Deep Dive into Redux Toolkit with an analogy (simple story to explain)</h3><p>In the rapidly evolving world of web development, managing state in complex applications can become challenging. Redux has been a popular solution for state management in React applications, but it often comes with boilerplate <em>(a way of writing or thinking that is not special and does not show any imagination)</em> code that can be cumbersome for developers. Enter Redux Toolkit (RTK), a powerful and efficient tool that simplifies the use of Redux.</p><p>In this article, we’ll explore what Redux Toolkit is, why it’s beneficial, and how to integrate it into a React application. By the end, you’ll have a solid understanding of how to leverage Redux Toolkit to streamline your state management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GhN5vP3vHOUk-6VCgT4hHg.jpeg" /></figure><h4>What is the Redux Toolkit?</h4><p>Redux Toolkit is the official, recommended way to write Redux logic. It is designed to simplify common Redux tasks, such as store setup, creating reducers, and writing immutable update logic. RTK comes with a set of tools and utilities that make Redux easier and more efficient to use.</p><h4>Why Use Redux Toolkit (Redux Toolkit)?</h4><ol><li><strong>Reduced Boilerplate</strong>: RTK eliminates the need for a lot of boilerplate code, making your Redux logic more concise and readable.</li><li><strong>Enhanced Developer Experience</strong>: It provides a better developer experience with built-in utilities for common tasks, reducing the likelihood of errors.</li><li><strong>Simplified Configuration</strong>: Setting up the Redux store and integrating middleware is straightforward with RTK.</li><li><strong>Built-in Best Practices</strong>: RTK encourages the use of Redux best practices, helping you to write clean and maintainable code.</li></ol><h4>Getting Started with Redux Toolkit</h4><p>Let’s walk through setting up Redux Toolkit in a React application.</p><ol><li><strong>Installing Dependencies</strong></li></ol><p>First, you’ll need to install @reduxjs/toolkit and react-redux</p><pre>npm install @reduxjs/toolkit react-redux</pre><p>Then we can start setting up the Redux Toolkit in your React. For example, let’s develop a simple “Counter App” with React and RTK.</p><p><strong>2. Setting Up the Store</strong></p><p>The Redux store is a centralized repository for managing the state of a React application. It holds the entire state tree of the application, allowing different components to access and share the state. The store’s state can only be modified through dispatching actions, which are handled by reducers <em>(we learn it next)</em> that specify how the state should change in response. This approach ensures a clear, consistent flow of data, making it easier to debug and maintain complex applications.</p><p>Redux Toolkit provides a configureStore the function that simplifies store creation and automatically sets up the Redux DevTools extension and middleware.</p><pre>// src/app/store.js<br>import { configureStore } from &#39;@reduxjs/toolkit&#39;;<br>import counterReducer from &#39;../features/counter/counterSlice&#39;;<br><br>export const store = configureStore({<br>  reducer: {<br>    counter: counterReducer,<br>  },<br>});</pre><p><strong>3. Creating a Slice</strong></p><p>A Redux slice is a fundamental concept in the Redux Toolkit that simplifies the process of defining the Redux state and actions for a specific feature of your application. It includes the initial state, reducers, and action creators all in one place, making it easier to manage and maintain. Each slice typically corresponds to a single feature, such as a counter or user authentication, and helps in organizing your Redux code in a more modular and readable way. By using createSlice from Redux Toolkit, you can reduce boilerplate and streamline your Redux setup.</p><p>Here’s an example of creating a counter slice according to our mock app.</p><pre>// src/features/counter/counterSlice.js<br>import { createSlice } from &#39;@reduxjs/toolkit&#39;;<br><br>const initialState = {<br>  value: 0,<br>};<br><br>const counterSlice = createSlice({<br>  name: &#39;counter&#39;,<br>  initialState,<br>  reducers: {<br>    increment: (state) =&gt; {<br>      state.value += 1;<br>    },<br>    decrement: (state) =&gt; {<br>      state.value -= 1;<br>    },<br>    incrementByAmount: (state, action) =&gt; {<br>      state.value += action.payload;<br>    },<br>  },<br>});<br><br>export const { increment, decrement, incrementByAmount } = counterSlice.actions;<br><br>export default counterSlice.reducer;</pre><p>Here, the initialState is a simple object that sets the initial state for the corresponding feature <em>(Eg: counter feature).</em> It starts with a single property, value, initialized to 0 according to the examples. This initialState serves as the default state for the counter slice, ensuring that when the application starts, the counter begins at zero.</p><p>The createSlice function from Redux Toolkit uses this initial state to handle state updates through defined reducer functions such as increment, decrement, and incrementByAmount, allowing the state to change in response to dispatched actions. reducers<strong> </strong>are functions that specify how the state ( value) should change in response to actions <em>(It works like Event Handlers in JavaScript)</em>. In this slice, increment, decrement, and incrementByAmount are reducers that respectively increase, decrease, or adjust the value based on the action&#39;s payload <em>(data in simple terms)</em>.</p><p>actions are generated automatically by the Redux Toolkit from the reducers. They are used to dispatch changes to the state. The actions increment, decrement, and incrementByAmount can be imported and dispatched in your components. dispatch is the mechanism to send actions to the Redux store, triggering the corresponding reducers to update the state. This approach reduces boilerplate code and enhances code readability.</p><blockquote>Let’s consider a real-world example (analogy), a cake shop.</blockquote><ul><li><strong>The Cake Shop</strong> is like the <strong>Store</strong> in Redux. It holds the state of your application, such as the number of cakes available.</li><li><strong>Requesting a Cake from the Cashier</strong> is like an <strong>Action</strong>. It’s the request you make to change the state.</li><li><strong>The Cashier</strong> is like <strong>Dispatch</strong>. They handle your request and send it to the store.</li><li><strong>The Cake</strong> you receive is like the <strong>Payload</strong>. It’s the information or data involved in the action.</li><li><strong>The Process of Decreasing the Number of Cakes</strong> in the display case is like a <strong>Reducer</strong>. It updates the state based on the action.</li><li><strong>The Cake Shop’s Entire Process</strong> (ordering and providing cakes) is like a <strong>Slice</strong>. It encapsulates the state and reducers related to that part of the application.</li></ul><p><strong>4. Integrating with React Components</strong></p><p>In Redux, useSelector and useDispatch are essential hooks<em> (like useEffect, useCallback)</em> provided by the react-redux library that facilitate state management in React applications. The useSelector hook allows you to extract data (retrieve the data) from the Redux store state, enabling your components to subscribe to specific pieces of state. On the other hand, the useDispatch hook provides a way to dispatch actions to the Redux store, allowing you to update the state. These hooks streamline the process of interacting with the Redux store, making your code more readable and maintainable by separating state selection and action dispatching within your React components.</p><p>Let’s use the useSelector and useDispatch hooks from react-redux to interact with the Redux store in your React components.</p><pre>// src/features/counter/Counter.js<br>import React from &#39;react&#39;;<br>import { useSelector, useDispatch } from &#39;react-redux&#39;;<br>import { increment, decrement, incrementByAmount } from &#39;./counterSlice&#39;;<br><br>function Counter() {<br>  const count = useSelector((state) =&gt; state.counter.value);<br>  const dispatch = useDispatch();<br><br>  return (<br>    &lt;div&gt;<br>      &lt;h1&gt;{count}&lt;/h1&gt;<br>      &lt;button onClick={() =&gt; dispatch(increment())}&gt;Increment&lt;/button&gt;<br>      &lt;button onClick={() =&gt; dispatch(decrement())}&gt;Decrement&lt;/button&gt;<br>      &lt;button onClick={() =&gt; dispatch(incrementByAmount(5))}&gt;Increment by 5&lt;/button&gt;<br>    &lt;/div&gt;<br>  );<br>}<br><br>export default Counter;</pre><p><strong>5. Connecting the Store to Your Application</strong></p><p>Wrap your application with the Provider component to make the Redux store available to your React components.</p><pre>// src/index.js<br>import React from &#39;react&#39;;<br>import ReactDOM from &#39;react-dom&#39;;<br>import { Provider } from &#39;react-redux&#39;;<br>import { store } from &#39;./app/store&#39;;<br>import App from &#39;./App&#39;;<br><br>ReactDOM.render(<br>  &lt;Provider store={store}&gt;<br>    &lt;App /&gt;<br>  &lt;/Provider&gt;,<br>  document.getElementById(&#39;root&#39;)<br>);</pre><h4>Pro Tip</h4><blockquote>Before you initialize the development using Redux think twice about that “Is Redux essential to develop this app?” Otherwise you’ll complex the code without requirement of Redux.</blockquote><h4>Conclusion</h4><p>Redux Toolkit streamlines the process of managing state in React applications by reducing boilerplate and encouraging best practices. With its easy-to-use APIs and built-in utilities, you can focus more on building features and less on writing boilerplate code.</p><p>By following the steps outlined in this guide, you should now have a solid understanding of how to set up and use Redux Toolkit in your React projects. Embrace the power of Redux Toolkit and take your state management to the next level!</p><p>If you found this article helpful, feel free to share it with your network and leave a comment with your thoughts or questions. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a87a8e0cb7b2" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/streamlining-state-management-in-react-a-deep-dive-into-redux-toolkit-with-an-analogy-simple-a87a8e0cb7b2">Streamlining State Management in React: A Deep Dive into Redux Toolkit with an analogy (simple…</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Change the colour of the same components in different places or pages dynamically.]]></title>
            <link>https://medium.com/@ashandimanthalk/change-the-colour-of-the-same-components-in-different-places-or-pages-dynamically-ec3c8031f3ca?source=rss-e4d8b3c30029------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec3c8031f3ca</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[colors]]></category>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[components]]></category>
            <dc:creator><![CDATA[Ashan Dimantha Herath]]></dc:creator>
            <pubDate>Tue, 26 Dec 2023 16:40:13 GMT</pubDate>
            <atom:updated>2023-12-26T16:40:13.305Z</atom:updated>
            <content:encoded><![CDATA[<p>Assume an instance where we want to change the colour of the same components in different places, like the cards given below or the colour of a page with the same components used depending on the link dynamically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*krVnTcwhjLGDZz03.png" /></figure><p>To achieve this, <strong>create a layout component</strong> that includes the common structure and styling for your pages. Then, you can create separate pages that import the layout component and provide the specific details, including colours, for each page. Here, I have used <strong><em>Next.js</em></strong> and <strong><em>Tailwind.css</em></strong><em>, </em>but this is applicable for <strong>React.js</strong> too.</p><p>Here’s a more generic example:</p><p><strong>Step 1: Create a Layout Component</strong></p><p>Create a file for your layout component, for example, Layout.jsx. In this component, you can use Tailwind CSS classes and pass the colour as a prop.</p><pre>// Layout.js<br>import React from &#39;react&#39;;<br>const Layout = ({ children, textColor, bgColor }) =&gt; {<br>  return (<br>    {/* You can define text colours, background colours as your preference*/}<br>    &lt;div className={`text-${textColor} bg-${bgColor}`}&gt;<br>    {/* Your common layout structure */}<br>      {children}<br>    &lt;/div&gt;<br>  );<br>};<br><br>export default Layout;</pre><p>The file name Layout.js is just an example, and it&#39;s not a standard or built-in file in Next.js. In Next.js, you can create a layout component with any file name you choose.</p><p><strong>Step 2: Create Page Components:</strong></p><p>Create separate page components for each of your pages. Import the Layout component and pass the specific colours for each page.</p><pre>// As an example I use the name Page1 for this<br>import React from &#39;react&#39;;<br>import Layout from &#39;../components/Layout&#39;;<br>{/* Import is depending on your folder structure*/}<br><br>const Page1 = () =&gt; {<br>  return (<br>    &lt;Layout textColor=&quot;red-500&quot; bgColor=&quot;yellow-200&quot;&gt;<br>      {/* The content you want to insert in the page */}<br>      &lt;h1&gt;This is Page 1&lt;/h1&gt;<br>      {/* Enter the content or components here. If you are using components make sure to use defined variables there. As an example, ${bgColor}*/}<br>    &lt;/Layout&gt;<br>  );<br>};<br><br>export default Page1;</pre><p>Now, you can repeat the same process Page2 and Page3, etc., adjusting the colours as needed. Make sure about the routings.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec3c8031f3ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Flutter]]></title>
            <link>https://medium.com/@ashandimanthalk/introduction-to-flutter-5aa741b30c75?source=rss-e4d8b3c30029------2</link>
            <guid isPermaLink="false">https://medium.com/p/5aa741b30c75</guid>
            <dc:creator><![CDATA[Ashan Dimantha Herath]]></dc:creator>
            <pubDate>Fri, 12 May 2023 15:55:02 GMT</pubDate>
            <atom:updated>2023-05-12T16:01:55.144Z</atom:updated>
            <content:encoded><![CDATA[<p>Flutter is a <strong>cross-platform UI toolkit</strong> developed by Google. It is used to <strong>build native mobile apps </strong>for various platforms, including <strong>iOS, Android</strong>, <strong>web, and desktop apps</strong>. It allows developers to build beautiful, high-performance applications with a single codebase, saving time and effort. Flutter apps are written in the <strong>Dart programming language</strong> and use a declarative programming model. And Dart provides a rich set of pre-designed widgets that allow developers to create visually appealing and responsive user interfaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/0*qIeZriIISWMfvTWf.png" /><figcaption>Flutter Logo</figcaption></figure><p>Flutter apps are compiled to native code for each platform they run on, resulting in high performance and a native-like user experience. Flutter also provides a number of features that make it a powerful tool for building user interfaces, including:</p><ul><li>A rich set of widgets that can be used to build any type of user interface</li><li>A hot reload feature that allows developers to see changes to their code reflected in the running app without having to restart the app</li><li>A powerful state management system that makes it easy to manage the state of complex user interfaces</li><li>A well-documented API that makes it easy to learn and use</li></ul><p>Flutter follows a “write once, run anywhere” approach, meaning you can write code for your app once and deploy it on multiple platforms. This makes Flutter an excellent choice for cross-platform development, as it eliminates the need to write separate codebases for different platforms.</p><p>Flutter is a rapidly growing framework with a large and active community. It is a great choice for developers who want to <strong>build high-quality, cross-platform apps with a modern user experience</strong>.</p><p>Here are some major benefits of using Flutter:</p><ol><li>Fast development: Flutter’s hot-reload feature allows developers to see the changes they make in real-time, reducing the time spent on code compilation and enabling quick iterations.</li><li>Expressive and customizable UI: Flutter provides a wide range of customizable widgets, allowing developers to create visually stunning interfaces that match the design requirements of their applications.</li><li>Native performance: Flutter applications are compiled directly into native machine code, resulting in high-performance apps that can leverage the full capabilities of the underlying platform.</li><li>Access to native features: Flutter provides plugins that allow developers to access device-specific features like cameras, GPS, and sensors, providing a native-like experience to users.</li><li>Strong community and ecosystem: Flutter’s rapidly growing community of developers actively contributes to its ecosystem. Numerous packages and libraries are available that can be easily integrated into Flutter apps, expanding functionality and saving development time.</li></ol><p>Flutter is a great choice if you are looking for a powerful and versatile cross-platform UI toolkit.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5aa741b30c75" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>