In this lesson, you will learn how to stabilize your game's performance in high-player environments by fine-tuning NetDriver global configuration settings to balance simulation fidelity against limited bandwidth.
When scaling to a high number of players, the primary bottleneck is often the sheer volume of packets flooding the network buffer. If the NetDriver attempts to push more data than the client’s connection can handle, you trigger buffer bloat, leading to increased latency, jitter, and dropped updates. To mitigate this, we modify the DefaultEngine.ini file to throttle and prioritize traffic at the engine level.
Tuning Global NetDriver Parameters
The NetDriver acts as the traffic controller for your game’s network traffic. By adjusting the global packet limits, you can prevent the server from overwhelming a client's downstream bandwidth. You should configure these under the [/Script/Engine.NetDriver] section:
[/Script/Engine.NetDriver]
; Limits the total bytes per second sent to a client
MaxClientRate=100000
; Limits the total bytes per second received from a client
MaxInternetClientRate=100000
; The target frequency for network updates per second
NetServerMaxTickRate=60
MaxClientRate is the most critical setting. If your server is attempting to replicate 150KB/s to a player with a 100KB/s connection, the excess data will sit in the kernel buffer, significantly increasing round-trip time (RTT). By capping this value, you force the engine to prioritize the most important replicated properties—such as character positions—while potentially dropping less critical cosmetic updates.
Balancing Fidelity and Throughput
It is essential to understand that lowering these values impacts your game’s simulation fidelity. If you cap the rate too aggressively, the server will struggle to send updates for every AActor within a player's relevance range, leading to "teleporting" or choppy movement as the replication budget is exhausted.
When dealing with congestion, treat the NetDriver configuration as your "safety valve." Always profile your network footprint while running a simulated stress test with the maximum player count. If your packet loss increases, you must either optimize your NetUpdateFrequency settings on individual actors or lower your NetServerMaxTickRate to reduce the total number of packets processed per second.
Key Takeaway: Managing network congestion requires balancing your MaxClientRate against your game's bandwidth requirements to prevent buffer bloat while maintaining essential simulation state updates.