0
0
Microservicessystem_design~10 mins

Loose coupling 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 show a key benefit of loose coupling in microservices.

Microservices
Microservices communicate asynchronously using [1] to reduce dependencies.
Drag options to blanks, or click blank then click option'
Amessage queues
Bshared databases
Cdirect database calls
Dmonolithic calls
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing shared databases causes tight coupling.
Direct database calls create dependencies.
2fill in blank
medium

Complete the code to implement loose coupling by using {{BLANK_1}} for service discovery.

Microservices
Services register themselves with a [1] to enable dynamic lookup instead of hardcoded addresses.
Drag options to blanks, or click blank then click option'
Ashared file system
Bstatic IP list
Cservice registry
Ddirect URL
Attempts:
3 left
💡 Hint
Common Mistakes
Using static IPs leads to tight coupling.
Shared file systems are not typical for service discovery.
3fill in blank
hard

Complete the code to identify the communication style in {{BLANK_1}} causing tight coupling.

Microservices
Service A calls Service B directly via [1], causing tight coupling.
Drag options to blanks, or click blank then click option'
Amessage queues
Bsynchronous HTTP calls
Cevent-driven messaging
Dasynchronous events
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing asynchronous methods here is correct for loose coupling, but the question asks to identify the tight coupling method.
4fill in blank
hard

Fill both blanks to implement loose coupling using {{BLANK_1}} and {{BLANK_2}}.

Microservices
Use [1] to decouple services and [2] to handle failures gracefully.
Drag options to blanks, or click blank then click option'
Amessage queues
Bcircuit breakers
Cdirect API calls
Dshared databases
Attempts:
3 left
💡 Hint
Common Mistakes
Using direct API calls increases coupling.
Shared databases create tight dependencies.
5fill in blank
hard

Fill all three blanks to design a loosely coupled microservice interaction: {{BLANK_1}} for communication, {{BLANK_2}} for service discovery, and {{BLANK_3}} for fault tolerance.

Microservices
Implement [1] to send messages, use [2] to find services dynamically, and apply [3] to prevent cascading failures.
Drag options to blanks, or click blank then click option'
Amessage queues
Bservice registry
Ccircuit breakers
Ddirect HTTP calls
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing direct HTTP calls increases tight coupling.
Mixing up service registry and circuit breakers.