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

    Over the past few years, Valve has worked 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 games from DoS attacks, reduces 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 players to be protected from attacks, provides reliable 100% NAT passage and improved connection.
    • Tools for instantly evaluating ping between two arbitrary nodes without sending packets.
    • High-quality connection via reliable UDP protocol with end-to-end encryption.

    Valve Network Access


    Valve has relay nodes deployed at 30 network connection points around the world with a bandwidth of several terabits. There are at least a few advantages of the network.

    Firstly, traffic relaying 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 game process only if his attack is capable of overloading several data centers at once.

    Secondly, customers will be able to choose a route that transfers them as soon as possible from a public Internet connection to dedicated ones. Valve guarantees optimal routing on its network backbone, as they work with more than 2,500 Internet providers. In addition, delay-sensitive game traffic takes precedence over content downloads over HTTP. This is possible because the share of game traffic in the used bandwidth is relatively small. On a network backbone, a sudden surge in non-game traffic will not affect game quality.

    The cherry on the cake is to reduce ping! Valve protocol gives the client the opportunity to choose the route along which requests will be root. The client takes into account each relay connection point, 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 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.
    • For 25% of players, ping time decreased by 10 or more ms.
    • For 10% of players, ping time decreased by 40 or more ms.

    The scope of improvements varies by region.



    Ping Evaluation Tools


    Interface ISteamNetworkingUtilsfeatures 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 these two sets of coordinates, Valve can very accurately estimate the ping time between two arbitrary nodes without sending packets. This feature is extremely useful when selecting games and selecting 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 relaying. In your code, you send and receive messages that may be less or more than 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 segments of reliable messages lost due to packet loss.
    • Encryption and authentication. Security is not a secondary concern for a modern online game: vulnerability can ruin the impression of the game. Proper encryption is a real challenge. Valve was guided by modern standards for reliable broadcasts and applied them to untrustworthy messages used by games. Built-in encryption protects data from interception by default. Protection against hijacked attacks requires that a trusted third party give access to the certificate or shared secret. Steam is such for its games: for an attacker to be able to intercept or modify packets, he must be inside the game process, where the VAC system detects it.
    • The core features of this API are also available in the open source version . Valve wants developers to take full advantage of the API , and this would not be possible without the assurance 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 performance of games on the network for Steam partners. So far, Valve has only improved the operation of peer-to-peer networks, but in addition they plan to give partners access to the developments used for their dedicated servers.

    Also popular now: