Process Flow - WebSocket proxying
Client sends WebSocket request
Nginx receives request
Check if request is WebSocket upgrade
Set proxy headers
Proxy to backend WebSocket server
Backend responds and upgrades
Nginx tunnels data between client and backend
Connection open
Nginx checks if the incoming request wants to upgrade to WebSocket, sets special headers, then proxies the connection to the backend WebSocket server, allowing data to flow between client and server.