## List
- RPC
- load balancing
- sharding
- CAP theorem
- caching
- partitioning
- replication
- forward proxy vs reverse proxy
- forward proxy is on client side
- reverse proxy is on server side
- API gateway
- CDN
- DNS
- messaging queues
- NoSQL
- Database index
- checksum
- latency vs throughput
- availability vs reliability
## Other List
[30 System Design Concepts](https://blog.algomaster.io/p/30-system-design-concepts)
- [x] [[#Client-Server architecture]]
- [x] [[#IP Address]]
- [x] [[#DNS]]
- [x] [[#Proxy and Reverse Proxy]]
- [x] [[#Latency]]
- [x] [[#HTTP and HTTPS]]
- [x] [[#APIs]]
- [x] [[#REST API]]
- GraphQL
- Databases
- SQL vs NoSQL
- Vertical Scaling
- Horizontal scaling
- Load balancers
- Database indexing
- Replication
- Sharding
- Vertical partitioning
- Caching
- Denormalization
- CAP theorem
- Blob storage
- CDN
- WebSockets
- Webhooks
- Microservices
- Message Queues
- Rate Limiting
- API gateways
- Idempotency
- [x] [[Command and Query Responsibility Segregation]]
- [x] [[Saga Pattern]]
- [ ] [[Two-Phase Commit Pattern]]
- [ ] [[Replicated Load Balancer Pattern]]
- [ ] [[Shared Services Pattern]]
- [ ] [[Sidecar Pattern]]
- [ ] [[Write-Ahead Log]]
- [ ] [[Split-Brain]]
- [ ] [[Hinted Handoff]]
- [ ] [[Read Repair]]
- [ ] [[Service Registry]]
- [ ] [[Circuit Breaker]]
- [ ] [[Leader Election]]
- [ ] [[Bulk Head]]
- [ ] [[Retry]]
- [ ] [[Scatter Gather]]
- [ ] [[Bloom Filters Data]]
- [[7 Distributed Systems Design Patterns]]
- [[ACID Theorem]]
- [[API Gateway]]
- [[BASE Theorem]]
- [[Building Microservices]]
- [[CAP Theorem]]
- [[Cloud Native]]
- [[PACELC Theorem]]
## Client-Server Architecture
Represents an evolution from an architecture where everything resides on the same machine. This a multi-tenant system that separates computing concerns between data storage, data access, and data presentation.
## IP Address
In [[#Client-Server Architecture]], an *IP address* uniquely defines a server deployed in the public Internet. These are the numbers that we see such as *127.0.0.1* when finding our laptop's IP address on a home WiFi network. This is similar for other publicly-hosted websites, but they use human-readable names such as `https://www.google.com/` or `https://yahoo.com/`. In order to reconcile the human-readable names (domain names) with the actual IP addresses, we rely on [[#DNS]]es to handle the mapping for us.
## DNS
A *DNS*, or domain name service, maps human-readable strings to a machine's IP address. When a human looks up `google.com` in a browser, the browser first reaches out to a *DNS* to get the corresponding IP address for `google.com`. Then the browser makes a request to the provided IP address.
```bash
$ ping google.com
PING google.com (142.251.32.14): 56 data bytes
64 bytes from 142.251.32.14: icmp_seq=0 ttl=116 time=13.869 ms
64 bytes from 142.251.32.14: icmp_seq=1 ttl=116 time=19.372 ms
64 bytes from 142.251.32.14: icmp_seq=2 ttl=116 time=21.183 ms
64 bytes from 142.251.32.14: icmp_seq=3 ttl=116 time=23.005 ms
64 bytes from 142.251.32.14: icmp_seq=4 ttl=116 time=15.843 ms
```
## Proxy and Reverse Proxy
A *forward proxy* is a middle man that handles requests from a local intranet to the public internet. It hides the IP of the agent originating the request and keeps identity private.
On the other hand, a *reverse proxy* does the same, but for servers. A reverse proxy will forward requests to specified servers for load balancing and security reasons.
## Latency
*Latency* is the roundtrip delay between the client sending a request and the server sending a response.
## HTTP and HTTPS
*HTTP* and *HTTPS* are protocols that describe how requests/responses to/from clients/servers. *S* is a secure form of HTTP because it encrypts the message contents. The HTTP requests/responses do not conform to any structure other than the protocol.
## APIs
An API is an abstract contract that defines how requests and responses are defined when communicating with another software service.
## REST API
Representational State Transfer is a common type of API. It defines a common structure for APIs. The requirements are generally
- Uses HTTP
- Stateless: the server does not store any temporary state
- Resource-based: resources are generally objects that are stored in databases
- Uses HTTP verbs