Networking
Latency
http://www.gamedonia.com/blog/lag-compensation-techniques-for-multiplayer-games-in-realtime
Realtime is normally when the latency is very low, ~10ms -> 30ms
Punch-Through
STUN
Serverside
Packet/Datagram
Data sent to and from the server
Normally contains:
Header
Payload
TCP (Transmission Control Protocol)
More Header/Overhead
Guaranteed message delivery (ordering)
UDP (User Datagram Protocol)
Pros
Fastest option
Client handles reliability
Best protocol for realtime multiplayer
Cons
Not supported on WebGL
Ordering not enforced
P2P
Server Authoritative
LAN
Normally you have a Dedicated server on-site or a Host server (One of the clients acts a server and client).
Matchmaking
Load Balancing
Sticky load balancing
Use NodeJS Cluster and Redis
References
Valve: https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking