0
0
Microservicessystem_design~10 mins

Bulkhead pattern in Microservices - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a bulkhead with a fixed number of concurrent calls.

Microservices
bulkhead = Bulkhead(max_concurrent_calls=[1])
Drag options to blanks, or click blank then click option'
A0
B10
C100
D-1
Attempts:
3 left
💡 Hint
Common Mistakes
Setting max_concurrent_calls to 0 disables all calls.
Using negative numbers causes configuration errors.
2fill in blank
medium

Complete the code to wrap a service call with a bulkhead to isolate failures.

Microservices
result = bulkhead.[1](service_call)
Drag options to blanks, or click blank then click option'
Aexecute
Binvoke
Crun
Dcall
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'call' or 'run' which may not exist in the bulkhead API.
Forgetting to wrap the service call causing no isolation.
3fill in blank
hard

Fix the error in the bulkhead configuration to prevent unlimited concurrent calls.

Microservices
bulkhead = Bulkhead(max_concurrent_calls=[1])
Drag options to blanks, or click blank then click option'
A5
BNone
C0
D-5
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0 or None disables the bulkhead limit.
Negative numbers cause configuration errors.
4fill in blank
hard

Fill both blanks to create two bulkheads isolating different services.

Microservices
payment_bulkhead = Bulkhead(max_concurrent_calls=[1])
order_bulkhead = Bulkhead(max_concurrent_calls=[2])
Drag options to blanks, or click blank then click option'
A10
B20
C5
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Setting zero disables the bulkhead effect.
Using the same limit for both services reduces isolation benefits.
5fill in blank
hard

Fill all three blanks to implement bulkhead isolation with fallback handling.

Microservices
try:
    response = bulkhead.[1](external_service_call)
except [2]:
    response = [3]()
Drag options to blanks, or click blank then click option'
Aexecute
BBulkheadFullException
Cfallback_response
Dcall
Attempts:
3 left
💡 Hint
Common Mistakes
Not catching the correct exception causes crashes.
Not providing a fallback leads to poor user experience.