Engineering Decisions · Junior · Question 6 of 12

A badge shows unread notifications. They arrive a few times an hour, a one-minute delay is fine, and the hosting doesn't allow long-lived connections. What do you use?

Show the answer

Correct answer: Polling a small endpoint once a minute

Explanation

With rare events, a tolerated delay and no long-lived connections, plain polling is simple and works on any hosting. A WebSocket fits two-way, low-latency features such as chat, but it needs infrastructure that keeps connections open. Server-Sent Events fit one-way live updates like scores, yet they also rely on a long-lived connection, which this hosting rules out.

Further reading

Problem with a question

Engineering Decisions · Junior · question 6

Test yourself

Take the Engineering Decisions · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz