Sahn Lam(@sahnlam) 's Twitter Profileg
Sahn Lam

@sahnlam

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

ID:20085903

linkhttps://blog.bytebytego.com calendar_today04-02-2009 19:57:04

696 Tweets

27,7K Followers

310 Following

Sahn Lam(@sahnlam) 's Twitter Profile Photo

Understanding OAuth 2.0

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.

๐—ง๐—ต๐—ฒโ€ฆ

Understanding OAuth 2.0 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. ๐—ง๐—ต๐—ฒโ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

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โ€ฆ

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โ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

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โ€ฆ

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โ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

Top Redis Use Cases

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โ€ฆ

Top Redis Use Cases 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โ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

HTTP/1 to HTTP/2 to HTTP/3

HTTP/1.0 was finalized in 1996. Every request to the same server requires a separate TCP connection which is expensive to establish.

HTTP/1.1 (1997) introduced ๐—ฝ๐—ฒ๐—ฟ๐˜€๐—ถ๐˜€๐˜๐—ฒ๐—ป๐˜ ๐—ฐ๐—ผ๐—ป๐—ป๐—ฒ๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐˜€, which allow a TCP connection to be reused forโ€ฆ

HTTP/1 to HTTP/2 to HTTP/3 HTTP/1.0 was finalized in 1996. Every request to the same server requires a separate TCP connection which is expensive to establish. HTTP/1.1 (1997) introduced ๐—ฝ๐—ฒ๐—ฟ๐˜€๐—ถ๐˜€๐˜๐—ฒ๐—ป๐˜ ๐—ฐ๐—ผ๐—ป๐—ป๐—ฒ๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐˜€, which allow a TCP connection to be reused forโ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

Why is PostgreSQL voted the ๐ฆ๐จ๐ฌ๐ญ ๐ฅ๐จ๐ฏ๐ž๐ ๐๐š๐ญ๐š๐›๐š๐ฌ๐ž by Stackoverflow Developer Survey?

The chart shows PostgreSQL's wide range of uses - it's a single database that covers nearly ๐š๐ฅ๐ฅ ๐ญ๐ก๐ž ๐ฎ๐ฌ๐ž ๐œ๐š๐ฌ๐ž๐ฌ developers need.

