MàhmûD retweeted
System Design Series - Day 10/30
Your database will become the bottleneck.
Not your API.
Not your cache.
Your database.
At 1K users everything works fine.
At 10K users queries slow down and CPU hits 80%.
At 50K users the database crashes, your app goes down, and users leave.
The solution is Database Replication.
How it works:
- 1 Primary (Master) handles all writes
- Multiple Replicas (Read Slaves) handle all reads
Most applications are 90% reads and 10% writes.
Real Production Impact (E-commerce App):
Before (Single DB):
- Max capacity: 2,500 req/sec
- Read latency: 300ms
- CPU: 85%
- Cost: $800/month
After (1 Primary + 3 Replicas):
- Total capacity: 12,000 req/sec
- Read latency: 45ms (6.6x faster)
- Primary CPU: 25%
- Cost: $600/month
The magic is that reads scale horizontally.
Just add more replicas.
Trade-offs:
- 5-10x better read performance
- High availability (promote replica if primary fails)
- Replication lag (100-500ms)
- Slightly more complex application code
Bottom line:
If your database CPU is consistently above 50%,
it is time to think about replication.
What is your current database CPU usage?
Drop it below 👇
MàhmûD retweeted
If you're serious about API design, then learn these 20 concepts:
1 Endpoint
2 HTTP Methods
3 Request-Response
4 Status Codes
5 Authentication
6 Authorization
7 Access Tokens
8 OAuth 2,0
9 Rate Limiting
10 Throttling
11 Pagination
12 Caching
13 Idempotency
14 Webhooks
15 API Versioning
16 OpenAPI
17 REST vs GraphQL
18 API Gateway
19 Microservices
20 Error Handling
API is a set of rules that allows different services to communicate with each other.
What else should make this list?
MàhmûD retweeted
The best tech stack for backend engineering in 2026:
1 Programming Languages
> JavaScript
> Python
> Go
> Java
> Rust
2 Frameworks
> NodeJS
> FastAPI
> Spring Boot
> Django
> ASP NET
3 Databases
> PostgreSQL
> MySQL
> MongoDB
> Redis
> DynamoDB
4 Cloud & Deployment
> AWS
> Docker
> Kubernetes
> GCP
> Azure
5 CI/CD & Version Control
> GitHub
> GitHub Actions
> GitLab
> Jenkins
> CircleCI
Remember, you don’t need the entire stack.
Just pick one tool from each layer and build.
What else would you add?
===
1. Save this & RT to help others get started with backend engineering.
2. Follow @systemdesignone + turn on notifications.
MàhmûD retweeted
13 database types explained in one sentence:
𝟭) 𝗥𝗲𝗹𝗮𝘁𝗶𝗼𝗻𝗮𝗹
↳ Stores structured data in tables with predefined schemas and SQL queries.
𝟮) 𝗞𝗲𝘆-𝗩𝗮𝗹𝘂𝗲
↳ Stores simple key-value pairs for ultra-fast lookups and caching.
𝟯) 𝗖𝗼𝗹𝘂𝗺𝗻𝗮𝗿
↳ Stores data by columns instead of rows to optimize analytical queries.
PS: Get our free 142-page System Design Handbook when you join our free weekly newsletter. Join 32,000+ engineers → lucode.co/system-design-hand…
𝟰) 𝗪𝗶𝗱𝗲-𝗖𝗼𝗹𝘂𝗺𝗻
↳ Stores data in flexible column families for large-scale distributed workloads.
𝟱) 𝗗𝗼𝗰𝘂𝗺𝗲𝗻𝘁
↳ Stores data as JSON-like documents with flexible, nested structures.
6) 𝗩𝗲𝗰𝘁𝗼𝗿
↳ Stores embeddings to enable similarity search & AI-powered retrieval.
7) 𝗧𝗶𝗺𝗲-𝗦𝗲𝗿𝗶𝗲𝘀
↳ Stores time-stamped data for metrics, logs, & event tracking.
8) 𝗜𝗺𝗺𝘂𝘁𝗮𝗯𝗹𝗲 𝗟𝗲𝗱𝗴𝗲𝗿
↳ Stores tamper-proof records where data cannot be modified or deleted.
9) 𝗚𝗿𝗮𝗽𝗵
↳ Stores relationships between entities to query connected data efficiently.
10) 𝗚𝗲𝗼𝘀𝗽𝗮𝘁𝗶𝗮𝗹
↳ Stores location-based data for geographic queries and mapping.
11) 𝗜𝗻-𝗠𝗲𝗺𝗼𝗿𝘆
↳ Stores data in RAM for extremely fast, low-latency access.
12) 𝗕𝗹𝗼𝗯
↳ Stores large unstructured data like images, videos, and files.
13) 𝗧𝗲𝘅𝘁-𝗦𝗲𝗮𝗿𝗰𝗵
↳ Indexes and retrieves text efficiently using full-text search.
Which database type is your favorite lately?
——
👋 PS: Get our free 142-page System Design Handbook when you join our free weekly newsletter.
Join 32,000+ engineers → lucode.co/system-design-hand…
——
♻️ Repost to help others learn databases.
➕ Follow me ( @NikkiSiapno ) to become good at system design.
MàhmûD retweeted
Many Cloud Engineers don’t fully understand AWS Data Transfer costs, their complications, and implications.
Here, I’ve made this to help you better understand.
55K+ read my DevOps and Cloud newsletter: techopsexamples.com/subscrib…
Sign up to get 'The Practical Linux Guide for DevOps Engineers'
What do we cover:
DevOps, Cloud, Kubernetes, IaC, GitOps, MLOps
🔁 Consider a Repost if this is helpful
MàhmûD retweeted
Claude vs. Claude Code vs. Cowork.
If you've been confused about which one to use and when, this post will clear that up in under two minutes.
Anthropic now offers three distinct ways to interact with Claude, and each one targets a fundamentally different workflow. Think of it as: Chat for thinking, Code for building, and Cowork for doing.
Here's a quick breakdown:
1️⃣ Claude Chat
This is the conversational AI assistant most people already know. You type a prompt, Claude responds, and you iterate together.
- Turn rough ideas into structured plans through conversation
- Write emails, reports, essays, and long-form content
- Research and summarize complex topics in minutes
- Analyze documents, PDFs, and images
- Build interactive prototypes through Artifacts
The key here is that everything happens through conversation. You're thinking with Claude, not delegating work to it.
It's available on every device, has a free tier, and supports persistent memory across sessions.
The tradeoff is that it has no direct access to your local files (upload only), and it can't generate raster images natively.
2️⃣ Claude Code
This is a terminal-native coding agent. You describe what you want in plain English, and Claude reads your codebase, writes code, runs tests, fixes errors, and ships the result.
- Build and debug entire features across the full codebase
- Write, run, and fix tests automatically
- Manage git workflows and create pull requests
- Spawn multiple parallel agents working on different parts of a task simultaneously
It handles the full development cycle end to end, from planning to execution to testing. With the CLAUDE(.)md configuration file, you can teach it your project's conventions, patterns, and constraints so it writes code the way your team expects.
The tradeoff is a steeper learning curve compared to Chat, and token costs can add up during heavy sessions.
3️⃣ Claude Cowork
This is the newest addition. Anthropic describes it as Claude Code for the rest of your work.
It's an agentic desktop assistant that automates file management and repetitive tasks through a GUI. You describe an outcome, and Claude plans, executes, and delivers finished work: formatted documents, organized file systems, spreadsheets with working formulas, and synthesized research.
- Direct local file access and editing (no upload/download cycle)
- Schedule recurring tasks automatically
- Assign tasks remotely via Dispatch from your phone
- Computer Use lets Claude control your screen directly
It runs inside a sandboxed virtual machine on your computer, so Claude can only access folders you explicitly grant. You don't need to know how to code to use it.
The tradeoff is that your computer must stay awake for tasks to run, and it's still in research preview.
Here's how to think about choosing between them:
→ If you need to think through a problem or get writing/research help, use Chat
→ If you're building software and want an autonomous coding partner, use Code
→ If you have a clearly defined deliverable that involves local files and desktop workflows, use Cowork
All three are included in the same subscription starting at $20/month, which makes it one of the highest-leverage subscriptions in productivity software right now.
I've put together a visual below that maps the workflow of each product side by side.
If you want to go deeper into Claude Code specifically, I wrote a detailed article covering the anatomy of the .claude/ folder, a complete guide to CLAUDE(.)md, custom commands, skills, agents, and permissions, and how to set them all up properly. Link in the next tweet.
MàhmûD retweeted
Everyone wants to be an ML engineer after scrolling Twitter.
But computer science doesn’t start there.
It starts with mathematical aptitude.
Linear algebra to understand representations
Probability to reason about uncertainty
Optimization to see how models actually learn
Without it, you’re just calling APIs.
With it, you understand what’s happening underneath.
That’s the difference between using tools
and actually understanding computer science.
At @icamp, the focus is on building that foundational
logical reasoning and real problem-solving.
CI/CD Pipeline with GitHub Actions:
Step 1 → Trigger: Pushing code changes to GitHub automatically initiates the workflow.
Step 2 → Build: Runners compile the code and install all necessary dependencies.
Step 3 → Test: Automated suites run unit and integration tests to verify stability.
Step 4 → Package: The app is containerized as a Docker image and sent to a registry.
Step 5 → Deploy: Kubernetes handles the rollout using Helm or kubectl for updates.
Step 6 → Observe: System health is monitored with Grafana while alerts go to Slack.
MàhmûD retweeted
Reverse proxy
it is important to make sure everything keeps on running securely and smoothly it helps in a the server that exists between your visitors and your real web server. Rather than accessing the backend directly users access it through this middle stage. It's similar to an intelligent traffic controller for your web traffic requests where they need to go and blocking danger.
So image like there is a big cat play zone with many rooms where cats live and plays
Visitors cat come to see zone inside there are many cat rooms [ servers ] at the entrance there is one smart cat receptionist who say where is the playzone and sleeping zone
why is a reverse proxy important
a reverse proxy is used to provide load balancing services to deliver smoother web experiences and increasingly to enforce web app security at strategic insertion points in a network through web apps firewalls and application delivery firewalls and
when combined with cloud deployments a reverse proxy can enable cloud bursting and splitapplication architectures that offer the economic benefits of cloud without compromising controland security.
how does a reverse proxy works
a reverse proxy may act either as a simple forwarding service or actively participate in the exchange between client and server. When the proxy treats the client and server as separate entities by implementing dual network stacks knows as or it is called a full proxy. a full proxy creates a TCP client connection along with a separate TCP server connection with a little gap in the middle. The client connects to the proxy on one end and the proxy establishes a separate, independent connection to the server. This is bidirectional on both sides. There is never any blending of connections from the client side to the server side since the connections are independent.
so forward proxy hides users from the internet and reverse proxy hides servers from users
Common reverse proxy tools as follows
Nginx , HAProxy , Cloud flare, And AWS Elastic Load Balancer
MàhmûD retweeted
AI Agent Stack
If you’re building modern AI applications,
learn these concepts (resources included):
I’ve been using MongoDB’s AI Learning Hub to sharpen how I think about AI systems.
It stands out for covering both concepts and real implementation.
1. AI Stack
↳ lucode.co/ai-stack-z7xd
2. Vector Search
↳ lucode.co/vector-search-z7xd
3. AI Data Strategy
↳ lucode.co/at-data-strategy-z…
4. Data Ingestion for RAG Applications
↳ lucode.co/data-ingestion-for…
5. Evaluating RAG Application Results
↳ lucode.co/evaluating-rag-res…
6. Going from RAG to Agentic Systems
↳ lucode.co/rag-to-agentic-sys…
7. Introduction to AI Agents
↳ lucode.co/ai-agents-intro-z7…
8. Introduction to Agent Memory
↳ lucode.co/agent-memory-z7xd
9. Why Multi-Agent Systems Need Memory Engineering
↳ lucode.co/memory-engineering…
Which concepts do you think don't get enough focus?
——
♻️ Repost to help others learn AI.
🙏 Thanks to @MongoDB for sponsoring this post.
MàhmûD retweeted
Edtech isn’t a bubble.
It boils down to what people gain: skills + community
held together by the story.
Where do you fit?
What are you becoming?
That’s why brands like Harvard or Apple work.
Where people see themselves in the narrative.
Most computer science programs give you content.
Some give you community.
@icamp is built on a different story:
You don’t just become an engineer.
You learn to think in systems.
Personalized across the globe,
regardless of your background.
MàhmûD retweeted
How Kafka works
(clearly explained in under 2 mins):
First, did you hear about the Aiven Free Tier Competition? They're providing prize money for the best project built using their free tiers (including Kafka, Postgres, and more).
If you’ve been meaning to get hands-on with Kafka, this is a great way to do it.
Check it out → lucode.co/aiven-free-tier-co…
At its core, Kafka is a distributed commit log.
It stores streams of events in append-only logs that multiple systems can read from independently.
Here’s a simple mental model to understand it:
𝟭) 𝗣𝗿𝗼𝗱𝘂𝗰𝗲𝗿𝘀 𝘄𝗿𝗶𝘁𝗲 𝗲𝘃𝗲𝗻𝘁𝘀
↳ Applications publish events like order_created to a topic
𝟮) 𝗧𝗼𝗽𝗶𝗰𝘀 𝗮𝗿𝗲 𝘀𝗽𝗹𝗶𝘁 𝗶𝗻𝘁𝗼 𝗽𝗮𝗿𝘁𝗶𝘁𝗶𝗼𝗻𝘀
↳ Each partition is an ordered, append-only log
↳ Events are stored with sequential offsets
𝟯) 𝗕𝗿𝗼𝗸𝗲𝗿𝘀 𝘀𝘁𝗼𝗿𝗲 𝘁𝗵𝗲 𝗱𝗮𝘁𝗮
↳ Kafka runs as a cluster of servers (brokers)
↳ Partitions are distributed across them for scalability
𝟰) 𝗖𝗼𝗻𝘀𝘂𝗺𝗲𝗿𝘀 𝗿𝗲𝗮𝗱 𝘁𝗵𝗲 𝘀𝘁𝗿𝗲𝗮𝗺
↳ Services subscribe to topics and read events sequentially
↳ Consumer groups allow parallel processing at scale
Two important design ideas make Kafka powerful:
Decoupling → producers and consumers never talk directly
Durability → events are stored on disk and replicated across brokers
That’s why Kafka is often used as the event backbone for microservices, analytics pipelines, and real-time systems.
What else would you add?
——
♻️ Repost to help engineers learn Kafka.
🙏 Thanks to @aiven_io for sponsoring this post.
➕ Follow me ( Nikki Siapno ) to improve at system design.
MàhmûD retweeted
A professor looked at us and said:
“Written exams are the number one way to know someone understands something.”
The thing is We have seen people ace exams
and still struggle to build anything substantial.
In computer science, knowing doesn’t equal doing.
You may recall syntax But get stuck when systems break Pass tests.
But can’t resolve stubborn issues
That’s still an existing gap.
At @icamp, learners are pushed to:
> Build under constraints
> Resolve issues without step-by-step help
> Explain decisions, not just outputs
In the AI era, the model will provide the answer,
you need to understand why it works.
MàhmûD retweeted
DOCKER ROADMAP
SOFT SKILLS
Communication Skills → Clearly explain containerized systems and workflows
Problem-Solving Skills → Debug container issues and deployment failures
Critical Thinking → Choose the right containerization strategies
Collaboration & Teamwork → Work with DevOps and development teams
Adaptability → Keep up with evolving container technologies
LINUX BASICS
Command Line (CLI) → Navigate and manage systems efficiently
Filesystem → Understand directories, paths, and file structures
Permissions → Manage user roles and access control
Bash Scripting → Automate repetitive tasks
Process Management → Monitor and control running processes
DOCKER CORE CONCEPTS
What is Docker → Containerization platform for packaging applications
Docker Engine → Core runtime that builds and runs containers
Images → Blueprints for creating containers
Containers → Lightweight, isolated environments for apps
Dockerfile → Script to define how images are built
Volumes → Persistent data storage for containers
Networks → Communication between containers
Docker CLI → Command-line interface for managing Docker
WORKING WITH IMAGES & CONTAINERS
Pull Images → Download from Docker Hub
Build Images → Create custom images using Dockerfile
Run Containers → Start applications in isolated environments
Stop & Remove Containers → Manage lifecycle
Tagging Images → Version control for images
Push Images → Upload to registries (Docker Hub, private registry)
ADVANCED DOCKER
Multi-Stage Builds → Optimize image size and performance
Docker Compose → Define and run multi-container applications
Docker Swarm → Native clustering and orchestration
Container Scaling → Handle high traffic and load
Health Checks → Monitor container health
Logging & Monitoring → Track container performance
DOCKER ECOSYSTEM
Docker Hub → Public image registry
Docker Desktop → GUI tool for managing containers
Private Registries → Secure internal image storage
Portainer → Container management UI
Kubernetes → Advanced orchestration system
CI/CD Integration → Automate build and deployment pipelines
NETWORKING IN DOCKER
Bridge Network → Default container communication
Host Network → Direct access to host networking
Overlay Network → Multi-host communication (Swarm/Kubernetes)
Port Mapping → Expose container services externally
Service Discovery → Enable containers to find each other
STORAGE & VOLUMES
Volumes → Persistent storage managed by Docker
Bind Mounts → Map host files to containers
tmpfs Mounts → Temporary storage in memory
Data Backup → Secure container data
Data Sharing → Share data across containers
SECURITY BEST PRACTICES
Image Security → Use trusted and minimal base images
Secrets Management → Secure sensitive data
User Permissions → Avoid running containers as root
Vulnerability Scanning → Detect security risks
Secure Networking → Restrict unnecessary ports
DEVOPS & REAL-WORLD USAGE
Microservices Architecture → Break apps into smaller services
CI/CD Pipelines → Automate testing and deployment
Cloud Deployment → AWS, Azure, GCP container services
Infrastructure as Code → Manage environments programmatically
Monitoring Tools → Prometheus, Grafana
OTHER IMPORTANT CONCEPTS
Container Orchestration → Kubernetes, Docker Swarm
Load Balancing → Distribute traffic efficiently
API Integration → Connect services and containers
Scalability → Handle growing workloads
High Availability → Ensure system reliability
QUICK TIP:
Learn Linux Basics → Understand system fundamentals
Master Docker Core → Images, containers, Dockerfile
Practice Projects → Build and deploy real apps
Learn Docker Compose → Multi-container setups
Explore Kubernetes → Advanced orchestration
Deploy to Cloud → Production-ready systems
Grab the DOCKER EBOOK:
codewithdhanian.gumroad.com/…
🤖 Made with AI
MàhmûD retweeted
Computer Networking Fundamentals (free course)
A heavily illustrated introduction to the first two layers of Computer Networking - Ethernet and IP - that will help you build a solid base before moving on to higher-level protocols like TCP or UDP.
labs.iximiuz.com/courses/com…


































