Essential Systems Design Principles for Developers (Part 7: 61–70)
Written on
Chapter 1: Introduction to Systems Design Concepts
This article outlines 100 crucial systems design concepts every developer should be familiar with. These principles will aid in crafting systems that are efficient, resilient to faults, and scalable. To enhance readability, the content will be segmented into several blog entries.
You can find links to the previous sections below:
Chapter 2: Key Concepts
61. Load Balancing Server Selection Techniques
Load Balancers employ various strategies to distribute incoming requests across multiple servers. Some prevalent load balancing methods include:
- Round Robin Strategy: Requests are sent in a circular pattern among all servers. For instance, if there are three servers—A, B, and C—requests will cycle through A, B, C, and then back to A.
- Weighted Round Robin: This method assigns weights to servers based on their capacity to handle requests. Requests are then distributed in a circular manner relative to these weights.
- Random Selection: This approach randomly assigns requests to any of the servers.
- IP Address-Based Selection: A client's IP address is hashed to generate a unique key, directing the request to a specific server.
- Performance-Based Selection: Requests are routed to the server with the least congestion or the quickest response time.
62. Hash Function
A hash function takes data of variable sizes and converts it into fixed-size values known as hashes or hash digests.
63. SHA (Secure Hash Algorithm)
SHA refers to a set of widely-used hash functions released by the National Institute of Standards and Technology (NIST) in the U.S. Among these, SHA-2 and SHA-3 are particularly popular today.
For further details, read more about them below:
64. Consistent Hashing
Consistent hashing minimizes the need to remap keys when a hash table is resized. For example, consider servers A, B, C, and D. Clients are hashed and linked to the nearest server in a clockwise manner. If server D goes offline, requests from client 3 will reroute to server A, maintaining the existing client-server relationships of the other clients.
65. Rendezvous/Highest Random Weight Hashing
This hashing technique, akin to consistent hashing, also reduces remapping when the hash table size changes. A client assesses available servers and sends requests to the one with the highest weight. If that server is unavailable, the client will connect to the server with the next highest weight.
66. Database Index
A database index is a structure that accelerates search and filter operations within a database.
For more insights about database indexes, click here:
67. Primary-Replica Replication Strategy
This strategy enhances database scalability by creating replicas. Data can be read from the replicas, but all write operations occur only on the primary database. Updates from the primary to replicas happen asynchronously, which may lead to consistency issues.
68. Multi-Master Replication Strategy
In this approach, each replicated instance can read from and write to the database. However, it can create conflicts, such as duplicate rows with identical IDs.
69. Database Sharding
Sharding involves partitioning a database into smaller, manageable units called shards. This method facilitates horizontal scaling and enhances database throughput.
For more on database sharding, visit here:
70. Hot Spot
The term "hot spot" refers to a database shard or server that experiences a higher volume of queries or requests compared to others. This situation often arises from suboptimal sharding keys or hashing functions.
Thank you for reading! Stay tuned for the next installment!
If you are a newcomer to Python or programming in general, consider exploring my new book, 'The No Bulls**t Guide To Learning Python' below:
Chapter 3: Video Resources
This video titled "201720 Excel Guided Project 4-3" provides an insightful overview of Excel project management techniques that can enhance your systems design capabilities.
In "Learn PyTorch for Deep Learning in a Day. Literally," you'll discover the essentials of PyTorch that can aid in your understanding of deep learning concepts relevant to systems design.