Instagram story viewer> @akashcodeofficial> Posts
106
posts
165.9K
followers
207
following
How software works under the hood
Visual explanations for engineers
Backend • AI • Distributed Systems
📧 [email protected]
POSTS STORIES REELS TAGGED
Download All
Production Traffic Architecture — Key Concepts

Edge Layer

CDN → serves static assets (images, JS, CSS) from edge → reduces origin load + latency
WAF → filters malicious traffic (L7 attacks, bots, rate abuse)
TLS termination → encryption handled at edge → offloads backend
Edge Gateway → auth (JWT), rate limiting, request shaping

Global Routing

DNS (latency-based) → resolves domain to nearest region
Anycast → same IP globally, routed by network to closest PoP
GLB (Global Load Balancer) → routes to healthy regional entry point
👉 DNS decides region, GLB decides entry inside region

Region & Availability Zones

Region → geographical deployment unit
AZ (Availability Zone) → physically isolated data centers
independent power + network
failure of one AZ does not impact others
Regional LB distributes traffic across AZs

Cell Architecture

System split into independent cells
Each cell contains:
services
database
cache
Users distributed via shard key (user_id / hash)
Blast radius control → failure isolated to one cell

Cluster Layer

NLB (Layer 4) → TCP-level load balancing (fast, no HTTP awareness)
ALB / Ingress (Layer 7) → HTTP-aware routing (path, headers)
Kubernetes → runs services as pods, supports autoscaling

Service Communication

Sync (gRPC / HTTP) → real-time calls
Async (Kafka) → event-driven, decoupled processing
Avoid tight coupling → improves scalability + fault isolation

Data Layer

Read path → Local Cache → Redis → Database
Write strategies
Hot → direct DB (critical: payments, auth)
Warm → Kafka batch writes (normal flows)
Cold → object storage (S3 / data lake, analytics/logs)
Caching reduces latency + DB load

Cross-cutting concerns

Observability → logs, metrics, tracing
Security → IAM, mTLS, secrets
Resilience → retries, timeouts, circuit breakers
Automation → CI/CD, infra as code
Governance → policies, quotas

#systemdesign #backendengineering #scalablearchitecture #devops #softwareengineering by @akashcodeofficial
78
3 months ago
Download
WhatsApp feels simple to use. Building it isn’t.

This reel explains the core one-to-one message delivery flow ….how a message travels from one user to another.

It’s based on WhatsApp’s publicly available engineering talks and technical write-ups. Since Meta hasn’t published its current production architecture, some components are simplified for clarity.

What’s happening behind the scenes?

Every client maintains a persistent WebSocket connection to a Chat Server for real-time communication.
New connections are distributed across multiple Chat Servers to handle millions of concurrent users.

Chat Servers run on Erlang/OTP, built for massive concurrency.
The Session Service uses Mnesia to map online users to the Chat Server handling their connection.

If the receiver is online, the message is delivered instantly. Otherwise, it’s stored temporarily and delivered when they reconnect.

Once the receiver acknowledges the message, the pending copy is removed.
What this reel doesn’t cover

End-to-end encryption, authentication, media pipeline, object storage & CDN, group messaging, push notifications, multi-device sync, replication & sharding, monitoring, and spam detection.

I also intentionally left out technologies like Kafka, Redis, Cassandra, Kubernetes, and Docker because there isn’t public evidence that they’re part of WhatsApp’s current core one-to-one message delivery architecture.

Which production system should I break down next?

#systemdesign #backend #distributedsystems #softwareengineering #whatsapp by @akashcodeofficial
11
a day ago
Download
Redis Pub/Sub and Kafka both move messages between services, but they’re built for different reliability requirements.

Redis Pub/Sub delivers messages to active subscribers in real time. If a subscriber isn’t connected when a message is published, it misses it.

Kafka takes a different approach. It stores every event in a durable log, so consumers can come back later and process the events they missed.

The choice isn’t about speed. It’s about whether losing a message is acceptable.

