Foundational Distributed System Concepts - Scalability Flashcards
Understand core concepts (20 cards)
What is vertical scaling?
Increasing the resources of a single server, such as CPU or RAM.
What is horizontal scaling?
Adding more servers to distribute the load.
When should vertical scaling be used?
When applications are not designed for distributed environments.
When should horizontal scaling be used?
When applications can be distributed across multiple servers.
What is load balancing?
Distributing incoming network traffic across multiple servers.
Name a load balancing strategy.
Round Robin
Name another load balancing strategy.
Least Connections
What are the pros of Round Robin load balancing?
Simple and effective for evenly distributed loads.
What are the cons of Round Robin load balancing?
Does not account for server capacity or current load.
What are the pros of Least Connections load balancing?
Directs traffic to the server with the least connections.
What are the cons of Least Connections load balancing?
Can be complex to implement and monitor.
What is sharding?
Dividing a database into smaller, more manageable pieces called shards.
What is partitioning in data management?
Splitting data into distinct segments for efficiency.
What is hashing in sharding?
Using a hash function to determine the shard for a given data entry.
What is consistent hashing?
A method that reduces the number of keys that need to be remapped when a shard is added or removed.
What is range-based sharding?
Dividing data into shards based on a specified range of values.
What is directory-based sharding?
Using a lookup table to determine which shard contains a particular piece of data.
What issues can arise with data distribution in sharding?
Hot spots and rebalancing challenges.
What are hot spots in data distribution?
When one shard receives significantly more traffic than others.
What is rebalancing in sharding?
Redistributing data across shards to ensure even load.