8. Using the Bulkhead Isolation Policy to Keep Your Application Up Flashcards

1
Q

Is the Bulkhead Isolation policy a reactive or a proactive strategy?

A

It’s a proactive one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the Bulkhead Isolation policy help us achieve?

A

Keeping our application stable when under heavy load or when a service it relies on is responding too slowly or has gone down.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What can the Bulkhead Isolation policy be used for?

A

It can be used for resource sharing, load shedding, or as a trigger for horizontal scaling.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does the Bulkhead Isolation policy work when it comes to resource allocation?

A

It allows us to allocate and define a set of resources for a given task rather than letting that task take all the resources it can.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How does the Bulkhead Isolation policy affect how quickly our application fails and what does this mean when it comes to scaling?

A

It lets us fail fast by rejecting incoming requests and by monitoring the utilization of the bulkhead. Based on this monitor, we can potentially trigger a horizontal scaling process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What negative situation does the Bulkhead Isolation policy help us prevent?

A

If one part of the application is overloaded, it can bring down other parts. The Bulkhead Isolation policy can prevent that from happening, or at the very least, delay it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What’s the primary purpose of the Bulkhead Isolation policy and what is its secondary use case?

A

The primary purpose of this policy is to prevent application overloading. Its secondary use case is resource allocation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How is scaling achieved using the Bulkhead Isolation policy?

A

By monitoring your Bulkhead Isolation policies, you can determine the number of ongoing parallel requests, as well as the number of requests waiting in the queues. When you reach some limit, you can trigger horizontal scaling and spin up another instance of your application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How is load shedding achieved using the Bulkhead Isolation policy?

A

It is better to fail fast than to fail unpredictably. When your application is being overwhelmed by requests, at some unknown point, it will slow and subsequently fail.

With the Bulkhead Isolation policy, you can set when your application stops accepting requests and immediately returns an error to the caller.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Can the Bulkhead Isolation policy be used in conjunction with other policies?

A

Yes. A common example is to use a Fallback policy when you reach the point of load shedding.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What factors should we look to balance when it comes to implementing the Bulkhead Isolation policy for our app?

A

We need to strike a balance between protecting our application, allowing it to perform close to to the limit of its ability, complexity of our codebase, and cost.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the parameters for setting up a Bulkhead Isolation policy?

A

There are three.

  1. Number of execution slots (int, required).
  2. Size of the queue that’ll be available (int, required).
  3. The method to call when the queue and the execution slots are both full (delegate, optional).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What Policy methods can we use to define a Bulkhead Isolation policy?

A

The generic or the non-generic versions of either the Bulkhead or the BulkheadAsync methods.

Policy.BulkheadAsync(
2, 4, OnBulkheadRejectedAsync);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly