WikiGalaxy

Personalize

System Design Terminology for Beginners

Scalability

Scalability refers to the ability of a system to handle increased loads without affecting performance. It is crucial for systems that expect growth over time.

Load Balancing

Load balancing distributes incoming network traffic across multiple servers to ensure no single server becomes overwhelmed, thus improving responsiveness and availability.

Caching

Caching involves storing copies of frequently accessed data in a 'cache' so that future requests can be served faster, reducing latency and load on databases.

Redundancy

Redundancy ensures system reliability by duplicating critical components or functions, providing backups in case of failures.

Latency

Latency is the time taken for a data packet to travel from source to destination. Minimizing latency is crucial for enhancing user experience, especially in real-time applications.

Throughput

Throughput is the rate at which data is processed by a system. High throughput indicates efficient data processing capabilities.

Scalability

Horizontal Scaling

Adding more machines to your pool of resources to handle increased load.

Vertical Scaling

Increasing the power of existing machines (e.g., adding more CPU or RAM).

Elasticity

The ability to automatically scale resources up or down based on demand.

Scalable Architecture

Designing systems that can grow with increasing demands.

Load Testing

Simulating increased load to test scalability limits and identify bottlenecks.


    // Horizontal Scaling Example
    public class Server {
        public static void main(String[] args) {
            System.out.println("Add more servers as demand increases.");
        }
    }
    

Horizontal Scaling

By adding more servers, you can distribute the load, ensuring that no single server is overwhelmed. This is particularly useful for web applications with fluctuating traffic.

Vertical Scaling

While vertical scaling can be simpler, it has limitations and can become costly. It is often used for database servers where increasing CPU and memory can improve performance.

Elasticity

Elasticity is a key feature of cloud services, allowing for automatic scaling based on real-time demand, optimizing resource use and cost.

Load Balancing

Round Robin

A simple method where each server takes turns handling requests.

Least Connections

Directs traffic to the server with the fewest active connections.

IP Hash

Routes requests based on the client's IP address, ensuring consistent routing.

Layer 4 Load Balancing

Operates at the transport layer, balancing based on IP and TCP/UDP ports.

Layer 7 Load Balancing

Operates at the application layer, balancing based on HTTP headers, URLs, etc.


    // Round Robin Example
    class LoadBalancer {
        public static void main(String[] args) {
            System.out.println("Distribute requests evenly among servers.");
        }
    }
    

Round Robin

Round Robin is effective for evenly distributing stateless requests, but may not be ideal for stateful sessions without session persistence.

Least Connections

This method helps in scenarios where some requests take longer to process, ensuring that the load is balanced based on server capacity.

IP Hash

IP Hash is useful for ensuring that clients are consistently routed to the same server, which is important for session persistence.

Caching

In-Memory Caching

Stores data in RAM for fast access, used for frequently accessed data.

Distributed Caching

Spreads cache across multiple nodes to handle large scale data efficiently.

Cache Invalidation

Ensures data consistency by removing stale data from the cache.

Write-Through Cache

Writes data to the cache and database simultaneously, ensuring consistency.

Cache Eviction Policies

Strategies like LRU (Least Recently Used) to manage cache size.


    // In-Memory Caching Example
    class CacheSystem {
        public static void main(String[] args) {
            System.out.println("Store data in RAM for quick access.");
        }
    }
    

In-Memory Caching

In-memory caching is ideal for small datasets that require high-speed access, such as session data or frequently queried database results.

Distributed Caching

Distributed caching systems like Redis or Memcached can handle large-scale data, providing high availability and fault tolerance.

Cache Invalidation

Proper cache invalidation strategies are crucial to ensure users always receive the most up-to-date information.

Redundancy

Active-Passive Redundancy

One active system and one backup system that takes over in case of failure.

Active-Active Redundancy

All systems are active and share the load, providing better resource utilization.

Data Replication

Copying data to multiple locations to ensure availability and reliability.

Failover Systems

Automatically switch to a standby system upon failure.

Geographic Redundancy

Distributing resources across different geographic locations to prevent regional failures.


    // Active-Passive Redundancy Example
    class RedundancySystem {
        public static void main(String[] args) {
            System.out.println("Switch to backup system on failure.");
        }
    }
    

Active-Passive Redundancy

This approach is cost-effective and simple to implement, ensuring that a backup system is always ready to take over if the primary system fails.

Active-Active Redundancy

Active-active setups provide higher availability and better resource utilization but require more complex management and synchronization.

Data Replication

Data replication ensures that data is not lost in case of a system failure, providing high availability and disaster recovery solutions.

Latency

Network Latency

The delay in data transmission over a network.

Disk Latency

The delay in reading/writing data to/from a disk.

Database Latency

The time taken to execute a database query.

Application Latency

The delay introduced by application processing.

Reducing Latency

Techniques like caching, optimizing code, and using CDNs to reduce latency.


    // Reducing Latency Example
    class LatencyReduction {
        public static void main(String[] args) {
            System.out.println("Implement caching to reduce latency.");
        }
    }
    

Network Latency

Network latency can be minimized by optimizing routing paths and using faster network protocols.

Disk Latency

Using SSDs instead of HDDs can significantly reduce disk latency, providing faster read/write speeds.

Database Latency

Database latency can be reduced by indexing, query optimization, and using in-memory databases for frequently accessed data.

Throughput

Batch Processing

Processing data in large batches to increase throughput.

Parallel Processing

Dividing tasks into smaller sub-tasks and processing them simultaneously.

Pipeline Architecture

Using a pipeline approach to break down tasks and improve throughput.

Concurrency

Managing multiple tasks at the same time to increase throughput.

Optimizing Code

Refactoring code to improve execution speed and throughput.


    // Parallel Processing Example
    class ThroughputOptimization {
        public static void main(String[] args) {
            System.out.println("Divide tasks for parallel execution.");
        }
    }
    

Batch Processing

Batch processing can significantly increase throughput by reducing the overhead associated with frequent task switching.

Parallel Processing

Parallel processing leverages multi-core processors to execute multiple tasks simultaneously, enhancing throughput.

Pipeline Architecture

Pipeline architecture can efficiently handle data processing tasks by breaking them into stages, each handled by different processing units.

logo of wikigalaxy

Newsletter

Subscribe to our newsletter for weekly updates and promotions.

Privacy Policy

 • 

Terms of Service

Copyright © WikiGalaxy 2025