๐Ÿ”นOLTP (Online Transactionโ€ฆ

Why is PostgreSQL voted the ๐ฆ๐จ๐ฌ๐ญ ๐ฅ๐จ๐ฏ๐ž๐ ๐๐š๐ญ๐š๐›๐š๐ฌ๐ž by Stackoverflow Developer Survey? The chart shows PostgreSQL's wide range of uses - it's a single database that covers nearly ๐š๐ฅ๐ฅ ๐ญ๐ก๐ž ๐ฎ๐ฌ๐ž ๐œ๐š๐ฌ๐ž๐ฌ developers need. ๐Ÿ”นOLTP (Online Transactionโ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

Choosing the Right Database

When deciding which type of database to use, it can be overwhelming to choose from the many available options. Here's a brief summary of some common database architectures and their use cases:

- Relational databases: These are versatile and can solveโ€ฆ

Choosing the Right Database When deciding which type of database to use, it can be overwhelming to choose from the many available options. Here's a brief summary of some common database architectures and their use cases: - Relational databases: These are versatile and can solveโ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

How To Release A Mobile App

The mobile app release process differs from traditional methods. Here is a simplified guide to the key stages:

1. Registration & Development (iOS & Android):
- Enroll as developer in Apple and Google programs to access tools and app stores
- Useโ€ฆ

How To Release A Mobile App The mobile app release process differs from traditional methods. Here is a simplified guide to the key stages: 1. Registration & Development (iOS & Android): - Enroll as developer in Apple and Google programs to access tools and app stores - Useโ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

Linux File Permission Illustrated

To understand Linux file permissions, we need to understand Ownership and Permission.

Ownership

Every file or directory is assigned three types of ownership:

๐Ÿ”นOwner: The owner is the user who created the file or directory.
๐Ÿ”นGroup: A groupโ€ฆ

Linux File Permission Illustrated To understand Linux file permissions, we need to understand Ownership and Permission. Ownership Every file or directory is assigned three types of ownership: ๐Ÿ”นOwner: The owner is the user who created the file or directory. ๐Ÿ”นGroup: A groupโ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

Understanding the Linux File System Layout

The Linux file system was like a messy town. People built their houses wherever they wanted. But in 1994, a new guideline called the Filesystem Hierarchy Standard (FHS) was made. This helped organize the Linux file system.

FHS was likeโ€ฆ

Understanding the Linux File System Layout The Linux file system was like a messy town. People built their houses wherever they wanted. But in 1994, a new guideline called the Filesystem Hierarchy Standard (FHS) was made. This helped organize the Linux file system. FHS was likeโ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

10 Good Coding Practices

1. Follow code specifications (e.g., 'PEP 8', 'Google Java Style') for consistent and readable code.

2. Document and comment code clearly and concisely, focusing on 'Why' rather than 'What'.

3. Write robust code that handles unexpected situations andโ€ฆ

10 Good Coding Practices 1. Follow code specifications (e.g., 'PEP 8', 'Google Java Style') for consistent and readable code. 2. Document and comment code clearly and concisely, focusing on 'Why' rather than 'What'. 3. Write robust code that handles unexpected situations andโ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

Explaining 9 Types of API Testing

๐Ÿ”น Smoke Testing
This is done after API development is complete. It simply validates if the APIs are working and nothing breaks.

๐Ÿ”น Functional Testing
This creates a test plan based on the functional requirements and compares the results withโ€ฆ

Explaining 9 Types of API Testing ๐Ÿ”น Smoke Testing This is done after API development is complete. It simply validates if the APIs are working and nothing breaks. ๐Ÿ”น Functional Testing This creates a test plan based on the functional requirements and compares the results withโ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

What is SSO (Single Sign-On)?

Single Sign-On (SSO) is an authentication scheme that allows a user to log in to different systems using a single set of credentials. The diagram below illustrates how SSO works.

Step 1: A user visits Gmail. Gmail finds the user is not logged inโ€ฆ

What is SSO (Single Sign-On)? Single Sign-On (SSO) is an authentication scheme that allows a user to log in to different systems using a single set of credentials. The diagram below illustrates how SSO works. Step 1: A user visits Gmail. Gmail finds the user is not logged inโ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

Cookie Basics ๐Ÿช

At its core, HTTP is stateless - each request/response cycle stands on its own, with the server forgetting everything after responding. But often we need to remember things between requests, like user logins or shopping carts. That's where cookies come in.โ€ฆ

Cookie Basics ๐Ÿช At its core, HTTP is stateless - each request/response cycle stands on its own, with the server forgetting everything after responding. But often we need to remember things between requests, like user logins or shopping carts. That's where cookies come in.โ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

System design cheat sheet

It includes 15 core concepts. Save it for future reference!

๐Ÿ”น Requirement gathering
๐Ÿ”น System architecture
๐Ÿ”น Data design
๐Ÿ”น Domain design
๐Ÿ”น Scalability
๐Ÿ”น Reliability
๐Ÿ”น Availability
๐Ÿ”น Performance
๐Ÿ”น Security
๐Ÿ”น Maintainability
๐Ÿ”น Testing
๐Ÿ”น Userโ€ฆ

System design cheat sheet It includes 15 core concepts. Save it for future reference! ๐Ÿ”น Requirement gathering ๐Ÿ”น System architecture ๐Ÿ”น Data design ๐Ÿ”น Domain design ๐Ÿ”น Scalability ๐Ÿ”น Reliability ๐Ÿ”น Availability ๐Ÿ”น Performance ๐Ÿ”น Security ๐Ÿ”น Maintainability ๐Ÿ”น Testing ๐Ÿ”น Userโ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

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โ€ฆ

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โ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

Top 12 Tips for API Security

- Use HTTPS
- Use OAuth2
- Use WebAuthn
- Use Leveled API Keys
- Authorization
- Rate Limiting
- API Versioning
- Whitelisting
- Check OWASP API Security Risks
- Use API Gateway
- Error Handling
- Input Validation

โ€“
Subscribe to our weeklyโ€ฆ

Top 12 Tips for API Security - Use HTTPS - Use OAuth2 - Use WebAuthn - Use Leveled API Keys - Authorization - Rate Limiting - API Versioning - Whitelisting - Check OWASP API Security Risks - Use API Gateway - Error Handling - Input Validation โ€“ Subscribe to our weeklyโ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

Top 6 Firewall Use Cases

Firewalls are essential for protecting networks and controlling access to services.

- Port-based rules restrict services to only allow traffic on specific ports, like HTTP/HTTPS traffic on ports 80/443.

- IP address filtering defines an explicitโ€ฆ

Top 6 Firewall Use Cases Firewalls are essential for protecting networks and controlling access to services. - Port-based rules restrict services to only allow traffic on specific ports, like HTTP/HTTPS traffic on ports 80/443. - IP address filtering defines an explicitโ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

How Databases Execute SQL Statements?

The process of SQL execution in a database involves several components interacting together. While the specific architecture can vary between different database systems, the following steps describe a common sequence of operations.

1. A SQLโ€ฆ

How Databases Execute SQL Statements? The process of SQL execution in a database involves several components interacting together. While the specific architecture can vary between different database systems, the following steps describe a common sequence of operations. 1. A SQLโ€ฆ
account_circle
Sahn Lam(@sahnlam) 's Twitter Profile Photo

What is Kubernetes?

Kubernetes (k8s) is a container orchestration system for deploying and managing containers. Its design is influenced by Google's internal cluster management system Borg.

A k8s cluster consists of worker machines called nodes that run containerizedโ€ฆ

What is Kubernetes? Kubernetes (k8s) is a container orchestration system for deploying and managing containers. Its design is influenced by Google's internal cluster management system Borg. A k8s cluster consists of worker machines called nodes that run containerizedโ€ฆ
account_circle