Covering topics and trends in large-scale system design, from the authors of the best-selling System Design Interview book series. This channel is managed by Alex Xu and Sahn Lam.

To master system design, get our 158-page System Design PDF for free by subscribing to our weekly newsletter (10-min read): bit.ly/3tfAlYD

Take our system design online course: bit.ly/3mlDSk9


ByteByteGo

Design Patterns Cheat Sheet

The cheat sheet briefly explains each pattern and how to use it.

What's included?
- Factory
- Builder
- Prototype
- Singleton
- Chain of Responsibility
- And many more!

--
We just launched the all-in-one tech interview prep platform, covering coding, system design, OOD, and machine learning.

Launch sale: 50% off. Check it out: bit.ly/bbg-li-posts

#systemdesign #coding #interviewtips
.

8 hours ago | [YT] | 976

ByteByteGo

CI/CD Simplified Visual Guide

Whether you're a developer, a DevOps specialist, a tester, or involved in any modern IT role, CI/CD pipelines have become an integral part of the software development process.

Continuous Integration (CI) is a practice where code changes are frequently combined into a shared repository. This process includes automatic checks to ensure the new code works well with the existing code.

Continuous Deployment (CD) takes care of automatically putting these code changes into real-world use. It makes sure that the process of moving new code to production is smooth and reliable.

This visual guide is designed to help you grasp and enhance your methods for creating and delivering software more effectively.

Over to you: Which tools or strategies do you find most effective in implementing CI/CD in your projects?

--
We just launched the all-in-one tech interview prep platform, covering coding, system design, OOD, and machine learning.

Launch sale: 50% off. Check it out: bit.ly/bbg-yt

#systemdesign #coding #interviewtips
.

2 days ago | [YT] | 2,652

ByteByteGo

Kubernetes Explained

Kubernetes is the de facto standard for container orchestration. It automates the deployment, scaling, and management of containerized applications.

Control Plane:
- API Server: Acts as the communication hub between users, the control plane, and worker nodes.
- Scheduler: Decides which Pod runs on which Node.
- Controller Manager: Keeps the cluster state in sync.
- etcd: A distributed key-value store that holds the cluster’s state.

Worker Nodes:
- Pods: The smallest deployable unit in Kubernetes, representing one or more containers.
- Container Runtime: The engine (like Docker or containerd) that runs the containers.
- kubelet: Ensures containers are running as defined in Pods.
- kube-proxy: Handles networking between Pods and ensures communication.

Over to you: What’s the toughest part of running Kubernetes in production?

--
We just launched the all-in-one tech interview prep platform, covering coding, system design, OOD, and machine learning.

Launch sale: 50% off. Check it out: bit.ly/bbg-yt

#systemdesign #coding #interviewtips
.

3 days ago | [YT] | 1,683

ByteByteGo

N8N versus LangGraph

N8N is an open-source automation tool that lets you visually build workflows by connecting different services, APIs, and AI tools in a sequence. Here’s how it works:

1. Starts with Input from the user.
2. Passes it to an AI Agent for processing.
3. The AI Agent can either make a Tool Call or access Memory.
4. A Decision node chooses the next action and produces the final LLM output for the user.

LangGraph is a Python framework for building AI Agent workflows using a flexible graph structure that supports branching, looping, and multi-agent collaboration. Here’s how it works:

1. Starts with a shared State containing workflow context.
2. Can route tasks to different agents.
3. Agents interact with a Tool Node to perform tasks.
4. A Conditional node decides whether to retry or mark the process done.

Over to you: Have you used N8N or LangGraph?

--
We just launched the all-in-one tech interview prep platform, covering coding, system design, OOD, and machine learning.

Launch sale: 50% off. Check it out: bit.ly/bbg-yt

#systemdesign #coding #interviewtips
.

4 days ago | [YT] | 1,818

ByteByteGo

Data is cached everywhere, from the front end to the back end!

This diagram illustrates where we cache data in a typical architecture.

There are 𝐦𝐮𝐥𝐭𝐢𝐩𝐥𝐞 𝐥𝐚𝐲𝐞𝐫𝐬 along the flow.

1. Client apps: HTTP responses can be cached by the browser. We request data over HTTP for the first time, and it is returned with an expiry policy in the HTTP header; we request data again, and the client app tries to retrieve the data from the browser cache first.

2. CDN: CDN caches static web resources. The clients can retrieve data from a CDN node nearby.

3. Load Balancer: The load Balancer can cache resources as well.

4. Messaging infra: Message brokers store messages on disk first, and then consumers retrieve them at their own pace. Depending on the retention policy, the data is cached in Kafka clusters for a period of time.

5. Services: There are multiple layers of cache in a service. If the data is not cached in the CPU cache, the service will try to retrieve the data from memory. Sometimes the service has a second-level cache to store data on disk.

6. Distributed Cache: Distributed cache like Redis hold key-value pairs for multiple services in memory. It provides much better read/write performance than the database.

7. Full-text Search: we sometimes need to use full-text searches like Elastic Search for document search or log search. A copy of data is indexed in the search engine as well.

8. Database: Even in the database, we have different levels of caches:
- WAL(Write-ahead Log): data is written to WAL first before building the B tree index
- Bufferpool: A memory area allocated to cache query results
- Materialized View: Pre-compute query results and store them in the database tables for better query performance
- Transaction log: record all the transactions and database updates
- Replication Log: used to record the replication state in a database cluster

Over to you: With the data cached at so many levels, how can we guarantee the 𝐬𝐞𝐧𝐬𝐢𝐭𝐢𝐯𝐞 𝐮𝐬𝐞𝐫 𝐝𝐚𝐭𝐚 is completely erased from the systems?

