<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Cem Batuhan Yaman</title>
    <description>The latest articles on DEV Community by Cem Batuhan Yaman (@cbyeuler).</description>
    <link>https://dev.to/cbyeuler</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4195295%2F55f06653-58be-4e00-a0d1-4e4b2dfabae4.jpg</url>
      <title>DEV Community: Cem Batuhan Yaman</title>
      <link>https://dev.to/cbyeuler</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cbyeuler"/>
    <language>en</language>
    <item>
      <title>Building a Backend Brain #1: Demystifying Clients, Servers, and Ports</title>
      <dc:creator>Cem Batuhan Yaman</dc:creator>
      <pubDate>Tue, 20 Oct 2026 05:00:14 +0000</pubDate>
      <link>https://dev.to/cbyeuler/building-a-backend-brain-1-demystifying-clients-servers-and-ports-1can</link>
      <guid>https://dev.to/cbyeuler/building-a-backend-brain-1-demystifying-clients-servers-and-ports-1can</guid>
      <description>&lt;p&gt;Hey, beautiful internet people! &lt;/p&gt;

&lt;p&gt;I thought for my very first post and article, the topic should be how the internet actually works and what happens behind the scenes!&lt;/p&gt;

&lt;p&gt;I remember my early days on the internet, trying to figure out how programming even works and spending countless hours going down rabbit holes on this exact topic. Looking back, I realized it would be amazing to write an article breaking it all down, not just to share with others, but to really cement those fundamentals for myself.&lt;/p&gt;

&lt;p&gt;This post is going to be the kickoff of a brand-new series where I'll be tackling system design, networking ideas, and sharing the core concepts that I've found most valuable on my journey.&lt;/p&gt;

&lt;p&gt;Let's dive into the first one!&lt;/p&gt;

&lt;h4&gt;
  
  
  How the Internet Works: Clients, Servers, IP Addresses, and Ports
&lt;/h4&gt;

&lt;p&gt;Before we go any deeper let's just see what's happening under the hood, every time you type a URL into your browser or fire a &lt;code&gt;curl&lt;/code&gt; command into a terminal, an intricate dance of networking protocols and application code happens in milliseconds. &lt;br&gt;
Understanding how a request travels from a client to a server, and how languages like Go handle it, is essential for any backend developer.&lt;/p&gt;

&lt;h5&gt;
  
  
  The Foundation: The Client/Server Model and Ports
&lt;/h5&gt;

&lt;p&gt;It is important to understand that most devices and machines communicating over a network act as &lt;strong&gt;hosts&lt;/strong&gt;, taking on the role of either a &lt;strong&gt;client&lt;/strong&gt; or a &lt;strong&gt;server&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The primary difference lies in their roles during communication: &lt;strong&gt;clients initiate requests, while servers receive and respond to those requests.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbxx17eo1qs1vumpmeyje.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbxx17eo1qs1vumpmeyje.png" alt="A diagram that shows the connection between servers and clients" width="800" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Keep in mind that these roles are relative to a particular interaction. A server, for example, can act as a client when requesting resources or services from another server.&lt;/p&gt;

&lt;p&gt;While clients initiate requests, servers run software designed to receive, process, and respond to those requests.&lt;/p&gt;

&lt;p&gt;So:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A host is not necessarily a client or server at all times. A host is a network-connected device or system that can communicate over a network. Client and server describe roles that software takes in a particular interaction.&lt;/li&gt;
&lt;li&gt;A server is not necessarily a dedicated computer. Server software can run on an ordinary laptop, a virtual machine, or a cloud instance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  IP Addresses: Where Does the Data Go?
&lt;/h5&gt;

&lt;p&gt;Now that we understand who's talking to whom, there's another question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How does the network know where to send the information&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An &lt;strong&gt;IP (Internet Protocol) address&lt;/strong&gt; is a numerical address assigned to a network interface, allowing devices to communicate over IP networks, including the internet.&lt;/p&gt;

&lt;p&gt;When a client sends a request to a server, the data is packaged into IP packets containing two important pieces of information: a &lt;strong&gt;source IP address&lt;/strong&gt; and a &lt;strong&gt;destination IP address&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Think of these as the sender's and recipient's addresses on a letter. The destination address helps the network determine where the packet should go, while the source address identifies where it came from.&lt;/p&gt;

&lt;p&gt;Now, I don't want to bore you to death with technical details, but there is something worth understanding about how these addresses are structured.&lt;/p&gt;

&lt;p&gt;There are two versions of IP addresses in widespread use today: IPv4 and IPv6. For now, we'll focus on IPv4.&lt;/p&gt;

&lt;p&gt;An IPv4 address consists of 32 bits, divided into four groups of 8 bits called octets. Each octet is represented as a decimal number ranging from 0 to 255.&lt;/p&gt;

&lt;p&gt;I know, I know, this sounds like a lot, but I promise it's not that complicated!&lt;/p&gt;

&lt;p&gt;Imagine it like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1 octet = 8 bits&lt;/li&gt;
&lt;li&gt;4 octets = 32 bits&lt;/li&gt;
&lt;li&gt;each octet = a decimal value between 0 and 255 &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, 192.168.1.10 is a valid IPv4 address.&lt;/p&gt;

&lt;p&gt;We'll leave IPv6 and the more complicated details of IP addressing for another time.&lt;/p&gt;

&lt;h4&gt;
  
  
  Ports: Finding the Right Application
&lt;/h4&gt;

&lt;p&gt;Alright, so we know how a packet can find its destination.&lt;/p&gt;

&lt;p&gt;But here's another question: &lt;strong&gt;What if that machine is running multiple network applications? How does incoming traffic reach the right one?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's where &lt;strong&gt;ports&lt;/strong&gt; come in.&lt;/p&gt;

&lt;p&gt;Think of an IP address as the address of an apartment building and a port number as an apartment number.&lt;/p&gt;

&lt;p&gt;The IP address helps traffic reach the correct destination, while the port number helps the operating system deliver it to the appropriate application endpoint.&lt;/p&gt;

&lt;p&gt;Ports are represented by numbers ranging from &lt;code&gt;0&lt;/code&gt; to &lt;code&gt;65535&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Some common examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;80&lt;/code&gt; &amp;lt;--&amp;gt; HTTP&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;443&lt;/code&gt; &amp;lt;--&amp;gt; HTTPS&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;8080&lt;/code&gt; &amp;lt;--&amp;gt; Commonly used by development servers&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;3030&lt;/code&gt; &amp;lt;--&amp;gt; Another popular port for local development&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These port numbers are used by transport protocols such as TCP and UDP, which we'll explore in the next article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;And that's it for our first introduction!&lt;/p&gt;

&lt;p&gt;Today, we've established three fundamental ideas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Clients and servers&lt;/strong&gt; describe the roles software performs during communication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IP addresses&lt;/strong&gt; help networks deliver packets to their destinations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ports&lt;/strong&gt; help identify the appropriate application endpoint on a host.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of course, there's much more happening behind the scenes.&lt;/p&gt;

&lt;p&gt;We've only scratched the surface!&lt;/p&gt;

&lt;p&gt;In the next article, we'll explore &lt;strong&gt;TCP, how connections are established, and how HTTP requests travel between clients and servers&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;See you in the next one!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>networking</category>
      <category>backend</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
