<?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 Wasif Manj on Medium]]></title>
        <description><![CDATA[Stories by Wasif Manj on Medium]]></description>
        <link>https://medium.com/@ranawasif386?source=rss-e9e2f919c304------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*cs8h5hbBL4S_3djp</url>
            <title>Stories by Wasif Manj on Medium</title>
            <link>https://medium.com/@ranawasif386?source=rss-e9e2f919c304------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 05:43:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ranawasif386/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[Microservices and their Kubernetes architecture]]></title>
            <link>https://medium.com/@ranawasif386/microservices-and-their-kubernetes-architecture-aa2f6d497ba5?source=rss-e9e2f919c304------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa2f6d497ba5</guid>
            <category><![CDATA[microservice-architecture]]></category>
            <category><![CDATA[microservices-application]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Wasif Manj]]></dc:creator>
            <pubDate>Fri, 03 Jul 2026 04:15:11 GMT</pubDate>
            <atom:updated>2026-07-03T04:15:11.605Z</atom:updated>
            <content:encoded><![CDATA[<p>Each microservice usually has its own Kubernetes Service and its own Deployment (Pods).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*lr4h-WO7b0lYIk5radH5ng.jpeg" /></figure><p>A single application has many services</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/226/1*sAfsBg52O0qDdwX3SJl6lQ.png" /></figure><p>For each microservice, the Kubernetes structure is repeated</p><p>Deployment(ride) → pod(containers) →service(particular service for traffic handling related to microservice)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*yuQrEC33oTbLn4Hshqq-wA.png" /></figure><blockquote><strong>How it actually works</strong></blockquote><p>Pods are labeled</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/262/1*eevbJNp6SAe5xPLDaFhQ5w.png" /></figure><p>Service selects ONLY its Pods</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*ZgD4MNnEwF9PZ8EMXY6Liw.png" /></figure><p>Real request flow</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*1mAFkt4YDt5js5AtledKqw.png" /></figure><p>Kubernetes Service only selects Pods belonging to its own microservice using labels — not across the whole system.</p><p>Every microservice has its own deployment and service, which behaves as a Kubernetes service for traffic handling. Each service has the following structure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*jLmb_MqcYhSZXzJuQCm9Tw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*KIHZR9IWUSUzoIXotpB79g.png" /></figure><p>These YAML files define how Kubernetes creates Pods and how the Kubernetes Service finds those Pods using labels and selectors.</p><blockquote><strong>What does a pod carry in case of Microservices base architecture as compared to a monolith?</strong></blockquote><p>In the case of a monolith, there is only one BE application; Docker only creates one image. And every pod holds a complete BE application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/165/1*g8Zar4kvRWbWf-cXBChjzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/335/1*MjrsxMdXbmudGjSC1aw5rQ.png" /></figure><p>In the case of microservices, each service is a separate application. Each has its own codebase. Each builds its own Docker image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*8hDuK4ueoCuSPFydupIlEA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa2f6d497ba5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scalable Architecture: From Client Request to Kubernetes Deployment]]></title>
            <link>https://medium.com/@ranawasif386/modern-backend-architecture-from-client-request-to-kubernetes-deployment-b9455288b544?source=rss-e9e2f919c304------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9455288b544</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubernetes-pods]]></category>
            <category><![CDATA[docker-container]]></category>
            <category><![CDATA[kubernates-node]]></category>
            <category><![CDATA[kubernetes-service]]></category>
            <dc:creator><![CDATA[Wasif Manj]]></dc:creator>
            <pubDate>Sun, 21 Jun 2026 09:37:21 GMT</pubDate>
            <atom:updated>2026-06-21T09:45:08.557Z</atom:updated>
            <content:encoded><![CDATA[<p>In modern backend architectures, scalability and traffic distribution are common topics of discussion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EFVRcDVySGtFj4YjKST19w.png" /></figure><blockquote>So, how does scalability actually work in Kubernetes?</blockquote><p>Kubernetes scales backend applications by managing <strong>Pods</strong>, which are the smallest deployable units that contain one or more containers (typically one container per Pod). Rather than scaling containers directly, Kubernetes scales Pods.</p><p>When demand increases or failures occur, Kubernetes adjusts the number of Pods accordingly. This is usually handled through a <strong>Deployment</strong>, which maintains a desired number of replica Pods. For example, if a Deployment is configured to run three replicas and one Pod crashes or becomes unavailable, Kubernetes detects that the current number of running Pods has dropped below the desired state. It then automatically creates a new Pod to restore the replica count back to three.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*JiAZJyYjnxanfFt1AkrCcQ.png" /></figure><p>Kubernetes does not scale containers directly; instead, it scales Pods. For example, if a Deployment initially has 2 Pod replicas and traffic increases, Kubernetes can automatically scale the number of Pods up to 5 to handle the additional load.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P4o7UYzgp8_5L9Gzi4XGRQ.png" /></figure><blockquote><strong>How does traffic handling to Pods take place?</strong></blockquote><p>When a user request comes, to which pod should this request be redirected? This is done by a service or a Kubernetes service(traffic handling). Service sits between the client and pods. It works as a load balancer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*KDxSr7qApNrgRZLlTjndCA.png" /></figure><p>Backend/DevOps engineers define the Service in Kubernetes configuration files (YAML). The selector for the service name is defined in a YAML file. Also, a relevant label associated with pods. So when a request comes for a specific service, it routes traffic to labelled pods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*zzjjD1jbd5oZhecOKuGwvg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*YqRSQOjslF3cLvssDEinRw.png" /></figure><blockquote><strong>Purpose of DockerFile and YAML file?</strong></blockquote><p>Docker file defines how to build a container image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*FJuvY7UFavOf-Wwx99YIYw.png" /></figure><p>Kubernetes YAML defines how to run and manage containers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*OnKPuDsmKN0-4X5P2UzUzw.png" /></figure><p>A complete flow</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*iZOopiY6dwpzds15M5alzw.png" /></figure><blockquote><strong>Difference between an application service and a Kubernetes service, and how are they linked as a complete flow?</strong></blockquote><p>In a backend application, the <strong>service layer</strong> contains the actual business logic, including validations and core processing. It typically follows an architectural flow such as:</p><p><strong>Endpoint → Controller → Service → Repository → Database</strong></p><p>Here, the controller handles incoming requests, the service layer executes business logic, the repository interacts with the database, and the endpoint is the entry point for client requests.</p><p>On the other hand, a <strong>Kubernetes Service</strong> is part of the infrastructure layer. It is responsible for discovering Pods, load balancing traffic between them, and providing a stable network endpoint for accessing the application. Unlike the application service layer, it does not contain any business logic or application-specific code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*0gliL9QDTEHCdhIfFN-b3w.png" /></figure><p>The load balancer decides on the node. And the Kubernetes service decides the Pod.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*AhuORFVULQgtENht-3d94g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9455288b544" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ELK stack, Prometheus, Grafana]]></title>
            <link>https://medium.com/@ranawasif386/elk-stack-prometheus-grafana-75dc749ca32a?source=rss-e9e2f919c304------2</link>
            <guid isPermaLink="false">https://medium.com/p/75dc749ca32a</guid>
            <category><![CDATA[elk-stack]]></category>
            <category><![CDATA[gafrana]]></category>
            <category><![CDATA[prometheus]]></category>
            <dc:creator><![CDATA[Wasif Manj]]></dc:creator>
            <pubDate>Mon, 27 Apr 2026 04:54:38 GMT</pubDate>
            <atom:updated>2026-04-27T04:54:38.826Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Logging tells you <strong>what happened</strong>, monitoring tells you <strong>how the system is performing</strong></blockquote><h3>Step 1: Why this topic exists</h3><p>You run your backend app.</p><p>Questions:</p><ul><li>Is it working? 🤔</li><li>Is it slow?</li><li>Did it crash?</li><li>Why did it fail?</li></ul><p>👉 You need <strong>visibility</strong></p><p>Two things you need — -&gt;</p><p>1- logging</p><p>2- Monitoring</p><blockquote><strong><em>ELK STACK</em></strong></blockquote><p>is used for logging.</p><p>ELK = 3 tools</p><ol><li>ElasticSearch — -&gt; stores logs</li><li>Logstash — -&gt; collect &amp; processes logs</li><li>Kibana → shows logs in UI</li></ol><h3>Flow:</h3><pre>App → Logs → Logstash → Elasticsearch → Kibana (UI)</pre><blockquote><strong><em>PROTHETHEUS</em></strong></blockquote><p>It is used for monitoring. It collects metrics(numbers).</p><p>Example collects:</p><ul><li>Request count</li><li>Error rate</li><li>Memory usage</li></ul><h3>Flow:</h3><pre>App → exposes metrics → Prometheus collects</pre><blockquote><strong><em>GAFRANA</em></strong></blockquote><p>It visualises data(graphs). Connected to Prometheus.</p><p>Shows:</p><ol><li>Graphs</li></ol><p>2. Dashboards</p><p>3. Alert</p><h3>Flow:</h3><pre>Prometheus → Grafana → Graphs &amp; Alerts</pre><h3>Put everything together</h3><pre>Logs → ELK → see events<br>Metrics → Prometheus → Grafana → see health</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75dc749ca32a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RESTful APIs design principles]]></title>
            <link>https://medium.com/@ranawasif386/restful-apis-design-principles-88c598aaf65f?source=rss-e9e2f919c304------2</link>
            <guid isPermaLink="false">https://medium.com/p/88c598aaf65f</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[http-request]]></category>
            <category><![CDATA[api-principle]]></category>
            <category><![CDATA[http-status-code]]></category>
            <dc:creator><![CDATA[Wasif Manj]]></dc:creator>
            <pubDate>Tue, 31 Mar 2026 05:01:32 GMT</pubDate>
            <atom:updated>2026-03-31T05:02:27.759Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>REST = Proper HTTP methods + Clean URLs + Stateless + Standard responses</blockquote><p>Below are the guidelines to design good RESTful APIs.</p><h4>1. Use Correct HTTP Methods</h4><ul><li><strong>GET</strong> → Fetch data</li><li><strong>POST</strong> → Create</li><li><strong>PUT/PATCH</strong> → Update</li><li><strong>DELETE</strong> → Remove</li></ul><h4>2. Use Nouns in URLs (Not Verbs)</h4><ul><li>✅ /users, /rides</li><li>❌ /getUsers, /createRide</li></ul><h4>3. Use Proper Status Codes</h4><ul><li><strong>200</strong> → OK</li><li><strong>201</strong> → Created</li><li><strong>400</strong> → Bad Request</li><li><strong>401</strong> → Unauthorized</li><li><strong>403</strong> → Forbidden</li><li><strong>404</strong> → Not Found</li><li><strong>500</strong> → Server Error</li></ul><h4>4. Follow Resource Hierarchy</h4><ul><li>/users/123</li><li>/users/123/rides</li></ul><h4>5. Keep APIs Stateless</h4><ul><li>Each request must include all info (token, data)</li><li>The server does NOT store the session</li></ul><h4>6. Use Query Parameters for Filtering</h4><ul><li>/rides?city=LHR&amp;status=completed</li></ul><h4>7. Use JSON Format</h4><pre>{<br>  &quot;id&quot;: 1,<br>  &quot;name&quot;: &quot;Ali&quot;<br>}</pre><h4>8. Use Plural Naming</h4><ul><li>/users ✅</li><li>/user ❌</li></ul><h4>9. Version Your APIs</h4><ul><li>/api/v1/users</li><li>/api/v2/users</li></ul><h4>10. Idempotency</h4><ul><li><strong>GET, PUT, DELETE</strong> → Same result if called multiple times</li><li><strong>POST</strong> → Creates a new resource each time</li><li>Server does NOT store session</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88c598aaf65f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Caching basics(Redis) to speed up applications]]></title>
            <link>https://medium.com/@ranawasif386/caching-basics-redis-to-speed-up-applications-f60accf6d5a8?source=rss-e9e2f919c304------2</link>
            <guid isPermaLink="false">https://medium.com/p/f60accf6d5a8</guid>
            <category><![CDATA[cache]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[redis-server]]></category>
            <category><![CDATA[clients]]></category>
            <category><![CDATA[redis]]></category>
            <dc:creator><![CDATA[Wasif Manj]]></dc:creator>
            <pubDate>Sun, 22 Mar 2026 08:04:13 GMT</pubDate>
            <atom:updated>2026-05-05T04:58:52.402Z</atom:updated>
            <content:encoded><![CDATA[<p>Redis is a very fast in_memory database that stores data in memory instead of disk.</p><p>Why is Redis fast?</p><p>Normal DB: App → Disk → Data</p><p>Redis: App → redis→ Data</p><p>RAM is much faster than disk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iBjIDziHGuefG2RGy7OVMQ.webp" /></figure><h3>Is Redis a database?</h3><p>Yes <br> But mostly used as: <strong><em>Cache database</em></strong></p><p>It is not usually the main permanent DB.</p><p><strong>It&#39;s a data structure server — it supports multiple types.</strong></p><p>String — simple key-value</p><p>Hashes — like a JSON object</p><p>Lists — ordered collections</p><p>Sets — Unique collections</p><p>Sorted Sets — sets with scores, for ranking.</p><p>So Redis is an in-memory data store optimised for speed and flexible data structures, not just cache.</p><blockquote><strong>Redis in Infrastructure Terms</strong></blockquote><p>Redis sits between your backend and database. It stores frequently accessed data in RAM. Backend can query Redis first before hitting the slower disk-based database.</p><p>The way the backend creates a connection with the database is the same way the BE creates a connection with Redis.</p><p>If a request comes from the client to BE, it first checks whether the required information is available in Redis; if it is, it returns the result. Otherwise, the BE queries the database to get the required information. While returning the result to the client, that information is cached in Redis for future requests.</p><p>Now the question is: Is the data always available in Redis works</p><p>Developers define the TTL value of cached data in Redis, after which the data should be removed</p><p>TTL = How long a key should live in Redis before auto-deleting.</p><p>Example:</p><pre>SET drivers:lahore [data]<br>EXPIRE drivers:lahore 60</pre><p>Means:</p><blockquote><em>Delete this key automatically after 60 seconds.</em></blockquote><h3>Real App Examples (Ride Hailing)</h3><h3>1️- Nearby Drivers List</h3><p>Changes very frequently.</p><p>TTL = 10–30 seconds</p><p>Because drivers move.</p><h3>2️- City List</h3><p>Rarely changes.</p><p>TTL = 1 hour or 24 hours</p><h3>3️- OTP Code</h3><p>TTL = 2–5 minutes</p><p>After that, it is automatically removed.</p><h3>4️- Session Token</h3><p>TTL = 30 minutes or 1 hour</p><blockquote><strong>What if TTL hasn&#39;t yet expired, and the DB has been updated</strong></blockquote><p>Yes — this is a real problem called:</p><blockquote><strong><em>Cache Consistency Problem</em></strong></blockquote><p>Developers use 3 common strategies to solve this problem</p><ol><li><strong><em>Cache invalidation</em></strong></li></ol><p>When DB is updated → Redis key is deleted immediately.</p><p>2.<em> </em><strong><em>Update Redis Along With DB (Write Through)</em></strong></p><p>When DB updates → Redis is also updated immediately.</p><p>3. <strong><em>Short TTL Strategy</em></strong></p><p>Keep TTL very short, let it expire naturally</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f60accf6d5a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Distributed Systems and Producer-Consumer Model]]></title>
            <link>https://medium.com/@ranawasif386/distributed-systems-and-producer-consumer-model-f56ddc46564d?source=rss-e9e2f919c304------2</link>
            <guid isPermaLink="false">https://medium.com/p/f56ddc46564d</guid>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[message-broker]]></category>
            <category><![CDATA[consumer-producer]]></category>
            <category><![CDATA[queue]]></category>
            <category><![CDATA[network]]></category>
            <dc:creator><![CDATA[Wasif Manj]]></dc:creator>
            <pubDate>Sat, 21 Feb 2026 05:51:12 GMT</pubDate>
            <atom:updated>2026-02-21T05:51:12.462Z</atom:updated>
            <content:encoded><![CDATA[<p>A <strong>distributed system</strong> is a system in which <strong>multiple computers (servers) work together over a network and appear to the user as a single system</strong>.</p><p>Simple definition:</p><blockquote><em>A distributed system = many machines + network communication + one common goal.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*MwSEqbdyhdJ9TOMBeRymjQ.jpeg" /><figcaption>producer-consumer model</figcaption></figure><h3>Everyday Examples of Distributed Systems</h3><ol><li><strong>Google Search</strong></li></ol><ul><li>Your search request goes to many servers.</li><li>Results are combined and sent back.</li></ul><p><strong>2. Netflix</strong></p><ul><li>Videos are stored across many servers worldwide.</li><li>You get the video from the nearest server.</li></ul><p><strong>3. Amazon</strong></p><ul><li>Order service, payment service, and inventory service all run separately.</li></ul><h3>Why Do We Need Distributed Systems?</h3><p>Because:</p><ol><li>Handle <strong>huge traffic</strong></li><li>Scale easily (add more machines)</li><li>Better performance</li><li>Fault tolerance (if one machine fails, the system still works).</li></ol><p>What is the <strong>Producer–Consumer Model?</strong></p><p>The Producer–Consumer model is a design pattern where:</p><ul><li><strong>Producer</strong> → creates data (messages/events/tasks)</li><li><strong>Consumer</strong> → uses or processes that data</li><li><strong>Buffer / Queue / Broker</strong> → sits in between them</li></ul><p>Think like this:</p><p>Producer → Queue → Consumer</p><p>The producer does <strong>not</strong> directly talk to the consumer.<br> They communicate through a <strong>queue or message broker</strong>.</p><h3>Very Simple Real-Life Example</h3><p>Imagine:</p><ul><li>Ride completed in a ride app</li><li>System creates a <strong>ride-completed event</strong></li><li>That event is placed in a queue</li><li>Another service reads it and updates the rating</li><li>Another service calculates commission</li><li>Another service sends a notification</li></ul><p>The ride service (producer) doesn’t wait for others.</p><h3>Why This Model Is Important in Distributed Systems</h3><p>In distributed systems (multiple services running separately), producer–consumer helps in:</p><h3>1. Decoupling (Very Important)</h3><p><strong>The producer does not know</strong>:</p><ul><li>Who the consumers are</li><li>How many consumers exist</li><li>When will they process</li></ul><p>It only pushes the message to the broker.</p><p>Example:<br> If you use a broker like <strong>Apache Kafka</strong> or <strong>RabbitMQ</strong>, the producer just sends a message there.</p><p>If the consumer is down → no problem<br> The message stays in the broker.</p><p>This removes runtime dependency between services.</p><h3>2. Scalability</h3><p>If traffic increases:</p><ul><li>Add more consumers</li><li>They read from the same queue</li><li>The load gets distributed</li></ul><p>Example:<br> 10,000 ride completion events per second<br> You add 5 consumer instances<br> They divide the load.</p><p>Very powerful for high-scale systems.</p><h3>3. Asynchronous Processing</h3><p>The producer doesn’t wait.</p><p><strong>Without producer-consumer:</strong></p><p>Slow and tightly coupled.</p><pre>Service A → calls Service B → waits → calls Service C → waits</pre><p><strong>With producer-consumer:</strong></p><p>Fast response to the user.</p><pre>Service A → sends message → done <br>Consumers process later</pre><h3>4. Fault Tolerance</h3><p>If consumer crashes:</p><ul><li>Messages remain in the queue</li><li>Another consumer can process them later</li></ul><p>The system becomes more reliable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f56ddc46564d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Message Broker: Apache or RabbitMQ]]></title>
            <link>https://medium.com/@ranawasif386/message-broker-apache-or-rabbitmq-09d1af43d719?source=rss-e9e2f919c304------2</link>
            <guid isPermaLink="false">https://medium.com/p/09d1af43d719</guid>
            <category><![CDATA[message-broker]]></category>
            <category><![CDATA[apache-kafka]]></category>
            <category><![CDATA[rabbitmq]]></category>
            <category><![CDATA[tasks]]></category>
            <category><![CDATA[servers]]></category>
            <dc:creator><![CDATA[Wasif Manj]]></dc:creator>
            <pubDate>Wed, 04 Feb 2026 04:52:31 GMT</pubDate>
            <atom:updated>2026-03-25T03:31:59.349Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Message brokers remove direct runtime dependency between services</blockquote><p>A message broker is a middleman that:</p><p>receives messages</p><p>stores them safely</p><p>delivers to whoever needs to process them.</p><p>A message broker is a separate server/system, just like a database server, BE server or cache(Redis). It&#39;s not inside your BE code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*yQ7wD2aCdUHZeuTbZz_oOg.jpeg" /></figure><h3>When do applications NEED a message broker?</h3><p>An application reaches a point where:</p><ul><li>Doing everything in <strong>one synchronous API call</strong> becomes risky</li><li>You don’t want one failure to break the whole request</li><li>Some work is <strong>not needed immediately</strong></li><li>Some work needs <strong>to be retried</strong></li><li>Some work needs <strong>fan-out</strong></li></ul><p>That’s where brokers come in.</p><ul><li>Backend → talks to DB (sync)</li><li>Backend → sends messages to broker (async)</li></ul><p>Q. <strong>Does BE talk with both at the same time?</strong></p><p>A backend request can talk to:</p><ul><li><strong>Database synchronously</strong></li><li><strong>Message broker (Kafka / RabbitMQ) asynchronously</strong><br> <strong>in the same API call.</strong></li></ul><p>This is not only possible — it is <strong>the most common modern design</strong>.</p><p>Let&#39;s take an example: A driver completes a ride, when the driver does the payment, the ride ends, or the payment API is called. Which is responsible for updating the status of the ride synchronously to success. Also, to respond to the user with status 200. On the other hand, the same API is responsible for dispatching events to Apache(Kafka).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/181/1*uThYCrJa9s1spcrBwCn4Og.png" /></figure><p><strong>Q. What is Apache?</strong></p><p>Apache is a server which works as a middleman. It has a log-based event processing. In Apache, messages stay even after they are consumed.</p><p><strong>Q. Who listens to this dispatched event to Apache(Kafka)?</strong></p><p>Multiple independent consumers consume this event. Same event, multiple listeners. The process is the same for every single event.</p><p>In the context of our previous example of a ride:</p><p>1- <strong>Consumer-Campaign service</strong> — -&gt; listens to ride completed, increments ride count, checks if the campaign goal is achieved or not, and updates campaign data in the DB.</p><p>2. <strong>Consumer-App Sync Service </strong>— -&gt; updates progress bar, pushes real-time update using web socket.</p><p>3. <strong>Consumer-Analytics </strong>— -&gt; logs event, updates dashboard.</p><p>Q. <strong>What is a Rabbit Queue?</strong></p><p>RabbitMQ is a message broker that works like a queue system</p><p>Meaning:</p><ul><li>One service <strong>puts a message</strong></li><li>Another service <strong>takes a message</strong></li><li>Messages wait safely in between</li></ul><p>📌 Core idea: <strong>FIFO</strong> (First In → First Out)</p><p><strong>Important Terms in RabbitMQ?</strong></p><p>Producer — -&gt; generally the API service that sends messages, like the ride end API.</p><p>RabbitMQ — -&gt; Queue where messages sit until they are consumed.</p><p>Consumer — -&gt; API service that consumes the messages, like a campaign service.</p><p>Acknowledgement — -&gt; Consumer says it has consumed the message, if the queue doesnt receieve acknowledgement, it keeps or resends the message.</p><p><strong>ONE Consumer per queue</strong></p><p>So to acheive apache kind of process, where multiple consumer comsumes one event or message. In RabbitMQ, multiple queues are used. So that multiple consumers comsumes same message. Because the same message is copied to the required number of queues.</p><p>In RabbitMQ, after the acknowledgement, the message is deleted, and if the consumer crashes, the messages are re-queued.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*WCLVayHOdrNCfZ8bxl_h3Q.png" /></figure><p><strong>Point to remember:</strong></p><p>Kafka mindset: consumption is <strong>OPTIONAL</strong> and <strong>REPEATABLE</strong></p><p>RabbitMQ mindset: consumption is <strong>MANDATORY</strong> and <strong>FINAL</strong></p><p>RabbitMQ supports re-delivery of un-ACKed messages, not replay of processed messages</p><p>Kafka supports replay of processed messages by design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*YKuc7u4GyMdEHoX9vx30Iw.png" /></figure><p><strong>What will happen in the case of two(the same events)?</strong></p><p>Multiple events may be generated after a certain action on the frontend side. Both can be used for different purposes. But the events remain independent of each other in both success and failure while consumers are consuming them.</p><p><strong>What will happen in the case of two ( the different events)?</strong></p><p>Two totally different events may happen after a certain action. These will also be independent of each other. <strong>Backend developer decides</strong><br> using <strong>Exchange type + routing rules which event will go to which queue. </strong>Not the consumer.<br> Not RabbitMQ automatically.</p><p>Producer → Exchange → (rules) → Queue(s) → Consumer(s)</p><h3>Use RabbitMQ when:</h3><ul><li>You want to <strong>do a task</strong></li><li>Work must happen <strong>once</strong></li><li>You need a <strong>retry/acknowledgement</strong></li><li>Background jobs</li></ul><p><strong>Examples</strong></p><ul><li>Send email</li><li>Update campaign progress</li><li>Generate invoice</li><li>Push notification</li></ul><p><em>“Please do this work”</em></p><h3>Use Apache Kafka when:</h3><ul><li>You want to <strong>record an event</strong></li><li>The same event is used by <strong>many systems</strong></li><li>Need <strong>history/replay</strong></li><li>Analytics &amp; reporting.</li></ul><p><strong>Examples</strong></p><ul><li>Ride completed</li><li>Order placed</li><li>Payment failed</li><li>User activity tracking</li></ul><p><em>“This thing happened”</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09d1af43d719" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is a cluster?]]></title>
            <link>https://medium.com/@ranawasif386/what-is-a-cluster-d320b33cc1c8?source=rss-e9e2f919c304------2</link>
            <guid isPermaLink="false">https://medium.com/p/d320b33cc1c8</guid>
            <category><![CDATA[kubernates]]></category>
            <category><![CDATA[cluster]]></category>
            <category><![CDATA[node]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[pods]]></category>
            <dc:creator><![CDATA[Wasif Manj]]></dc:creator>
            <pubDate>Sun, 01 Feb 2026 03:16:35 GMT</pubDate>
            <atom:updated>2026-02-01T03:16:35.756Z</atom:updated>
            <content:encoded><![CDATA[<p>What is a cluster?</p><p>It is the whole Kubernetes system, just like an umbrella. Everything is under it. It contains nodes.</p><p>What is a node?</p><p>Nodes are servers residing in the cluster. Servers contain the pods. minimum 1 node for an application, and the maximum can be any number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*EGOJwi-a8D61KaLHfjlCLQ.png" /></figure><p>What are pods?</p><p>Pods are the smallest independently deployable unit. It contains containers that hold the BE application. A single pod can have many containers, but usually only one, which is standard.</p><p>What is a Container?</p><p>Its kind of a small box containing BE code, including all dependencies. They are under heirarchy of pods</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d320b33cc1c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why multiple Servers? Scaling]]></title>
            <link>https://medium.com/@ranawasif386/why-multiple-servers-3e88430f81ff?source=rss-e9e2f919c304------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e88430f81ff</guid>
            <category><![CDATA[regions]]></category>
            <category><![CDATA[mircoservices]]></category>
            <category><![CDATA[multiple-servers]]></category>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[horizontal-scaling]]></category>
            <dc:creator><![CDATA[Wasif Manj]]></dc:creator>
            <pubDate>Wed, 28 Jan 2026 04:41:25 GMT</pubDate>
            <atom:updated>2026-01-29T03:16:30.662Z</atom:updated>
            <content:encoded><![CDATA[<p>One server cannot handle millions of users. Multiple servers share the load. Micro services are on different servers. Relevant request handled by a dedicated server.</p><p>Scaling is an important element in which servers count increased in peak hours according to load, and servers are released as traffic reduces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MYJcKQ5GxlpJJnPfaDhrrw.jpeg" /></figure><p><strong>How are backend apps deployed on multiple servers?</strong></p><p>There are multiple ways:</p><blockquote>a) <strong>Horizontal scaling</strong></blockquote><p>The same app is deployed on multiple servers. Servers share the load with a load balancer. Any server can handle any request.</p><blockquote>b) <strong>Microservice-based deployment</strong></blockquote><p>Each microservice runs on <strong>its own set of servers</strong>. Each microservice can scale independently. Help with fault isolation.</p><blockquote>c) <strong>Region / Data centre separation</strong></blockquote><p>for global app, servers are deployed at multi regions. like one cluster →region1, 2nd cluster → region2</p><blockquote>d) <strong>Containers / Orchestration (modern)</strong></blockquote><p>dev write BE app, it&#39;s just code. If you put it in a small box its a container(Docker). This container can run on anything. A simple BE can be on one server, but usually a complex BE app is on multiple containers.</p><p>You have many servers, each of which can contain many containers. Orchestration in Kubernetes is a manager. like starting and stopping containers, handling container crashing and deciding which server will run which container.</p><p>Orchestration is responsible for auto scaling, increasing in traffic cause starting of more containers, traffic reduce extra containers. If any server crashes, it shifts those containers to another server. While it shifts, there is no impact on the user side.</p><p><strong>What is Kubernates and Docker?</strong></p><p>Docker creates containers, and Kubernetes or orchestration defines how to run them on multiple servers</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e88430f81ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How DNS server resolve a client request?]]></title>
            <link>https://medium.com/@ranawasif386/how-dns-server-resolve-a-client-request-09af16d1fc25?source=rss-e9e2f919c304------2</link>
            <guid isPermaLink="false">https://medium.com/p/09af16d1fc25</guid>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[ip-address]]></category>
            <category><![CDATA[dns-servers]]></category>
            <category><![CDATA[clinet]]></category>
            <dc:creator><![CDATA[Wasif Manj]]></dc:creator>
            <pubDate>Wed, 28 Jan 2026 03:03:08 GMT</pubDate>
            <atom:updated>2026-01-29T03:12:52.966Z</atom:updated>
            <content:encoded><![CDATA[<p>DNS stands for Domain Name Server. Its primary job is to provide the client with corrrect IP address of the server to which the user is trying to access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zryMso2RoEy5DvX2sMaegQ.png" /></figure><p>The DNS job is before the handshake starts. Handshake needs a server IP address. DNS resolving includes four steps:</p><p><strong>Local DNS Resolver:</strong></p><blockquote>The DNS server that your device first asks to resolve a domain name, usually provided by your ISP or a public DNS like Google.</blockquote><p><strong>Root DNS Resolver:</strong></p><blockquote>The top-level DNS servers that tell where to find the DNS servers for each TLD (like .com, .org).</blockquote><p><strong>TLD DNS(.com, .org):</strong></p><blockquote>DNS servers that know which authoritative DNS server is responsible for a specific domain under that TLD.</blockquote><p><strong>Authoritative DNS(example.com):</strong></p><blockquote>The DNS server that holds the actual DNS records and returns the final IP address for the domain.</blockquote><p>DNS server locally caches the IP address of the server, to return it for the next time to the same client or a different one. IP address cached on local DNS.</p><p>DNS cache expires when its TTL(time to live) value runs out, which is configured on the authoritative DNS record.</p><p><strong>Route calling process from Frontend to BE</strong></p><p>Application → DNS →TLS handshake → server → BE app → finds endpoint → controller → service → repository →database</p><p><strong>What is the MVC pattern?</strong></p><p>Below is the standard practice that modern system uses.</p><p>Endpoint → Controller → Service → Repository</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09af16d1fc25" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>