0
0
Microservicessystem_design~10 mins

Why case studies illustrate practical decisions in Microservices - Test Your Understanding

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

Complete the code to define a microservice that handles user data.

Microservices
def get_user_data(user_id):
    return database.[1](user_id)
Drag options to blanks, or click blank then click option'
Afetch
Bquery
Cdelete
Dupdate
Attempts:
3 left
💡 Hint
Common Mistakes
Using methods that modify or delete data instead of retrieving it.
2fill in blank
medium

Complete the code to send a request from one microservice to another.

Microservices
response = service_client.[1]('GET', '/orders')
Drag options to blanks, or click blank then click option'
Asend
Bfetch
Cpost
Drequest
Attempts:
3 left
💡 Hint
Common Mistakes
Using methods that are not standard HTTP request methods.
3fill in blank
hard

Fix the error in the microservice configuration to enable service discovery.

Microservices
service_registry = [1]('http://registry.local')
Drag options to blanks, or click blank then click option'
AServiceRegistry
BDiscoveryService
CServiceDiscovery
DRegistryService
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing service discovery with service registry classes.
4fill in blank
hard

Fill both blanks to implement a circuit breaker pattern in microservices.

Microservices
circuit_breaker = CircuitBreaker([1]=5, [2]=60)
Drag options to blanks, or click blank then click option'
Afailure_threshold
Btimeout
Cretry_limit
Dreset_timeout
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing retry limits with failure thresholds or timeouts.
5fill in blank
hard

Fill all three blanks to create a load balancer configuration for microservices.

Microservices
load_balancer = LoadBalancer(strategy=[1], max_connections=[2], health_check=[3])
Drag options to blanks, or click blank then click option'
A'round_robin'
B100
CTrue
D'least_connections'
Attempts:
3 left
💡 Hint
Common Mistakes
Using string values where numbers or booleans are expected.