Which algorithm is recommended for SSE or WebSocket workloads due to long-lived connections?

Test your Systems Design Concepts knowledge with our comprehensive quiz. Utilize flashcards and multiple choice questions to enhance your study session. Prepare thoroughly with detailed explanations for each answer and ace your examination!

Multiple Choice

Which algorithm is recommended for SSE or WebSocket workloads due to long-lived connections?

Explanation:
Long-lived connections like SSE or WebSocket keep a TCP connection open for a long time, so what matters most is how many active connections each backend is already handling. The least connections strategy directs new connections to the server with the fewest active connections, which spreads these long-lived sockets more evenly across all backends. This helps prevent any single backend from becoming a bottleneck due to many open connections, reducing delays and improving overall throughput. Round Robin just cycles through servers without regard to how many connections are already active, so one server could end up with many long-lived clients. Random doesn’t account for current load, which can create hot spots. Weighted Round Robin considers capacity but still doesn’t reflect real-time connection counts, so long-lived connections can accumulate on a busy node.

Long-lived connections like SSE or WebSocket keep a TCP connection open for a long time, so what matters most is how many active connections each backend is already handling. The least connections strategy directs new connections to the server with the fewest active connections, which spreads these long-lived sockets more evenly across all backends. This helps prevent any single backend from becoming a bottleneck due to many open connections, reducing delays and improving overall throughput.

Round Robin just cycles through servers without regard to how many connections are already active, so one server could end up with many long-lived clients. Random doesn’t account for current load, which can create hot spots. Weighted Round Robin considers capacity but still doesn’t reflect real-time connection counts, so long-lived connections can accumulate on a busy node.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy