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
How DNS Works
You type a domain name and hit enter, but what actually happens before that webpage loads is more complex than most people realize. DNS is the phonebook of the internet, and every request you make triggers a chain of lookups across multiple servers.
Step 1: Someone types bytebytego.com into their browser and presses enter.
Step 2: Before doing anything, the browser looks for a cached IP address. Operating system cache gets checked too.
Step 3: Cache miss triggers a DNS query. The browser sends a query to the configured DNS resolver, usually provided by your ISP or a service like Google DNS or Cloudflare.
Step 4: Resolver checks its own cache.
Step 5-6: If the resolver doesn't have the answer cached, it asks the root servers, “Where can I find .com?” For bytebytego.com, the root server responds with the address of the .com TLD name server.
Step 7-8: Resolver queries the .com TLD server. TLD server returns the authoritative server address.
Step 9-10: This server has the actual A/AAAA record mapping the domain to an IP address. The resolver finally gets the answer: 172.67.21.11 for bytebytego. com.
Step 11-12: The IP gets cached at the resolver level for future lookups, and returned to the browser.
Step 13-14: The browser stores this for its own future use, and uses the IP to make the actual HTTP request.
Step 15: The web server returns the requested content.
All this happens in milliseconds, before your first page even starts loading.
Over to you: Which DNS tools or commands do you rely on most, dig, nslookup, or something else?
--
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
.
5 hours ago | [YT] | 892
View 5 replies
ByteByteGo
Apache Kafka vs. RabbitMQ
Kafka and RabbitMQ both handle messages, but they solve fundamentally different problems. Understanding the difference matters when designing distributed systems.
Kafka is a distributed log. Producers append messages to partitions. Those messages stick around based on retention policy, not because someone consumed them. Consumers pull messages at their own pace using offsets. You can rewind, replay, reprocess everything. It is designed for high throughput event streaming where multiple consumers need the same data independently.
RabbitMQ is a message broker. Producers publish messages to exchanges. Those exchanges route to queues based on binding keys and patterns (direct, topic, fanout). Messages get pushed to consumers and then deleted once acknowledged. It is built for task distribution and traditional messaging workflows.
The common mistake is using Kafka like a queue or RabbitMQ like an event log. They're different tools built for different use cases.
Over to you: If you had to explain when NOT to use Kafka, what would you say?
--
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,176
View 13 replies
ByteByteGo
The HTTP Mindmap
HTTP has evolved from HTTP/1.1 to HTTP/2, and now HTTP/3, which uses the QUIC protocol over UDP for improved performance. Today, it’s the backbone of almost everything on the internet, from browsers and APIs to streaming, cloud, and AI systems.
At the foundation, we have underlying protocols. TCP/IP for IPv4 and IPv6 traffic. Unix domain sockets for local communication. HTTP/3 running over UDP instead of TCP. These handle the actual data transport before HTTP even comes into play.
Security wraps around everything. HTTPS isn't optional anymore. WebSockets power real-time connections. Web servers manage workloads. CDNs distribute content globally. DNS resolves everything to IPs. Proxies (forward, reverse, and API gateways) route, filter, and secure traffic in between.
Web services exchange data in different formats, REST with JSON, SOAP for enterprise systems, RPC for direct calls, and GraphQL for flexible queries. Crawlers and bots index the web, guided by robots.txt files that set the boundaries.
The network world connects everything. LANs, WANs, and protocols like FTP for file transfers, IMAP/POP3 for email, and BitTorrent for peer-to-peer communication. For observability, packet capture tools like Wireshark, tcpdump, and OpenTelemetry let developers peek under the hood to understand performance, latency, and behavior across the stack.
Over to you: HTTP has been evolving for 30+ years, what do you think the next big shift will be?
--
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] | 2,509
View 20 replies
ByteByteGo
Database Types You Should Know in 2025
There’s no such thing as a one-size-fits-all database anymore. Modern applications rely on multiple database types, from real-time analytics to vector search for AI. Knowing which type to use can make or break your system’s performance.
Relational: Traditional row-and-column databases, great for structured data and transactions.
Columnar: Optimized for analytics, storing data by columns for fast aggregations.
Key-Value: Stores data as simple key–value pairs, enabling fast lookups.
In-memory: Stores data in RAM for ultra-low latency lookups, ideal for caching or session management.
Wide-Column: Handles massive amounts of semi-structured data across distributed nodes.
Time-series: Specialized for metrics, logs, and sensor data with time as a primary dimension.
Immutable Ledger: Ensures tamper-proof, cryptographically verifiable transaction logs.
Graph: Models complex relationships, perfect for social networks and fraud detection
Document: Flexible JSON-like storage, great for modern apps with evolving schemas.
Geospatial: Manages location-aware data such as maps, routes, and spatial queries.
Text-search: Full-text indexing and search with ranking, filters, and analytics.
Blob: Stores unstructured objects like images, videos, and files.
Vector: Powers AI/ML apps by enabling similarity search across embeddings.
Over to you: Which database type do you think will grow fastest in the next 5 years?
--
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] | 2,478
View 39 replies
ByteByteGo
Can a web server provide real-time updates?
An HTTP server cannot automatically initiate a connection to a browser. As a result, the web browser is the initiator. What should we do next to get real-time updates from the HTTP server?
Both the web browser and the HTTP server could be responsible for this task.
🔹Web browsers do the heavy lifting: short polling or long polling. With short polling, the browser will retry until it gets the latest data. With long polling, the HTTP server doesn’t return results until new data has arrived.
🔹HTTP server and web browser cooperate: WebSocket or SSE (server-sent event). In both cases, the HTTP server could directly send the latest data to the browser after the connection is established. The difference is that SSE is uni-directional, so the browser cannot send a new request to the server, while WebSocket is fully-duplex, so the browser can keep sending new requests.
Over to you: of the four solutions (long polling, short polling, SSE, WebSocket), which ones are commonly used, and for what use cases?
--
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
.
5 days ago | [YT] | 1,587
View 9 replies
ByteByteGo
Top 20 System Design Concepts You Should Know
1. Load Balancing: Distributes traffic across multiple servers for reliability and availability.
2. Caching: Stores frequently accessed data in memory for faster access.
3. Database Sharding: Splits databases to handle large-scale data growth.
4. Replication: Copies data across replicas for availability and fault tolerance.
5. CAP Theorem: Trade-off between consistency, availability, and partition tolerance.
6. Consistent Hashing: Distributes load evenly in dynamic server environments.
7. Message Queues: Decouples services using asynchronous event-driven architecture.
8. Rate Limiting: Controls request frequency to prevent system overload.
9. API Gateway: Centralized entry point for routing API requests.
10. Microservices: Breaks systems into independent, loosely coupled services.
11. Service Discovery: Locates services dynamically in distributed systems.
12. CDN: Delivers content from edge servers for speed.
13. Database Indexing: Speeds up queries by indexing important fields.
14. Data Partitioning: Divides data across nodes for scalability and performance.
15. Eventual Consistency: Guarantees consistency over time in distributed databases
16. WebSockets: Enables bi-directional communication for live updates.
17. Scalability: Increases capacity by upgrading or adding machines.
18. Fault Tolerance: Ensures system availability during hardware/software failures.
19. Monitoring: Tracks metrics and logs to understand system health.
20. Authentication & Authorization: Controls user access and verifies identity securely.
Over to you: Which other System Design concept 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
.
6 days ago | [YT] | 2,443
View 10 replies
ByteByteGo
What is a REST API?
REST (Representational State Transfer) is an architectural style for building APIs that use HTTP for communication. To be considered RESTful, an API should follow six key constraints:
- Client-Server: Separates the user interface from data storage and processing. This allows each side to evolve independently.
- Stateless: Each request contains all the information needed to process it; the server does not store session state between requests.
- Uniform Interface: Consistent resource naming and formats across the API, e.g., “/products”, “/users”.
- Cacheable: Responses explicitly indicate if they can be cached (e.g., Cache-Control) to improve performance.
- Layered System: Requests may pass through multiple layers (load balancers, auth services, etc.) before reaching the API server, but to the client it appears as a single endpoint.
- Code on Demand (Optional): The server can send executable code (like JavaScript) to the client to extend its functionality.
Over to you: Which REST constraint do you think is most often overlooked in real-world APIs?
--
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,283
View 6 replies
ByteByteGo
Virtualization Explained: From Bare Metal to Hosted Hypervisors
Before containers and serverless, there was virtualization, the foundation of modern cloud computing. Here’s a simple breakdown of how virtualization works, from bare metal to hosted hypervisors:
- Type 1 / Bare Metal Hypervisor: The hypervisor runs directly on hardware. No operating system underneath it. The hypervisor is the operating system layer. VMware ESXi, Microsoft Hyper-V, and KVM are all Type 1 hypervisors. They boot up on physical servers and manage VMs with direct hardware access.
Each VM gets its own full operating system. Windows, Fedora, Ubuntu. Complete isolation between VMs. One crashes? The others keep running.
This is what runs in data centers and cloud providers. When you spin up an EC2 instance on AWS, it's running on Type 1 virtualization (they use their custom Nitro hypervisor now, but same concept).
Type 2 / Hosted Hypervisor: The hypervisor runs as an application on top of a host operating system. You're running Windows or macOS, then you install VirtualBox or VMware Workstation on top of it.
Guest VMs still get full operating systems, but now there's an extra layer. Your VM talks to the hypervisor, which talks to the host OS, which talks to the hardware.
More overhead, slightly lower performance, but way more convenient for development and testing. This is what you use on your laptop. Running a Linux VM on your MacBook? That's Type 2.
Over to you: What's your go-to hypervisor for local development?
1 week ago | [YT] | 1,267
View 5 replies
ByteByteGo
How Java HashMaps Work?
A HashMap is a data structure that stores key-value pairs, allowing fast lookup, insertion, and deletion. It uses a hash function to map each key to a bucket index, making access efficient.
Here’s how it works:
1. Keys are given to a HashMap
2. A hash function converts each key into a number that points to a bucket index that points to the data value.
3. When two keys map to the same bucket index, a collision occurs.
4. Collisions are handled by linking entries together in a chain within the same bucket. This is done using a linked list or even trees in some cases.
5. Finally, values are retrieved quickly by hashing the key and looking up the correct bucket.
Over to you: What else will you add to better understand the working of Hash Maps?
--
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,467
View 10 replies
ByteByteGo
Last Call: All in One Interview Prep Black Friday Sale
Yearly Black Friday sale is now live! Use code BF2025 at checkout to get 30% off the all-in-one interview prep online courses.
To take advantage of this limited time offer, subscribe before 11:59 pm PST on Monday, December 1.
Get it here: bytebytego.com/
.
1 week ago | [YT] | 731
View 0 replies
Load more