Polling Methods
We need polling for one reason. Only the client can send a request to the web server and ask for data. The server can't open an HTTP connection to the client's IP to push data.
Long Polling
The server doesn't respond right away. It holds the HTTP session until a change occurs. Then it responds.

Short Polling
It responds at once with whatever update it has.

Server Sent Events
The client starts one HTTP session. The server uses that session to send many responses. This is a one-way path back to the client.
The difference is in the Accept and Content-Type HTTP headers. The value should be text/event-stream. This tells both sides it's SSE based.
The responses also carry Transfer-Encoding: chunked. This means more responses can be expected.

Websockets
The client starts one HTTP session to do a handshake with the server. This opens a websocket session. After that, both sides talk using the ws protocol. This is a two-way path. They send many requests and responses over the same session.
Websockets are mostly used in chat based communication.
Websockets use their own protocol. Firewalls and load balancers often block them. They need special setup to work.

keep-alive Connection Header vs Server-Sent Events
The Connection: keep-alive HTTP header decides how the TCP layer 4 connection is handled between server and client.
It means the layer-4 TCP connection stays alive even after the HTTP session closes.
With polling, remember that any node in a cluster may handle the request. That node must fetch data from a central system, such as a database.