Improving Performance with API Gateway Caching and Throttling

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/20

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering key concepts, algorithms, architectural patterns, and industry implementations of API gateway caching and throttling.

21 Terms

1
New cards

API Gateway

A critical intermediary layer that acts as a unified entry point for client requests in microservices and distributed systems, handling cross-cutting concerns such as request routing, protocol translation, authentication, authorization, and traffic management.

2
New cards

Caching

A performance optimization mechanism that temporarily stores frequently requested data at the gateway level, allowing subsequent requests to be served directly without querying backend services to reduce latency and server load.

3
New cards

Throttling

A traffic control mechanism that enforces rate limits on incoming requests system-wide or per consumer to prevent backend resources from being overwhelmed by unexpected traffic surges or malicious activity.

4
New cards

In-Memory Caching

A caching approach that stores key-value pairs directly in a process's local memory or a shared in-memory store such as Redis or Memcached to achieve extremely low access latencies.

5
New cards

Distributed Caching

A multi-node caching architecture that provides consistency across multiple gateway instances and incorporates automatic cache scaling and self-healing to maintain high availability under dynamic workloads.

6
New cards

Edge Caching

A technique that positions cache nodes in geographically distributed locations close to end-users (such as in CDNs) to minimize round-trip network latency.

7
New cards

Time-to-Live (TTL)

A time-based cache expiration policy that designates a specific duration after which a cached response is marked invalid and must be re-fetched or refreshed.

8
New cards

Event-Based Invalidation

A cache invalidation technique where cached items are immediately updated or purged in response to changes in the underlying data source, typically through a push or subscription mechanism.

9
New cards

ETag (Entity Tag)

A version-based cache freshness mechanism that matches resource identifiers between the client and server to verify cache validity and prevent serving stale content.

10
New cards

Fixed Window Algorithm

A rate-limiting algorithm that counts the number of incoming requests within distinct, fixed time blocks (e.g., every 60 seconds60\,\text{seconds}) and resets the counter to zero at the start of each new window.

11
New cards

Sliding Window Algorithm

A precise rate-limiting technique that logs timestamps for individual requests within a rolling timeframe, eliminating burst vulnerabilities at window boundaries at the cost of higher memory overhead.

12
New cards

Token Bucket Algorithm

A rate-limiting algorithm in which tokens accumulate in a bucket at a steady rate; each incoming request consumes a token, allowing short bursts of traffic up to the bucket capacity while maintaining a stable average rate.

13
New cards

Leaky Bucket Algorithm

A traffic-shaping rate-limiting mechanism that queues incoming requests and releases or processes them at a constant, steady rate regardless of incoming traffic burstiness.

14
New cards

Adaptive Throttling

A dynamic traffic management approach that automatically modifies rate-limiting thresholds at runtime based on live system metrics such as CPU utilization, memory usage, or error rates, sometimes utilizing machine learning models.

15
New cards

Microcaching

A technique of caching dynamic responses for extremely brief intervals (e.g., 1 to 5 seconds1\text{ to }5\,\text{seconds}), significantly reducing backend load during rapid traffic spikes while preserving relative data freshness.

16
New cards

Bypassing Throttling on Cache Hits

An orchestration pattern in which requests satisfied entirely by the caching layer do not increment the consumer's rate-limiting or throttling counters.

17
New cards

Throttling Pre-Check

An orchestration pattern where the gateway validates whether an incoming request exceeds rate limits before initiating caching lookups, avoiding unnecessary cache processing for rejected calls.

18
New cards

limit_req_zone

An NGINX configuration directive used to allocate shared memory zones for tracking request rates and enforcing rate limits along with burst capacities.

19
New cards

EVCache

A custom distributed caching solution based on Memcached developed by Netflix to cache catalog data at the edge and maintain service availability during backend microservice throttling.

20
New cards

QoS-Aware Caching

A caching strategy that factors quality-of-service parameters, such as client priority tiers, into cache retention and routing decisions to guarantee lower latencies for premium consumers.

21
New cards

API Gateway Reference Architecture

A layered pipeline framework composed of a Request Parser, Authentication & ACLs, a Caching Layer (splitting traffic into cache hits and cache misses), a Throttling & Rate Limit layer, and Backend Services.

<p>A layered pipeline framework composed of a Request Parser, Authentication &amp; ACLs, a Caching Layer (splitting traffic into cache hits and cache misses), a Throttling &amp; Rate Limit layer, and Backend Services.</p>