<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Turjo Chowdhury</title>
    <description>The latest articles on Forem by Turjo Chowdhury (@turjoc120).</description>
    <link>https://forem.com/turjoc120</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F779071%2F11084b43-b42b-49f3-a668-ce7102174cf8.jpg</url>
      <title>Forem: Turjo Chowdhury</title>
      <link>https://forem.com/turjoc120</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/turjoc120"/>
    <language>en</language>
    <item>
      <title>What Are Containers? The Lightweight Alternative to VMs</title>
      <dc:creator>Turjo Chowdhury</dc:creator>
      <pubDate>Mon, 26 Jan 2026 14:19:12 +0000</pubDate>
      <link>https://forem.com/turjoc120/what-are-containers-the-lightweight-alternative-to-vms-3n08</link>
      <guid>https://forem.com/turjoc120/what-are-containers-the-lightweight-alternative-to-vms-3n08</guid>
      <description>&lt;h2&gt;
  
  
  From Virtual Machines to Containers
&lt;/h2&gt;

&lt;p&gt;In my last post, I talked about virtual machines and how they let you run multiple operating systems on one computer. But I also mentioned they're heavy and slow. That's where containers come in.&lt;/p&gt;

&lt;p&gt;Containers are like virtual machines, but much lighter. Instead of running a full operating system for each application, containers share the host operating system while keeping applications isolated from each other.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Exactly Is a Container?
&lt;/h2&gt;

&lt;p&gt;A container packages an application with everything it needs to run: code, libraries, dependencies, and configuration files. It's like a shipping container for software. &lt;/p&gt;

&lt;h2&gt;
  
  
  How Containers Work: Namespaces and Cgroups
&lt;/h2&gt;

&lt;p&gt;Containers rely on two powerful Linux kernel features: namespaces and cgroups. Understanding these helps demystify how containers actually achieve isolation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Namespaces: Creating Separate Worlds
&lt;/h3&gt;

&lt;p&gt;Namespaces are what make containers feel like separate machines even though they're sharing the same OS. Think of namespaces as creating different "views" of the system for each container.&lt;/p&gt;

&lt;p&gt;There are several types of namespaces:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PID Namespace (Process ID)&lt;/strong&gt;: Each container gets its own set of process IDs. Inside a container, you might see a process with ID 1, and in another container, there's also a process with ID 1. They don't conflict because they're in separate namespaces. From inside the container, you can only see your own processes, not processes from other containers or the host.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Network Namespace&lt;/strong&gt;: Each container can have its own network interfaces, IP addresses, and routing tables. This is why different containers can run web servers on the same port (like port 80) without conflicts. Each thinks it owns that port in its own network namespace.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mount Namespace&lt;/strong&gt;: Gives each container its own file system view. One container might see &lt;code&gt;/app&lt;/code&gt; with Node.js files, while another sees &lt;code&gt;/app&lt;/code&gt; with Python files. They're completely separate even though the path is the same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;User Namespace&lt;/strong&gt;: Maps users inside the container to different users on the host. You might be "root" inside the container, but you're actually an unprivileged user on the host system. This adds security.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UTS Namespace&lt;/strong&gt;: Lets each container have its own hostname, making it feel like a separate machine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cgroups: Limiting Resources
&lt;/h3&gt;

&lt;p&gt;Control groups (cgroups) are about resource management. While namespaces control what a container can &lt;em&gt;see&lt;/em&gt;, cgroups control what a container can &lt;em&gt;use&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CPU limits&lt;/strong&gt;: You can tell a container, "You can only use 50% of one CPU core." No matter how hard the application tries, it can't exceed that limit. This prevents one badly-behaved container from slowing down everything else.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Memory limits&lt;/strong&gt;: Set a maximum amount of RAM a container can use. If it tries to use more, the container gets killed and restarted. This is crucial because without limits, one memory leak could crash your entire system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disk I/O limits&lt;/strong&gt;: Control how much a container can read from or write to disk. Prevents one container from monopolizing disk access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Network bandwidth&lt;/strong&gt;: Limit how much network bandwidth a container can consume.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Containers Access Computer Resources
&lt;/h3&gt;

&lt;p&gt;The operating system has two layers. &lt;strong&gt;Kernel space&lt;/strong&gt; is where the kernel directly manages hardware and security. &lt;strong&gt;User space&lt;/strong&gt; is where applications run. Applications can't touch hardware directly—they ask the kernel through system calls.&lt;/p&gt;

