📜 ⬆️ ⬇️

Developers can now use Valve's Network API for their games on Steam

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


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:


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:


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.

Source: https://habr.com/ru/post/443782/


All Articles