#Networking
11 posts tagged with this topic. ← All tags
-
DNS: the lookup chain and the TTL that affects your deploys.
How DNS resolution works step by step, what TTL means in practice, and why DNS propagation can hold up your deployments.
-
ws vs Socket.io: when the abstraction is worth the overhead.
ws is a minimal WebSocket library. Socket.io adds rooms, auto-reconnection, fallbacks, and events on top. What you get from each and when the tradeoffs make sense.
-
Scaling WebSocket servers: why sticky sessions aren't the only answer.
WebSockets make horizontal scaling harder than stateless HTTP. Sticky sessions are the simple solution. Redis pub/sub is the scalable one. When each approach is right.
-
WebSocket authentication: passing a token without cookies.
WebSocket connections don't support Authorization headers in the browser. The patterns for authenticating WebSocket connections -- query params, first-message auth, and cookie-based approaches.
-
Broadcasting to multiple clients: the pub/sub pattern.
When a WebSocket server needs to send a message to many clients, pub/sub is the natural model. How to implement channels, subscriptions, and broadcasts in Node.js.
-
Heartbeat / ping-pong: detecting dead WebSocket connections.
A WebSocket connection can appear open while the underlying TCP connection is gone. Ping-pong heartbeats detect these zombie connections before they cause problems.
-
Reconnection with exponential backoff: handling flaky networks.
WebSocket connections drop. The reconnection strategy matters: naive immediate reconnection can overload a recovering server. Exponential backoff is the standard solution.
-
Text vs binary frames: choosing the right format for real-time data.
WebSocket supports text and binary frames. When to use each, what the tradeoffs are, and how to handle both on the client and server.
-
The WebSocket handshake: what's happening in that HTTP upgrade.
WebSocket connections start as HTTP requests. The upgrade handshake is the mechanism that switches protocols. What each header means and how the switch works.
-
HTTP keeps closing. WebSocket stays open. Here's why that changes everything.
The fundamental difference between HTTP's request-response model and WebSocket's persistent connection, and why persistent connections unlock real-time applications.
-
Networking in React Native: the fetch quirks nobody documents.
React Native supports fetch and XMLHttpRequest, but there are platform-specific quirks around SSL, timeouts, and iOS App Transport Security that catch developers off guard.