&lt;p&gt;When a container needs to do something, here's the flow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Application makes a request&lt;/strong&gt;: Your app in the container wants to read a file or send a network packet.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;System call to kernel&lt;/strong&gt;: The container makes a system call to the shared kernel. For example, &lt;code&gt;read()&lt;/code&gt; to read a file or &lt;code&gt;socket()&lt;/code&gt; to create a network connection.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Kernel checks namespace&lt;/strong&gt;: The kernel sees that this request came from a container. It checks which namespaces apply. "This process is in network namespace X, so it can only see network interfaces in that namespace."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Kernel checks cgroups&lt;/strong&gt;: Before granting the request, the kernel checks cgroup limits. "Has this container exceeded its memory limit? Is it trying to use too much CPU?"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Kernel executes or denies&lt;/strong&gt;: If everything checks out, the kernel performs the action and returns the result to the container. The container never directly touches the hardware.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why Containers Are Better for Many Use Cases
&lt;/h2&gt;

&lt;p&gt;After learning about both VMs and containers, here's why containers often win:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Speed&lt;/strong&gt;: Containers start in seconds because they don't boot an entire OS. VMs take minutes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Size&lt;/strong&gt;: A container image might be 100-200 MB. A VM image is often several gigabytes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Efficiency&lt;/strong&gt;: I can run dozens of containers on my laptop. Running more than 2-3 VMs would bring it to its knees.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Portability&lt;/strong&gt;: If it runs in a container on my machine, it'll run the same way on a server, in the cloud, or on my teammate's computer.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Understanding So Far
&lt;/h2&gt;

&lt;p&gt;Containers solve the "it works on my machine" problem. They package everything an application needs, making it consistent across different environments. They're lighter than VMs but still provide isolation.&lt;/p&gt;

&lt;p&gt;This is what Docker is all about – making containers easy to create, share, and run. In my next post, I'll dive into Docker specifically and how it became the standard tool for working with containers.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Part 2 of my Docker learning journey. Slowly connecting the dots between VMs, containers, and Docker.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>containers</category>
      <category>docker</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Understanding Virtual Machines: A Docker Journey Begins</title>
      <dc:creator>Turjo Chowdhury</dc:creator>
      <pubDate>Mon, 26 Jan 2026 13:09:16 +0000</pubDate>
      <link>https://forem.com/turjoc120/understanding-virtual-machines-a-docker-journey-begins-3ck2</link>
      <guid>https://forem.com/turjoc120/understanding-virtual-machines-a-docker-journey-begins-3ck2</guid>
      <description>&lt;h2&gt;
  
  
  What Are Virtual Machines?
&lt;/h2&gt;

&lt;p&gt;Before diving into Docker, I needed to understand virtual machines (VMs). Think of a virtual machine as a computer inside your computer. It's software that mimics physical hardware, letting you run a completely separate operating system on your existing machine.&lt;/p&gt;

&lt;p&gt;For example, I can run Ubuntu Linux on my Windows laptop, or run Windows on my Mac, all through virtual machines.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Virtual Machines Work
&lt;/h2&gt;

&lt;p&gt;A virtual machine uses something called a &lt;strong&gt;hypervisor&lt;/strong&gt;. This is special software that sits between your physical hardware and the virtual machines. Popular hypervisors include VirtualBox, VMware, and Hyper-V.&lt;/p&gt;

&lt;p&gt;Here's what happens: the hypervisor divides your computer's resources (CPU, RAM, storage) and allocates portions to each VM. Each VM thinks it has its own dedicated hardware, but really it's sharing with your main system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Use Virtual Machines?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Isolation&lt;/strong&gt;: Each VM is completely separate. If one crashes or gets infected with malware, it doesn't affect your main system or other VMs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Testing environments&lt;/strong&gt;: I can test software on different operating systems without needing multiple physical computers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learning safely&lt;/strong&gt;: Perfect for experimenting with new tools or configurations without risking my main setup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Running incompatible software&lt;/strong&gt;: Sometimes you need Windows-only software on a Mac, or vice versa.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Takeaway
&lt;/h2&gt;

&lt;p&gt;Virtual machines taught me the concept of isolation and resource allocation. Understanding VMs makes it easier to grasp why Docker and containers were created. They solve many of VM's limitations while keeping the benefits of isolation.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This is part of my journey learning Docker and containerization. Follow along as I document what I learn!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>virtualmachine</category>
      <category>docker</category>
      <category>devops</category>
    </item>
    <item>
      <title>What happens inside the computer when you run your Go server</title>
      <dc:creator>Turjo Chowdhury</dc:creator>
      <pubDate>Thu, 21 Aug 2025 00:20:58 +0000</pubDate>
      <link>https://forem.com/turjoc120/what-happens-inside-the-computer-when-you-run-your-go-server-165n</link>
      <guid>https://forem.com/turjoc120/what-happens-inside-the-computer-when-you-run-your-go-server-165n</guid>
      <description>&lt;p&gt;Before we deep dive, let's learn a couple of important concepts&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are Sockets and File Descriptors?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Sockets are endpoints for communication between computers over a network, enabling real-time data exchange.&lt;/li&gt;