That’s why you’ll often see Redis Pub/Sub used for transient, real-time messaging, while Kafka is used for events that need to be retained and replayed.

Save this if you’re learning Distributed Systems or preparing for System Design interviews.

#distributedsystems #kafka #redis #systemdesign #backendengineering by @akashcodeofficial
14
2 days ago
Download
🚀 CI/CD Explained: From Git Push to Production in 60s

Ever wonder how companies like Netflix deploy code 100+ times per day without breaking production? Here’s the exact pipeline:

🔹 STEP 1: CODE REVIEW
Developer raises a PR → Team reviews → Merges to main branch

🔹 STEP 2: AUTOMATED QUALITY GATES
GitHub Actions triggers instantly:
• Unit tests (Jest, PyTest)
• Integration tests (validate API contracts)
• SAST security scans (SonarQube, Snyk)
• Code quality checks (ESLint, Prettier)
❌ Any failure? Pipeline stops. No broken code reaches production.

🔹 STEP 3: CONTAINERIZATION
✅ All checks pass? Code gets packaged into a Docker container:
FROM node:18-alpine
COPY package*.json ./
RUN npm ci —production
COPY . .
• Immutable artifact ✓
• Includes runtime + dependencies ✓
• Same container runs everywhere ✓
→ Image pushed to Amazon ECR or Docker Hub (registry.acme.com/app:v2.4.1-abc123f)

🔹 STEP 4: STAGING VALIDATION
Deploy to staging environment (prod replica):
• Same Kubernetes version
• Same database schema
• Same resource limits
→ Automated smoke tests run:
✓ /health endpoint returns 200
✓ Database connectivity verified
✓ Critical user flows tested (login, checkout, search)

🔹 STEP 5: PROGRESSIVE PRODUCTION ROLLOUT
Kubernetes + Argo Rollouts take over:

Phase 1: 5% of users (canary pods)
• Monitor for 10 minutes
• Grafana tracks: error rate, p99 latency, CPU, memory

Phase 2: 25% if metrics healthy
• Run synthetic transactions
• Validate business KPIs

Phase 3: 50% → 100%
• Full rollout complete

🔹 STEP 6: AUTO-ROLLBACK SAFETY NET
If error rate > 5% OR p99 latency > 500ms:
→ Argo automatically reverts to stable version
→ Alerts fire to Slack + PagerDuty
→ Deployment blocked until root cause fixed

⏱️ RESULT: 15-30 minutes, zero downtime, fully automated

This is modern DevOps. No manual deployments. No “hope it works” moments. Just reliable, fast, safe releases.

#devops #cicd #kubernetes Docker GitHubActions SRE CloudNative Microservices ArgoRollouts TechExplained SoftwareEngineering DevOpsCommunity by @akashcodeofficial
377
7 months ago
Download
RAG vs MCP — most people confuse these two.

They’re NOT competitors.

👉 RAG = reads your data
👉 MCP = acts on live systems

RAG pulls from docs (policies, PDFs, knowledge base) and gives grounded answers.

MCP connects to real systems (APIs, DBs) to fetch live data or take actions.

Example:
“What’s the return policy?” → RAG
“Is my order eligible?” → MCP

👉 Real systems use BOTH.

Rule:
Know → RAG
Do → MCP
Production → Both

Save this — you’ll need it.

#aiengineering #systemdesign #rag #mcp #backenddevelopment by @akashcodeofficial
91
4 months ago
Download
one of the most common AWS architectures broken down. frontend on CloudFront + S3, backend on EC2/Lambda/ECS, data layer with RDS/DynamoDB/S3. 

save this if you’re learning cloud or system design

#aws #backend #systemdesign by @akashcodeofficial
347
8 months ago
Download
Why do AI developers use LangGraph when they already have LangChain?

Because just connecting an LLM to tools isn’t enough.

In real projects, AI agents don’t just do one thing and stop.

They need to:

• Decide what to do next
• Use different tools at different times
• Handle errors and try again
• Keep track of what’s already been done
• Repeat steps until the task is finished

LangChain helps you connect your model to tools and data.

