0
0
HLDsystem_design~10 mins

WebSocket for real-time communication in HLD - 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 protocol used for real-time communication.

HLD
The client initiates a connection using the [1] protocol.
Drag options to blanks, or click blank then click option'
AWebSocket
BHTTP
CFTP
DSMTP
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing HTTP which is request-response only.
Selecting FTP or SMTP which are unrelated to real-time web communication.
2fill in blank
medium

Complete the code to identify the server component that handles WebSocket connections.

HLD
The [1] manages incoming WebSocket connections and message routing.
Drag options to blanks, or click blank then click option'
AWebSocket server
BLoad balancer
CDatabase server
DCache server
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing load balancer with connection handler.
Selecting database or cache servers which do not manage WebSocket connections.
3fill in blank
hard

Fix the error in the connection upgrade process code snippet.

HLD
HTTP request header must include 'Upgrade: [1]' to switch protocols.
Drag options to blanks, or click blank then click option'
AHTTP/2
BTLS
CWebSocket
DFTP
Attempts:
3 left
💡 Hint
Common Mistakes
Using HTTP/2 which is a different protocol.
Using TLS or FTP which are unrelated to WebSocket upgrade.
4fill in blank
hard

Fill both blanks to complete the message flow in WebSocket communication.

HLD
Client sends a [1] frame, and server responds with a [2] frame.
Drag options to blanks, or click blank then click option'
Atext
Bbinary
Cpong
Dping
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'ping' and 'pong' frames.
Using 'text' or 'binary' frames for heartbeat messages.
5fill in blank
hard

Fill all three blanks to complete the architecture components for scalable WebSocket service.

HLD
Use a [1] to distribute connections, a [2] to maintain session state, and a [3] to handle message broadcasting.
Drag options to blanks, or click blank then click option'
Aload balancer
Bsession store
Cmessage broker
Ddatabase
Attempts:
3 left
💡 Hint
Common Mistakes
Using database instead of message broker for broadcasting.
Confusing session store with load balancer.