&lt;li&gt;Unlike regular files, sockets do not store data but facilitate data transfer between machines.&lt;/li&gt;
&lt;li&gt;When Go requests a socket from the operating system (OS), the OS creates the socket and assigns a unique identifier called a file descriptor.&lt;/li&gt;
&lt;li&gt;A file descriptor is an integer handle that the Go server uses to manage and reference the socket.&lt;/li&gt;
&lt;li&gt;This mechanism allows the server to efficiently send and receive network data through OS-managed resources.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Go’s Concurrency with Goroutines
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Go uses goroutines, lightweight threads, to handle many client requests concurrently.&lt;/li&gt;
&lt;li&gt;The main goroutine continuously waits for incoming requests.&lt;/li&gt;
&lt;li&gt;For each new request, Go creates a new goroutine to process it independently without blocking the main one.&lt;/li&gt;
&lt;li&gt;This design ensures the server remains fast and scalable, handling multiple clients simultaneously.&lt;/li&gt;
&lt;li&gt;When no requests arrive, the main goroutine sleeps to conserve system resources and improve overall efficiency.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Understanding How It Works in Your Computer
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The kernel is the core part of the operating system that manages hardware and processes.&lt;/li&gt;
&lt;li&gt;Network requests first travel through a router and then reach your computer’s Network Interface Card (NIC), like a WiFi adapter or Ethernet port.&lt;/li&gt;
&lt;li&gt;The NIC converts the wireless or wired signals into binary data and temporarily stores it in a buffer.&lt;/li&gt;
&lt;li&gt;It then sends a signal to the kernel to process this new data.&lt;/li&gt;
&lt;li&gt;The kernel copies the data into a socket buffer that the Go server listens to, and marks it ready for reading.&lt;/li&gt;
&lt;li&gt;The Go runtime wakes up the goroutine to read and process the request.&lt;/li&gt;
&lt;li&gt;The server sends the response back through the socket and NIC.&lt;/li&gt;
&lt;li&gt;The response reaches the client’s browser.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>go</category>
      <category>os</category>
      <category>backenddevelopment</category>
    </item>
    <item>
      <title>The Truth Behind "Accept All Cookies": What You're Really Agreeing To?</title>
      <dc:creator>Turjo Chowdhury</dc:creator>
      <pubDate>Fri, 22 Nov 2024 23:50:26 +0000</pubDate>
      <link>https://forem.com/turjoc120/the-truth-behind-accept-all-cookies-what-youre-really-agreeing-to-43co</link>
      <guid>https://forem.com/turjoc120/the-truth-behind-accept-all-cookies-what-youre-really-agreeing-to-43co</guid>
      <description>&lt;p&gt;Let me break down what actually happens when you click that seemingly innocent "Accept All" button.&lt;/p&gt;

&lt;p&gt;🎯 When you accept all cookies, you're not just enabling basic website functionality. You're potentially giving permission for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multiple companies to track your digital footprint&lt;/li&gt;
&lt;li&gt;Advertisers to build detailed profiles of your browsing habits&lt;/li&gt;
&lt;li&gt;Your data to be shared among unexpected third parties&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📌 What's Actually Required?&lt;br&gt;
Here's the fascinating part - contrary to popular belief, websites DON'T need your consent for essential cookies! The EU laws are crystal clear: consent is only required for non-essential tracking. That "login" cookie keeping you signed in? Totally legal without asking.&lt;/p&gt;

&lt;p&gt;Despite privacy laws that require explicit consent, often websites used "dark patterns" which deliberately makes it harder to reject cookies than accept them.&lt;/p&gt;

&lt;p&gt;⚖️ The Good, Bad, and Ugly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Legitimate tracking: Improving user experience, fraud detection&lt;/li&gt;
&lt;li&gt;Gray area: Marketing analytics, behavioral studies&lt;/li&gt;
&lt;li&gt;Concerning: Cross-site tracking, detailed profiling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💡 What should you do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Consider privacy-focused browsers with built-in cookie limitations&lt;/li&gt;
&lt;li&gt;Use browser extensions that automatically handle cookie popups&lt;/li&gt;
&lt;li&gt;Configure your browser to block third-party cookies&lt;/li&gt;
&lt;li&gt;Take an extra moment to customize your cookie preferences&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🤔 Next time you see that cookie popup, pause and ask yourself if you really want to do this.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
