Category: System Design
-
Bulkhead pattern
Introduction The Bulkhead pattern is a type of application design that is tolerant of failure. In a bulkhead architecture, also known as cell-based architecture, elements of an application are isolated into pools so that if one fails, the others will continue to function. It’s named after the sectioned partitions (bulkheads) of a ship’s hull. If…
-
CAP Theorem
Introduction The CAP Theorem, formulated by Eric Brewer in 2000, is a fundamental principle in distributed systems. It states that in a distributed data store, it is impossible to simultaneously achieve all three of the following properties: The CAP theorem is crucial for designing databases, cloud-based applications, and large-scale distributed architectures. It helps developers understand…
-
Token Bucket Algorithm
Introduction The Token Bucket Algorithm is a popular mechanism used in rate limiting to control data transmission, API requests, and network traffic efficiently. It allows bursty traffic while ensuring a steady overall rate of transmission. This algorithm is widely adopted in network traffic management, API rate limiting, cloud computing, and telecommunications to prevent excessive load…
-
Circuit Breaker pattern
Introduction The Circuit Breaker Pattern is a software design pattern used to improve the stability and resilience of distributed systems. It helps prevent repeated failures when a system or service is experiencing issues, reducing the risk of cascading failures. Why is it Needed? In modern microservices and cloud-based architectures, services depend on multiple external components…
-
Gateway Routing Pattern
Introduction The Gateway Routing Pattern is a design pattern used in microservices architecture to route client requests through a single entry point, known as an API Gateway. The gateway handles authentication, request routing, load balancing, monitoring, and more. This pattern enhances security, reduces direct client interaction with internal microservices, and simplifies the architecture. The pattern…
-
Rate Limiting Pattern
Introduction Many services implement throttling to regulate resource usage, restricting the rate at which applications or services can access them. By adopting a rate-limiting pattern, you can reduce or prevent throttling errors, manage these limits effectively, and predict throughput more accurately. This approach is particularly beneficial in scenarios involving large-scale, repetitive automated tasks, such as…
-
Sidecar pattern
Introduction Deploy components of an application into a separate process or container to provide isolation and encapsulation. This pattern can also enable applications to be composed of heterogeneous components and technologies. This pattern is named Sidecar because it resembles a sidecar attached to a motorcycle. In the pattern, the sidecar is attached to a parent application and…
-
Forward Proxy vs. Reverse Proxy
1. Forward Proxy Many businesses use proxy servers to route and secure traffic between networks. A proxy server, sometimes referred to as a forward proxy, is a server that routes traffic between client(s) and another system, usually external to the network. By doing so, it can regulate traffic according to preset policies, convert and mask…
-
Saga distributed transactions pattern
Introduction The Saga design pattern helps maintain data consistency in distributed systems by coordinating transactions across multiple services. A saga is a sequence of local transactions where each service performs its operation and initiates the next step through events or messages. If a step in the sequence fails, the saga executes compensating transactions to undo…
-
Throttling Pattern
Introduction Control the consumption of resources used by an instance of an application, an individual tenant, or an entire service. This can allow the system to continue to function and meet service level agreements, even when an increase in demand places an extreme load on resources. Context and problem The load on a cloud application…