Mastering Key Systems Design Principles for Developers
Written on
Chapter 1: Introduction to Systems Design Concepts
In the realm of software development, understanding key systems design concepts is essential. This guide presents a list of 100 vital ideas that will aid developers in crafting systems that are both efficient and resilient. To enhance clarity, this information is segmented into multiple blog entries.
You can find links to previous sections below.
Chapter 2: Key Architectural Styles
- Monolithic Architecture
A software architecture style where all application functions are bundled into a single, cohesive unit.
- Microservices Architecture
This architecture divides a software application into distinct services, each operating independently. For instance, Amazon could be seen as comprising separate services for shopping carts, payments, and inventory, all of which interact with one another.
Chapter 3: Proxy Servers
- Forward Proxy
A server that intermediates between a client and a server, enhancing client privacy by making requests on the client’s behalf and caching data to expedite responses to frequent requests.
- Reverse Proxy
Serving as an intermediary between a client and a server, this type of proxy bolsters server security, balances loads, caches common responses, and manages logs.
- Load Balancer
A specific type of reverse proxy that distributes incoming requests across multiple servers within a system. Nginx is a well-known example of a reverse proxy and load balancer.
Chapter 4: Caching Mechanisms
- Cache
Memory hardware that stores responses for frequent requests or outcomes from resource-intensive operations to reduce latency. For example, DNS lookup results are often cached to avoid repeatedly querying the DNS database.
- Cache Hit
This occurs when a client's request response is found in the server's cache.
- Cache Miss
This occurs when a client's request response is not present in the server's cache.
- Cache Invalidation
When database entries are modified, the corresponding cache entries become outdated. Replacement of these entries can occur through various strategies:
- Write-through cache: New entries are stored in both the cache and the database simultaneously.
- Write-around cache: New entries bypass the cache and are written directly to the database.
- Write-back cache: New entries are initially written to the cache and later conditionally to the database.
- Cache Replacement / Eviction Policy
This policy dictates which cache entries will be replaced when the cache reaches its limit. Common strategies include:
- Random Replacement (RR): Entries are replaced randomly.
- Least Recently Used (LRU): The least recently accessed entry is replaced.
- Least Frequently Used (LFU): The least frequently accessed entry is replaced.
- First In, First Out (FIFO): Entries are removed in the order they were added.
Thank you for reading! Stay tuned for the next installment!