For the past few years, Valve has been working to improve the quality of multiplayer in Dota 2 and CS: GO by relaying traffic and transferring it to its network backbone. This allows you to protect the game from DoS-attacks, lowers ping and improves the quality of the connection. In the Steamworks SDK version 1.44,
Valve rolled out a new API that provides access to this service to all Steam partners.

Valve published a
special post . The API includes:
- Access to the Valve network, which allows you to protect players from attacks, provides reliable one hundred percent NAT traversal and improved connection.
- Tools for instant evaluation of ping between two arbitrary nodes without sending packets.
- High-quality connection over a reliable UDP-protocol with end-to-end encryption.
Access to the Valve network
Valve has relay nodes deployed at 30 network connection points around the world with a bandwidth of several terabits. There are at least several advantages of the network.
')
First, traffic relay is anonymous and protects game servers and users from DoS attacks. In addition, since routing decisions are made dynamically by the client, if the relay node becomes unavailable, the client can switch to another node within a few seconds or, if necessary, to another connection point. An attacker will be able to disrupt the gameplay only if his attack is able to overload several data centers at once.
Secondly, customers will be able to choose the route, transferring them from the public Internet connection to the dedicated ones as soon as possible. On its network backbone, Valve guarantees optimal routing, as they cooperate with more than 2500 Internet service providers. In addition, latency-sensitive gaming traffic takes precedence over HTTP content downloads. This is possible because the share of gaming traffic in the bandwidth used is relatively small. On a network backbone, a sudden surge of non-game traffic will not affect the quality of the game.
Cherry on the cake is to reduce ping! The Valve protocol gives the client the opportunity to choose the route on which requests will rush. The client takes into account each connection point of the relay, determines the end-to-end delay on the route, and then selects the route with the least delay.
If you allow customers to choose a route, their connection will be better than the default surprisingly often. After analyzing 16 million connections of unique client IP addresses to dedicated servers in Valve data centers, they obtained the following results:
- Ping time has decreased in 43% of players.
- In 25% of the players, the ping time decreased by 10 ms or more.
- In 10% of players, the ping time decreased by 40 ms or more.
The scope of improvements varies by region.

Ping Assessment Tools
The functions of the
ISteamNetworkingUtils
interface include ping assessment tools based on a relay network. By measuring the ping time to different relay nodes, we generate coordinates that describe the location of the host on the Internet. Using two such sets of coordinates, Valve can quite accurately estimate the ping time between two arbitrary nodes without sending packets. This feature is extremely useful in selecting games and choosing a peer-to-peer network node.
Open source end-to-end protocol
SteamNetworkingSockets
not only provides access to functions based on the Valve relay network and the network backbone for Steam partners, it is also a universal transport library for games, offering the following features:
- Fragmentation, assembly and retransmission. In your code, you send and receive messages that may be less or more network packets. To increase efficiency, the protocol combines several small messages into one packet, splits large messages into several packets, collects them on the receiving side, and retransmits reliable message segments lost due to packet loss.
- Encryption and authentication. Security is not a secondary task for a modern online game: vulnerability can spoil the impression of the game. Proper encryption is a real challenge. Valve was guided by modern standards for reliable broadcasts and applied them to unreliable messages used by games. Built-in default encryption protects data from interception. Protection against interception attacks requires that a trusted third party provide access to a certificate or shared secret. Steam is such for its games: for an attacker to intercept or alter packets, it must be inside the gameplay, where the VAC system will detect it.
- The basic functions of this API are also available in the open source version . Valve wants developers to fully enjoy the benefits of the API , and it would be impossible without the certainty that access to the source code is free.
That's not all
This is the first of a series of updates aimed at improving the work of games on the network for partners Steam. So far, Valve has only improved the performance of peer-to-peer networks, but beyond that, they plan to give partners access to the developments used for their dedicated servers.