# Overview
Short polling is... #flashcard
A polling approach where the client regularly polls the server for updates with something like a HTTP request.
<!--ID: 1751507777115-->
# Key Considerations for Short Polling #flashcard
To make short polling for efficient, you can use set an HTTP keep-alive, which is longer than the polling interval. This means the TCP connection only needs to be established once, thus minimizing overhead.
<!--ID: 1751507777117-->
# Pros of Short Polling #flashcard
- Simple to implement
- [[stateless]]
- No special infrastructure needed
- Works with any standard networking infrastructure
- Doesn't take much time to explain
<!--ID: 1751507777119-->
# Cons of Short Polling #flashcard
- Higher latency than other methods. Updates might be delayed as long as the polling interval + the time it takes to process the request
- Limited update frequency
- More bandwidth usage
- Can be resource-intensive with many clients, establishing new connections, etc.
<!--ID: 1751507777122-->
# Use Cases
- Appropriate when the window where you need updates is short
- [[Design a Coding Platform]]
# Related Topics
---
Items to discuss when using short polling in a system design interview: #flashcard
- Most common objection from interviewers is either that it's too slow or that it's not efficient
- Discuss why the polling frequency you've chosen is appropriate and sufficient for the problem
- Discuss how you can reduce the overhead.
- One way to do this is to take advantage of HTTP keep-alive connections. Setting an HTTP keep-alive which is longer than the polling interval will mean that, in most cases, you'll only need to establish a TCP connection once which minimizes some of the setup and teardown overhead.
<!--ID: 1752427993559-->
---