Lecture 6: QoS Flashcards
1
Q
Resiliency Patterns
A
- Retry Pattern
- Circuit Breaker
- Rate Limiter
2
Q
Security Pattern
A
- Accès Token (OAuth)
- API Gateway can serve as intermediary between authorisation server and client
3
Q
Retry Pattern
A
- Provide acceptable level of service in the pace of failures
- Transient failures (short-time) (e.g., slow network connection)
- Retry after delay
4
Q
Circuit Breaker
A
- Long lasting failures
- Prevent application from performing an operation that is likely to fail
- Fail immediately (after threshold is reached)
5
Q
Circuit Breaker States
A
- Closed -> request will be forwarded
- Open -> Happens after threshold
- Half-open -> Happens after time-out -> call will be made to check if the service is available or not
6
Q
Rate Limiter
A
- # of requests that are allowed for a given period period of time
- Otherwise HTTP 429 too many requests
- API Gateway
7
Q
Scalability Model
A
X-axis (run multiple copies)
Y-axis (break down monolithic application)
Z-axis (partition and distribute data)
8
Q
X-axis scaling
A
- Similar to computer cluttering (Spark Cluster)
- Leveraging cloning of Microservices
- Load Balancer
9
Q
Y-axis scaling
A
- API Gateway
- Content-based Routing
10
Q
Z-axis scaling
A
- Database sharding (each shard holds a subset of the data)
- Content-based routing (e.g., split us and eu data)
11
Q
Caching Pattern
A
- Reduce the frequency of expensive operations such as reading data from database
- We first look at the data in the cache and then serve the request -> Cache hit
- If the data is not in the cache, then we pick the data from the actual target such as database and then store the retrieved data in cache
- At the API Gateway