fivenines

Practice / target 80%

Event Loop Practice

01

A socket is readable, but the input buffer still does not contain a full RESP command. What should the event loop do next?

intro

Scenario

The event loop's read callback has just drained a socket and found only half of a RESP command in the buffer.

02

Why does one long command increase latency for unrelated clients in a mostly single-threaded command model?

intro

Scenario

A monitoring dashboard shows latency spikes for all clients whenever one analytics client runs a huge scan.

03

Which maintenance tasks belong in time events rather than command handlers?

applied

Scenario

You are deciding where periodic work should live in a reactor-style server with file events and time events.

04

Compare thread-per-client and event-loop designs for a shared in-memory keyspace. Where does each design pay complexity?

applied

Scenario

Your team is debating thread-per-client versus a single-threaded reactor for a new in-memory store.

05

What is the difference between file descriptor readiness and application-level progress?

advanced

Scenario

A junior engineer assumes that epoll reporting a socket as ready means a command is ready to execute.

Ready to build

Design the system.

Put the learned theory into real-life practice and get architectural feedback.