🧾 System Requirements & Foundations
Scalability
Section titled “Scalability”- Vertical scaling: add CPU/RAM to a single node; simple but limited and lacks redundancy.
- Horizontal scaling: add more nodes; needs load balancing and shared-nothing design, but offers resilience.
| Factors | Horizontal Scaling | Vertical Scaling |
|---|---|---|
| Load Balancing | Required | N/A |
| Failure | Resilient | Single point of failure |
| Communication | Network calls (RPC) | Inter process communication |
| Data | May be inconsistent | Consistent |
| Scalability | Highly scalable | Hardware limited |
Architecture Patterns
Section titled “Architecture Patterns”- Monolith: single codebase/service; faster to develop, harder to scale organizationally.
- Microservices: independent services with well-defined APIs; enable isolated scaling but add operational complexity.
- Modular Monolith: structured monolith offering internal boundaries without distributed overhead.
Availability & Reliability
Section titled “Availability & Reliability”- Availability target (“nines”) dictates permissible downtime (e.g., 99.9% → ~8.8 hours/year).
- Reliability focuses on preventing failures through redundancy, graceful degradation, and disaster recovery.
- Use redundancy + replication to avoid single points of failure.
Latency & Throughput
Section titled “Latency & Throughput”- Latency: time for a single request round-trip. Optimize via caching, CDNs, reducing network hops, and query tuning.
- Throughput: requests/data processed per time unit. Improve via parallelism, horizontal scale, efficient batching.

Fault tolerance
Section titled “Fault tolerance”Fault tolerance is a system’s ability to handle errors or outages without losing functionality.
- Example:
- Application 1: Connected to a single database. If the database fails, the application stops working.
- Application 2: Connected to a primary database and a standby replica. If the primary fails, it switches to the replica and continues working.

Domain Name System (DNS)
Section titled “Domain Name System (DNS)”DNS translates human-readable domain names (e.g., www.example.com) into IP addresses that computers use to identify each other on the network.
Commands used to view the Domain name
- dig
- nslookup
Key Concepts
Section titled “Key Concepts”- Hierarchy: DNS is hierarchical, with authoritative servers at the top level.
- Lookup Process: Your router or ISP provides DNS server information for lookups.
- Caching:
- Lower-level DNS servers cache mappings to improve performance.
- Cached results may become stale due to DNS propagation delays.
- Browsers and operating systems also cache DNS results for a period defined by the Time to Live (TTL).

Content Delivery Networks (CDNs)
Section titled “Content Delivery Networks (CDNs)”- Globally distributed caches serving static assets (HTML, CSS, JS, images, video).
- Reduce latency, lighten origin load, and absorb traffic spikes.
- Plan for cache invalidation (API purge, versioned URLs) and origin failover.

Proxies
Section titled “Proxies”| Type | Acts For | Purpose | Examples |
|---|---|---|---|
| Forward proxy | Clients | Anonymity, content filtering, bandwidth control | Squid, corporate proxies |
| Reverse proxy | Servers | Load balancing, SSL termination, caching, security | Nginx, HAProxy, CDN edge |