But when things get more complex, you need a way to control the flow of the whole process.

That’s where LangGraph comes in.

It lets you design how your AI system moves from one step to another, like a flowchart, instead of just stacking prompts in a line.

A simple way to think about it:

🧠 LLM = the brain (it thinks and generates responses)

🔗 LangChain = the wiring (it connects the brain to tools and data)

🕸️ LangGraph = the control system (it decides what happens next and manages the flow)

If you’re building real AI systems, this difference matters a lot more than just knowing how to call an API.

In this reel, I explain the full setup on a whiteboard in a simple way.

💾 Save this for when you start building AI agents.

👇 What should I explain next?

AI Agents • Tool Calling • Context Engineering

#langgraph #aiengineering #llm #backenddevelopment #systemdesign by @akashcodeofficial
24
a month ago
Download
Kubernetes in a restaurant — full breakdown 👇

The reel gives you the mental model. Here’s what I skipped for time:

→ API Server (the waiter)
The front door of Kubernetes. Every request goes through it — from you, kubectl, controllers, everything. It validates requests and acts as the control plane entrypoint.

→ etcd (the order book)
A distributed key-value store holding cluster state: pods, nodes, configs, secrets.
Lose etcd, lose the cluster.
That’s why production setups run 3 or 5 replicas for high availability.

→ Scheduler (the head chef)
It doesn’t run your app.
It decides where your pod should run based on CPU, memory, affinity, taints, and constraints — then hands it off.

→ Kubelet (the cook)
Runs on every worker node.
Pulls images, starts containers, checks health, and reports back to the control plane.

→ Container Runtime (the stove)
The software actually running containers.
Usually containerd today.
Docker was the original standard, but Kubernetes moved toward container-native runtimes.

→ Controller Manager (the floor manager)
This is Kubernetes philosophy in one loop:

Observe current state
→ Compare to desired state
→ Fix the gap

That’s reconciliation.

One thing I skipped in the reel:

→ kube-proxy (the food runner)
Routes traffic to the right pod by managing networking rules on each node.

Covering that in the next reel.

Why “self-healing” is a big deal

Pod dies
→ Controller notices
→ New pod gets scheduled
→ Kubelet starts it

No human involved.

That’s how companies like Netflix, Spotify and Airbnb run thousands of services without babysitting infrastructure.

Save this for your next system design interview 🔖
Follow @akashcode.official for more backend breakdowns.

#kubernetes #devops #backend #systemdesign #k8s cloudnative softwareengineering programming backenddeveloper devopsengineer docker containerization microservices cloudcomputing techeducation by @akashcodeofficial
97
3 months ago
Download
Most engineers say they understand Kafka.

Very few can explain it without slides.

So I broke down the entire Kafka architecture on a whiteboard how it actually works in production:

→ Why direct service calls break at scale (tight coupling)
→ How producers publish events without depending on consumers
→ What topics and partitions really are (and why partitions are the actual logs)
→ What “append-only” and “immutable” mean at the storage level
→ What happens when a service crashes at event 5 and how offsets recover it
→ How brokers, clusters, and replication keep data safe
→ Why Kafka retains events as a distributed log instead of deleting them after delivery
→ The architectural difference between REST and event streams

If you’re preparing for:
• System design interviews
• Backend engineering roles
• Microservices architecture discussions

You should be able to draw this from memory.

Part 2 → Consumer groups, ordering guarantees, key-based routing.

Save this. You’ll revisit it.

#kafka #systemdesign #backendengineering #microservices #devops softwarearchitecture scalablesystems techreels by @akashcodeofficial
68
5 months ago
Download
EC2, ECS and EKS aren’t alternatives. They answer different engineering questions.

The reel focuses on the decision framework. Here are a few things that didn’t fit into 45 seconds.

• EC2 gives you complete control over your server, but you’re also responsible for managing it.

• ECS isn’t just “Docker on AWS.” Its scheduler automatically places containers on available compute capacity, so you don’t have to decide where every new container should run.

• EKS makes sense when you specifically need Kubernetes and its ecosystem, not simply because your application is larger.

