sahnlam Profile Banner
Sahn Lam Profile
Sahn Lam

@sahnlam

Followers
39K
Following
328
Media
515
Statuses
1K

Coauthor of the Bestselling 'System Design Interview' Series | Cofounder at ByteByteGo | YouTube: https://t.co/IphBm2DLnZ

Join 1,000,000 developers โ†’
Joined February 2009
Don't wanna be here? Send us removal request.
@sahnlam
Sahn Lam
4 months
Data Structures in Everyday Tech
Tweet media one
9
708
5K
@sahnlam
Sahn Lam
1 year
How Discord Stores Trillions of Messages. In 2015, Discord started using MongoDB to store messages. By November 2015, there were already 100 million messages that did not fit in RAM, causing unpredictable latency. In 2017, Discord moved to storing billions of messages in a
Tweet media one
32
656
4K
@sahnlam
Sahn Lam
2 years
Stack Overflow is a multi-tenant monolithic application serving 2 billion monthly page views across 200 sites. Here are some amazing stats:
Tweet media one
73
811
4K
@sahnlam
Sahn Lam
2 months
Data Structures in Everyday Tech
Tweet media one
3
521
4K
@sahnlam
Sahn Lam
3 months
Understanding the Linux File System Layout
Tweet media one
17
526
4K
@sahnlam
Sahn Lam
4 months
SSH Under the Hood
Tweet media one
11
468
3K
@sahnlam
Sahn Lam
2 months
How Credit Cards like VISA Work
Tweet media one
18
325
3K
@sahnlam
Sahn Lam
2 years
1. Session, Cookie, JWT, Token, SSO, and OAuth 2.0 - here's what you need to know. These terms are essential for identifying, authenticating, and authorizing users online. Let's dive in๐Ÿ‘‡
Tweet media one
43
625
2K
@sahnlam
Sahn Lam
1 year
Understanding OAuth. OAuth is an open standard that allows users to grant limited access to their data on one site to other sites or applications without exposing their passwords. It has become the backbone of secure authorization across the web and mobile apps. The OAuth
Tweet media one
9
508
2K
@sahnlam
Sahn Lam
20 days
Understanding the Linux File System Layout
Tweet media one
13
400
2K
@sahnlam
Sahn Lam
2 months
SSH Under the Hood
Tweet media one
7
349
2K
@sahnlam
Sahn Lam
2 years
During a major cricket tournament, Disney+ Hotstar captured 5 billion emojis to distill the mood of the 50 million-strong streaming audience in real-time. Curious how they did it? They revealed the design in an engineering blog post [1]. Let's dive in!
Tweet media one
26
427
2K
@sahnlam
Sahn Lam
1 year
I've used Redis in production for almost a decade. It's reliable and easy to use (if used correctly). Here are my top 5 use cases where it shines:. 1. Caching. The most common use case is to utilize Redis for caching. This helps protect the database layer from overloading. Redis
Tweet media one
24
417
2K
@sahnlam
Sahn Lam
2 months
Big O Notation Overview
Tweet media one
6
373
2K
@sahnlam
Sahn Lam
4 months
Netflix Tech Stack
Tweet media one
18
290
2K
@sahnlam
Sahn Lam
2 months
What is CI/CD
Tweet media one
11
325
2K
@sahnlam
Sahn Lam
1 month
Data Structures in Everyday Tech
Tweet media one
8
301
2K
@sahnlam
Sahn Lam
1 year
Why gRPC is Getting So Popular ๐Ÿš€. gRPC has exploded in popularity for service-to-service communication. Here's why:. - Speed - gRPC is built on HTTP/2 and Protobufs for maximum throughput and minimal latency. Much faster than JSON over HTTP. - Efficiency - The compact Protobuf
Tweet media one
19
339
2K
@sahnlam
Sahn Lam
4 months
API Design Checklist
Tweet media one
8
266
2K
@sahnlam
Sahn Lam
3 months
How HTTPS Works
Tweet media one
10
310
2K
@sahnlam
Sahn Lam
2 months
API vs SDK
Tweet media one
5
318
2K
@sahnlam
Sahn Lam
2 months
JSON Web Token Visualized
Tweet media one
10
280
2K
@sahnlam
Sahn Lam
2 months
Frontend Performance Cheatsheet
Tweet media one
5
278
2K
@sahnlam
Sahn Lam
2 years
8 key data structures that power modern databases. Which one is your favorite, and why?
Tweet media one
12
343
2K
@sahnlam
Sahn Lam
1 month
Big Data Pipelines on the Cloud
Tweet media one
4
290
2K
@sahnlam
Sahn Lam
5 months
How HTTPS works. HTTPS (Hypertext Transfer Protocol Secure) is a secure way to share information on the internet. It encrypts data transfer between client and server. But without common encryption key, how data is encrypted?. Let's see how:. 1 - Server Certificate Check. -
Tweet media one
8
309
2K
@sahnlam
Sahn Lam
1 year
Docker vs. Kubernetes. What should we use?. What is Docker?. Docker is an open-source platform that simplifies building, distributing, and running applications using containers. It allows you to create lightweight, portable, self-contained containers from any application, bundled
Tweet media one
11
349
2K
@sahnlam
Sahn Lam
3 months
A Visual Guide to CI/CD
Tweet media one
8
299
2K
@sahnlam
Sahn Lam
2 years
I've used Redis in production for almost a decade. It's reliable and easy to use (if used correctly). Here are my top 5 use cases where it shines:
Tweet media one
22
281
2K
@sahnlam
Sahn Lam
11 days
How does HTTPS work?
Tweet media one
7
247
2K
@sahnlam
Sahn Lam
1 year
During a major cricket tournament, Disney+ Hotstar captured 5 billion emojis to distill the mood of the 50 million-strong streaming audience in real time. I revisited this fascinating blog post [1] from 2019 while researching how companies scale real-time updates to tens of
Tweet media one
15
277
2K
@sahnlam
Sahn Lam
1 year
Key Concepts to Understand Database Sharding. Database sharding refers to splitting data across multiple database servers and is commonly used for scaling. However, sharding introduces major operational and infrastructure complexity that should be avoided until absolutely
Tweet media one
10
360
2K
@sahnlam
Sahn Lam
5 months
API Pagination Basics. Pagination is a technique to divide large datasets into smaller, more manageable chunks that can be retrieved separately. This improves performance and user experience by preventing huge amounts of data from being loaded at once. There are two common
Tweet media one
5
334
2K
@sahnlam
Sahn Lam
1 month
Linux Boot Process Illustrated
Tweet media one
20
265
2K
@sahnlam
Sahn Lam
2 years
HTTP/3 is hot off the press (published June 2022). It is already supported by many browsers, and a quarter of the top websites. This video explains the progression from HTTP/1 โžก๏ธ HTTP/2 โžก๏ธ HTTP/3, and its new UDP-based transport protocol called QUIC.
Tweet media one
7
323
2K
@sahnlam
Sahn Lam
3 months
RESTful API Design Tips
Tweet media one
8
271
2K
@sahnlam
Sahn Lam
3 months
Kafka Fundamentals
Tweet media one
6
267
2K
@sahnlam
Sahn Lam
2 months
SQL Learning Roadmap
Tweet media one
2
234
2K
@sahnlam
Sahn Lam
3 months
API Security Checklist
Tweet media one
6
292
2K
@sahnlam
Sahn Lam
4 months
Docker: Before and After
Tweet media one
10
205
1K
@sahnlam
Sahn Lam
1 year
Top 4 Forms of Authentication Mechanisms. 1. SSH Keys - cryptographic authentication for secure remote access ๐Ÿ”‘. SSH keys involve a public and private key pair. The private key is kept secret by the user, while the public key is shared with the remote system. When connecting,
Tweet media one
10
351
1K
@sahnlam
Sahn Lam
5 months
A Visual Guide to CI/CD. ๐—–๐—ผ๐—ป๐˜๐—ถ๐—ป๐˜‚๐—ผ๐˜‚๐˜€ ๐—œ๐—ป๐˜๐—ฒ๐—ด๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป (๐—–๐—œ) is a foundational practice in DevOps where developers frequently merge code changes into the main branch, often multiple times a day. This process is complemented by automated testing to ensure new
Tweet media one
3
276
1K
@sahnlam
Sahn Lam
1 month
Netflix Tech Stack. This post is based on research from many Netflix engineering blogs and open-source projects. If you come across any inaccuracies, please feel free to inform us.
Tweet media one
8
194
1K
@sahnlam
Sahn Lam
1 year
If you design complex systems, you'll love sequence diagrams. Complex system architectures can quickly become tangled and hard to follow. Enter sequence diagrams! They keep your design neat and easily understandable. For example, check out the diagram below. It depicts a
Tweet media one
17
231
1K
@sahnlam
Sahn Lam
1 year
How Discord Stores Trillions of Messages. In 2015, Discord started using MongoDB to store messages. By November 2015, there were already 100 million messages that did not fit in RAM, causing unpredictable latency. In 2017, Discord moved to storing billions of messages in a
Tweet media one
11
262
1K
@sahnlam
Sahn Lam
4 months
What is API Gateway
Tweet media one
7
237
1K
@sahnlam
Sahn Lam
4 months
SQL Learning Roadmap
Tweet media one
9
206
1K
@sahnlam
Sahn Lam
1 year
Stack Overflow's Impressive Monolithic Architecture. Stack Overflow bucks the microservices trend, handling 1.3 billion monthly pageviews across its 200 sites using a remarkably efficient monolithic architecture with minimal infrastructure. Web Servers:. - Uses only 9 on-prem
Tweet media one
17
229
1K
@sahnlam
Sahn Lam
1 month
Git 101
Tweet media one
6
176
1K
@sahnlam
Sahn Lam
1 month
Kafka 101
Tweet media one
6
221
1K
@sahnlam
Sahn Lam
1 year
Understanding the API Gateway. An API Gateway is a server that acts as the single entry point for all clients. It provides a unified interface to a set of microservices, simplifies the client-side code, and hides the internal structure of the application. Here is a detailed
Tweet media one
5
310
1K
@sahnlam
Sahn Lam
1 year
Caching 101: The Must-Know Caching Strategies. Fetching data is slow. Caching speeds things up by storing frequently accessed data for quick reads. But how do you populate and update the cache? That's where strategies come in. ๐Ÿ” Read Strategies:. Cache Aside (Lazy Loading).-
Tweet media one
7
260
1K
@sahnlam
Sahn Lam
2 months
What is API Gateway
Tweet media one
8
235
1K
@sahnlam
Sahn Lam
3 months
Quick Guide to Frontend Performance
Tweet media one
10
202
1K
@sahnlam
Sahn Lam
5 months
Semantic Versioning explained
Tweet media one
2
258
1K
@sahnlam
Sahn Lam
1 year
Git Merge vs. Rebase vs. Squash Commit. What are the differences and when should you use each? As I explain in more detail in the video, there are some key distinctions. Git Merge. This creates a new commit in the target branch. The new commit ties the histories of both main and
8
305
1K
@sahnlam
Sahn Lam
4 months
A Quick Reference to Database Scaling
Tweet media one
2
218
1K
@sahnlam
Sahn Lam
1 year
If you design complex systems, you'll love sequence diagrams. Complex system architectures can quickly become tangled and hard to follow. Enter sequence diagrams! They keep your design neat and easily understandable. For example, check out the diagram below. It depicts a
Tweet media one
18
218
1K
@sahnlam
Sahn Lam
1 year
Visualizing SQL Queries. A mental model can help visualize how SQL queries are executed. Conceptually, SQL statements can be thought of as executing in this sequence:. 1. FROM: Tables are identified and joined to create the initial dataset. 2. WHERE: Filters are applied to the
Tweet media one
5
256
1K
@sahnlam
Sahn Lam
2 months
Popular Redis Use Cases
Tweet media one
2
165
1K
@sahnlam
Sahn Lam
4 months
A Quick Guide to Load Balancing
Tweet media one
4
189
1K
@sahnlam
Sahn Lam
1 year
Why is Redis Fast?. Redis is fast for in-memory data storage. Its speed has made it popular for caching, session storage, and real-time analytics. But what gives Redis its blazing speed? Let's explore:. RAM-Based Storage. At its core, Redis primarily uses main memory for storing
Tweet media one
4
236
1K
@sahnlam
Sahn Lam
1 year
How to improve API performance?. Here are 5 tips:. 1. ๐—ฃ๐—ฎ๐—ด๐—ถ๐—ป๐—ฎ๐˜๐—ถ๐—ผ๐—ป. Pagination is a common optimization technique when result sets are large. By streaming results back to the client in pages, service responsiveness can be improved. 2. ๐—”๐˜€๐˜†๐—ป๐—ฐ๐—ต๐—ฟ๐—ผ๐—ป๐—ผ๐˜‚๐˜€
Tweet media one
5
312
1K
@sahnlam
Sahn Lam
2 years
You loved my tweet on Stack Overflow's monolith. Now, letโ€™s explore the opposite end of the spectrum: Netflix API architecture evolution. Discover how Netflix API evolved through 4 stages.
Tweet media one
18
226
1K
@sahnlam
Sahn Lam
1 year
API vs SDK: Key Differences. APIs (Application Programming Interfaces) and SDKs (Software Development Kits) are essential tools for software development, but they serve different purposes:. API:.An API is a set of rules and protocols that allows different software applications
Tweet media one
7
305
1K
@sahnlam
Sahn Lam
3 months
Linux Boot Process Illustrated
Tweet media one
8
226
1K
@sahnlam
Sahn Lam
1 year
MVC, MVP, MVVM, MVVM-C, and VIPER. So, let's talk about these software architecture patterns. Each one offers a different approach to organize your code and keep things clean and tidy. MVC - the OG.This classic pattern divides your app into three parts: Model (the data), View
Tweet media one
4
311
1K
@sahnlam
Sahn Lam
18 days
High Impact Open Source Projects
Tweet media one
8
209
1K
@sahnlam
Sahn Lam
4 months
8 Solutions for Common System Design Challenges
Tweet media one
3
201
1K
@sahnlam
Sahn Lam
1 year
A Visual Guide to CI/CD. ๐—–๐—ผ๐—ป๐˜๐—ถ๐—ป๐˜‚๐—ผ๐˜‚๐˜€ ๐—œ๐—ป๐˜๐—ฒ๐—ด๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป (๐—–๐—œ) is a foundational practice in DevOps where developers frequently merge code changes into the main branch, often multiple times a day. This process is complemented by automated testing to ensure new
Tweet media one
6
301
1K
@sahnlam
Sahn Lam
1 month
API Security 101
Tweet media one
4
193
1K
@sahnlam
Sahn Lam
3 months
How to Build Fault-Tolerant Systems
Tweet media one
4
218
1K
@sahnlam
Sahn Lam
2 years
Tired of wrangling nested JSON files? This tool is a game-changer.๐Ÿ‘‡. ๐‰๐ฌ๐จ๐ง๐‚๐ซ๐š๐œ๐ค generates graph diagrams from JSON files and makes them easy to read. But that's not all: You can also download the diagrams as images for easy sharing. See the link below.
Tweet media one
14
202
1K
@sahnlam
Sahn Lam
4 months
API vs SDK. An API enables communication between software components, while an SDK provides a set of tools for developing applications on a specific platform.
Tweet media one
7
224
1K
@sahnlam
Sahn Lam
2 years
We've been making system design videos on YouTube for 6 months and now almost 300K people subscribe to our videos!. Join us: Here are the top 5:
Tweet media one
10
179
1K
@sahnlam
Sahn Lam
1 year
Git Merge vs. Rebase vs. Squash Commit. What are the differences?. When we ๐ฆ๐ž๐ซ๐ ๐ž ๐œ๐ก๐š๐ง๐ ๐ž๐ฌ from one Git branch to another, we can use โ€˜git mergeโ€™ or โ€˜git rebaseโ€™. The diagram below shows how the two commands work. ๐†๐ข๐ญ ๐Œ๐ž๐ซ๐ ๐ž.This creates a new commit Gโ€™ in the
Tweet media one
13
237
1K
@sahnlam
Sahn Lam
5 months
Frontend Performance Cheatsheet. โ€“.Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages):
Tweet media one
3
193
1K
@sahnlam
Sahn Lam
3 months
AWS Cheat Sheet
Tweet media one
4
192
1K
@sahnlam
Sahn Lam
1 year
Top Architectural Styles. In software development, the architecture you choose plays a key role in shaping a system's structure and behavior. It lays out a blueprint showing how different pieces will fit together to make the software work. Architectural styles offer proven
Tweet media one
6
281
1K
@sahnlam
Sahn Lam
4 months
Useful Kubernetes Design Patterns
Tweet media one
8
192
1K
@sahnlam
Sahn Lam
13 days
What is a Deadlock?
Tweet media one
5
188
1K
@sahnlam
Sahn Lam
3 months
System Design is About Tradeoffs
Tweet media one
4
166
1K
@sahnlam
Sahn Lam
4 months
Popular Redis Use Cases
Tweet media one
3
173
1K
@sahnlam
Sahn Lam
1 year
Our recommended materials to help you prepare for your next tech interview. You can find the link to watch a detailed video explanation at the end of the post. Coding.- Leetcode.- Cracking the coding interview book.- Neetcode. System Design Interview.- System Design Interview
Tweet media one
5
228
1K
@sahnlam
Sahn Lam
7 months
A Visual Guide to CI/CD. ๐—–๐—ผ๐—ป๐˜๐—ถ๐—ป๐˜‚๐—ผ๐˜‚๐˜€ ๐—œ๐—ป๐˜๐—ฒ๐—ด๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป (๐—–๐—œ) is a foundational practice in DevOps where developers frequently merge code changes into the main branch, often multiple times a day. This process is complemented by automated testing to ensure new
Tweet media one
4
257
1K
@sahnlam
Sahn Lam
26 days
Roadmap to DevOps Mastery
Tweet media one
13
188
1K
@sahnlam
Sahn Lam
2 months
If you design complex systems, you'll love sequence diagrams. Complex system architectures can quickly become tangled and hard to follow. Enter sequence diagrams! They keep your design neat and easily understandable. For example, check out the diagram below. It depicts a
Tweet media one
14
152
1K
@sahnlam
Sahn Lam
1 year
8 key data structures that power modern databases. Which one is your favorite, and why?. My preference? Definitely B-tree and LSM tree. B-trees and B-tree variants like B+ trees:. - Use on-disk balanced tree structure to enable logarithmic time searches, inserts, deletes.- Used
Tweet media one
3
200
1K
@sahnlam
Sahn Lam
1 year
How do companies ship code to production?. The following describes a typical software delivery workflow. Companies have diverse environments using different tools. This is one representative workflow that demonstrates some common practices. Details will differ across
22
242
1K
@sahnlam
Sahn Lam
1 year
Why is Apache Kafka fast?. There are many design decisions that contributed to Kafkaโ€™s performance. Kafka was originally designed in a time when rotating disks were popular. However, Kafka's design choices still deliver decent performance advantages today. In this post, weโ€™ll
Tweet media one
7
197
1K
@sahnlam
Sahn Lam
1 year
Caching 101: The Must-Know Caching Strategies. Fetching data is slow. Caching speeds things up by storing frequently accessed data for quick reads. But how do you populate and update the cache? That's where strategies come in. ๐Ÿ” Read Strategies:. Cache Aside (Lazy Loading).-
Tweet media one
4
248
1K
@sahnlam
Sahn Lam
3 months
Developer Technical Growth Checklist
Tweet media one
2
175
1K
@sahnlam
Sahn Lam
3 months
How C++, Java, and Python Work Under the Hood?. Compiled languages like C++ and Go transform source code into machine code using a compiler before execution. The compiled machine code can then be directly executed by the CPU. Java first compiles source code into bytecode, which
Tweet media one
10
193
1K
@sahnlam
Sahn Lam
12 days
A Visual Guide in CI/CD
Tweet media one
4
186
1K
@sahnlam
Sahn Lam
2 months
API vs SDK. An API enables communication between software components, while an SDK provides a set of tools for developing applications on a specific platform.
Tweet media one
6
196
1K
@sahnlam
Sahn Lam
2 months
Mobile App Release Process
Tweet media one
3
172
1K
@sahnlam
Sahn Lam
5 months
Docker vs. Kubernetes. What should we use?. ๐—ช๐—ต๐—ฎ๐˜ ๐—ถ๐˜€ ๐——๐—ผ๐—ฐ๐—ธ๐—ฒ๐—ฟ?.Docker is an open-source platform that simplifies building, distributing, and running applications using containers. It allows you to create lightweight, portable, self-contained containers from any
Tweet media one
4
193
1K
@sahnlam
Sahn Lam
2 months
How to Solve Common System Design Challenges
Tweet media one
4
156
1K
@sahnlam
Sahn Lam
28 days
Quick Guide to Frontend Performance
Tweet media one
5
172
1K
@sahnlam
Sahn Lam
1 year
Git can seem confusing at first, but a few key concepts make it clearer:. There are 4 locations for your code:.- Working Directory.- Staging Area.- Local Repository.- Remote Repository (like GitHub). Basic commands move code between these locations.- git add stages changes.- git
Tweet media one
6
210
974