--
We just launched the all-in-one tech interview prep platform, covering coding, system design, OOD, and machine learning.

Launch sale: 50% off. Check it out: bit.ly/bbg-yt

#systemdesign #coding #interviewtips
.

6 days ago | [YT] | 1,776

ByteByteGo

How does Git Work?

The diagram below shows the Git workflow.

Git is a distributed version control system.

Every developer maintains a local copy of the main repository and edits and commits to the local copy.

The commit is very fast because the operation doesn’t interact with the remote repository.

If the remote repository crashes, the files can be recovered from the local repositories.

Over to you: Which Git command do you use to resolve conflicting changes?

--
We just launched the all-in-one tech interview prep platform, covering coding, system design, OOD, and machine learning.

Launch sale: 50% off. Check it out: bit.ly/bbg-yt

#systemdesign #coding #interviewtips
.

1 week ago | [YT] | 1,749

ByteByteGo

How can Redis be used?

There is more to Redis than just caching.

Redis can be used in a variety of scenarios as shown in the diagram.

🔹Session
We can use Redis to share user session data among different services.

🔹Cache
We can use Redis to cache objects or pages, especially for hotspot data.

🔹Distributed lock
We can use a Redis string to acquire locks among distributed services.

🔹Counter
We can count how many likes or how many reads for articles.

🔹Rate limiter
We can apply a rate limiter for certain user IPs.

🔹Global ID generator
We can use Redis Int for global ID.

🔹Shopping cart
We can use Redis Hash to represent key-value pairs in a shopping cart.

🔹Calculate user retention
We can use Bitmap to represent the user login daily and calculate user retention.

🔹Message queue
We can use List for a message queue.

🔹Ranking
We can use ZSet to sort the articles.

--
We just launched the all-in-one tech interview prep platform, covering coding, system design, OOD, and machine learning.

Launch sale: 50% off. Check it out: bit.ly/bbg-yt

#systemdesign #coding #interviewtips
.

1 week ago | [YT] | 1,591

ByteByteGo

Algorithms you should know before taking System Design Interviews

What are some of the algorithms you should know before taking system design interviews?

I put together a list and explained why they are important. Those algorithms are not only useful for interviews but good to understand for any software engineer.

One thing to keep in mind is that understanding “how those algorithms are used in real-world systems” is generally more important than the implementation details in a system design interview.

What do the stars mean in the diagram?
It’s very difficult to rank algorithms by importance objectively. I’m open to suggestions and making adjustments.

Five-star: Very important. Try to understand how it works and why.

Three-star: Important to some extent. You may not need to know the implementation details.

One-star: Advanced. Good to know for senior candidates.

Over to you: did I miss anything important on the list? Which ones do you know and which you don’t?

--
We just launched the all-in-one tech interview prep platform, covering coding, system design, OOD, and machine learning.

Launch sale: 50% off. Check it out: bit.ly/bbg-yt

#systemdesign #coding #interviewtips
.

1 week ago | [YT] | 1,972

ByteByteGo

The Open Source RAG Stack

1 - Frontend Frameworks: Used to build frontend interfaces for the RAG apps. Some tools that can help are NextJS, VueJS, SvelteKit, and Streamlit.
2 - LLM Frameworks: High-level orchestration of LLM pipelines, prompts, and chains. This includes tools such as LangChain, LlamaIndex, Haystack, HuggingFace, and Semantic Kernel.
3 - LLMs: Generates final responses using large language models. Some open-source options include Llama, Mistral, Gemma, Phi-2, DeepSeek, Qwen, etc.
4 - Retrieval and Ranking: Retrieves relevant chunks and ranks them based on relevance. Tools like Meta FAISS, Haystack Retrievers, Weaviate Hybrid Search, ElasticSearch kNN, and JinaAI Rerankers can help.
5 - Vector Database: Stores and enables similarity search over vector embeddings. Common options include Weaviate, Milvus, Postgres pgVector, Chroma, and Pinecone.
6 - Embedding Mode: Converts text/data into vector representations using ML. Some open-source tools include HuggingFace Transformers, LLMWare, Nomic, Sentence Transformers, JinaAI, and Cognita.
7 - Ingest/Data Processing: Extracts, cleanses, and prepares raw data for indexing and retrieval. Tools like Kubeflow, Apache Airflow, Apache NiFi, LangChain Document Loads, Haystack Pipelines, and OpenSearch can help.

Over to you: Which other open-source tool will you add to the list?

--
We just launched the all-in-one tech interview prep platform, covering coding, system design, OOD, and machine learning.

Launch sale: 50% off. Check it out: bit.ly/bbg-yt

#systemdesign #coding #interviewtips
.

1 week ago | [YT] | 1,905

ByteByteGo

The Lifecycle of a Kubernetes Pod

1. The Pod manifest is submitted to the API server and stored in etcd.
2. The scheduler selects a node for the Pod based on resources, affinity rules, and binds the Pod to that node.
3. The kubelet prepares the Pod by creating its network namespace, assigning an IP, mounting volumes, and pulling images if needed.
4. Containers move from Waiting to Running, with kubelet monitoring health probes for liveness and readiness.
5. Kubernetes tracks the Pod’s high-level phase from Pending to Running to Succeeded/Failed/Unknown.
6. Upon termination, Kubernetes sends SIGTERM (and SIGKILL if needed) for the individual containers in the Pod.
7. After termination, the resources are cleaned up, and the Pod details are removed from etcd.

Over to you: What else will you add to understand the Kubernetes Pod Lifecycle?

--
We just launched the all-in-one tech interview prep platform, covering coding, system design, OOD, and machine learning.

Launch sale: 50% off. Check it out: bit.ly/bbg-yt

#systemdesign #coding #interviewtips
.

1 week ago | [YT] | 2,004