You’ll notice I didn’t include AWS Fargate.

That’s intentional.

Fargate isn’t another orchestrator. It’s a serverless compute engine that can run your ECS tasks or EKS pods without managing EC2 instances. That’s a different decision, so it deserves its own reel.

Engineering Rule:

Choose the service with the least operational complexity that still solves your problem.

Which one would you start with today—EC2, ECS, or EKS?

[ec2, ecs, eks, aws, kubernetes, cloud computing, devops, backend engineering, container orchestration, docker]

#aws #cloudcomputing #devops #systemdesign #backendengineering by @akashcodeofficial
32
17 days ago
Download
MCP is the USB-C of AI tools.

Here’s what’s actually happening when Claude accesses GitHub, Notion, or Jira.

There are 3 parts:

→ MCP Host
The AI app you use. Claude Desktop, Cursor, Windsurf, VS Code.
This is where you type your prompt.
It decides when external data is needed.

→ MCP Client
Lives inside the host.
Handles connection to MCP servers.
One client per tool.

→ MCP Server
Wrapper around the tool.
GitHub, Notion, Jira, Slack, Postgres.
Each exposes actions in a standard JSON-RPC format.

Now the flow:

→ You say “create a Jira ticket”
→ Host routes to Jira client
→ Client calls MCP server
→ Server hits Jira API
→ Ticket created
→ Response comes back

No custom integration needed.

The server already exists.
The host already knows how to use it.

That’s the point.

Before MCP
→ M apps × N tools = M×N integrations

After MCP
→ M + N
→ Build once per tool
→ Works across every AI app

This is why GitHub, Notion, Slack, and Figma are shipping MCP servers.

Build once.
Works everywhere.

If you write backend APIs, you already understand this.

MCP is REST for the AI layer.

Save this. You’ll need it.

I teach backend engineering, system design, and Gen Al in 1:1 sessions
→ For working developers across US, Canada, UK,
Japan, Australia

[keyword backend, keyword systemdesign, keyword mcp, keyword aiarchitecture, keyword apis] by @akashcodeofficial
57
4 months ago
Download
Production RAG is much more than just a Vector Database + an LLM.

This reel explains the core request flow you’ll find in most production RAG systems.

As systems grow, companies improve different stages depending on their requirements.

Query Processing

Before searching, many production systems improve the user’s query by:
• Query Rewriting
• Query Expansion
• Query Routing

The goal is simple: retrieve better information.

Retrieval

Many production systems don’t rely on vector search alone.

They combine:
• Vector Search
• Keyword Search (BM25)
• Metadata Filters

This is commonly known as Hybrid Search.

Re-ranking

Retrieval focuses on finding enough relevant documents.

A Re-ranker then selects the best chunks before they reach the LLM.

Context Building

Before sending context to the LLM, many systems:
• Remove duplicate chunks
• Compress long context
• Keep only the most relevant information

This improves both quality and cost.

Prompt Construction

The LLM never reads your documents directly.

Your application builds a prompt using:
• System Instructions
• Retrieved Context
• User Question

Only then is it sent to the LLM.

Production Enhancements

Depending on the application, companies may also add:
• Guardrails
• Caching
• Response Validation
• Citations
• Observability
• Evaluations (Evals)

Not every production system includes all of these, but they’re common as AI applications mature.

Engineering Rule

Production RAG isn’t about making the LLM smarter.

It’s about building a better retrieval pipeline so the LLM receives the right information before it answers.

🚀 Want to learn AI Engineering, Backend Engineering, System Design, and DevOps with production first ?

DM me “AI” and I’ll share the details.

Production RAG, RAG Architecture, Retrieval Augmented Generation, AI Engineering, AI Infrastructure, LLM, Vector Database, Hybrid Search, Re-ranking, Prompt Engineering, System Design, Backend Engineering

#aiengineering #rag #llm #systemdesign #backendengineering genai by @akashcodeofficial
63
12 days ago
Download
×

Download all media on this page

Photos Videos
back to up