0
0
Microservicessystem_design~10 mins

Services and networking 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 specify the communication protocol used between microservices.

Microservices
service_client.connect(protocol='[1]')
Drag options to blanks, or click blank then click option'
AHTTP
BFTP
CSMTP
DSSH
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing FTP or SMTP which are not typical for microservice communication.
Using SSH which is for secure shell access, not service communication.
2fill in blank
medium

Complete the code to define the service discovery method in a microservices architecture.

Microservices
discovery_client = ServiceDiscovery(method='[1]')
Drag options to blanks, or click blank then click option'
ADNS
Bmanual
Cbroadcast
Dstatic
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing manual or static which require fixed configurations.
Broadcast is not commonly used in microservices for discovery.
3fill in blank
hard

Fix the error in the load balancer configuration to distribute requests evenly.

Microservices
load_balancer.set_strategy('[1]')
Drag options to blanks, or click blank then click option'
Aleast_connections
Brandom
Cround_robin
Dfirst_available
Attempts:
3 left
💡 Hint
Common Mistakes
Using random which can cause uneven load.
Choosing first_available which always picks the first server.
4fill in blank
hard

Fill both blanks to complete the network policy that allows traffic only from trusted services.

Microservices
network_policy = [1](source='trusted_services', action='[2]')
Drag options to blanks, or click blank then click option'
AFirewallRule
Ballow
Cdeny
DAccessControl
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'deny' which blocks traffic instead of allowing it.
Using AccessControl which is not the correct class here.
5fill in blank
hard

Fill all three blanks to define a service mesh configuration with secure communication and retries.

Microservices
service_mesh = ServiceMesh(enable_tls=[1], retry_policy='[2]', circuit_breaker=[3])
Drag options to blanks, or click blank then click option'
ATrue
Bexponential_backoff
CFalse
Dsimple
Attempts:
3 left
💡 Hint
Common Mistakes
Disabling TLS which reduces security.
Using simple retry policy which is less effective.