net.RPCDoSAnalyticsMaxRPCs

net.RPCDoSAnalyticsMaxRPCs

#Overview

name: net.RPCDoSAnalyticsMaxRPCs

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of net.RPCDoSAnalyticsMaxRPCs is to control the number of Remote Procedure Calls (RPCs) included in the RPC Denial of Service (DoS) analytics system. It specifically sets the maximum number of RPCs to be tracked and analyzed, ranked by their rate per second.

This setting variable is primarily used by the networking and analytics subsystems of Unreal Engine. Based on the callsites, it’s specifically utilized in the RPCDoSDetectionAnalytics module, which is part of the Engine’s runtime.

The value of this variable is set as a console variable with a default value of 20. It can be modified at runtime through the console or configuration files.

The associated variable CVarRPCDoSAnalyticsMaxRPCs directly interacts with net.RPCDoSAnalyticsMaxRPCs. It’s an instance of TAutoConsoleVariable that wraps the console variable and provides an interface for accessing its value.

Developers must be aware that this variable affects the granularity of RPC DoS detection. Setting it too low might miss important RPC patterns, while setting it too high could increase memory usage and processing overhead.

Best practices when using this variable include:

  1. Adjusting it based on the specific needs of your game’s networking requirements.
  2. Monitoring performance impact when increasing the value.
  3. Using it in conjunction with other DoS prevention mechanisms for comprehensive protection.

Regarding the associated variable CVarRPCDoSAnalyticsMaxRPCs:

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Analytics/RPCDoSDetectionAnalytics.cpp:22

Scope: file

Source code excerpt:


TAutoConsoleVariable<int32> CVarRPCDoSAnalyticsMaxRPCs(
	TEXT("net.RPCDoSAnalyticsMaxRPCs"), 20,
	TEXT("The top 'x' number of RPC's to include in RPC DoS analytics, ranked by RPC rate per Second."));


namespace UE
{
	namespace Net

#Associated Variable and Callsites

This variable is associated with another variable named CVarRPCDoSAnalyticsMaxRPCs. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Analytics/RPCDoSDetectionAnalytics.cpp:21

Scope: file

Source code excerpt:

 */

TAutoConsoleVariable<int32> CVarRPCDoSAnalyticsMaxRPCs(
	TEXT("net.RPCDoSAnalyticsMaxRPCs"), 20,
	TEXT("The top 'x' number of RPC's to include in RPC DoS analytics, ranked by RPC rate per Second."));


namespace UE
{

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Analytics/RPCDoSDetectionAnalytics.cpp:58

Scope (from outer to inner):

file
function     FRPCDoSAnalyticsVars::FRPCDoSAnalyticsVars

Source code excerpt:

FRPCDoSAnalyticsVars::FRPCDoSAnalyticsVars()
	: RPCTrackingAnalytics()
	, MaxRPCAnalytics(CVarRPCDoSAnalyticsMaxRPCs.GetValueOnAnyThread())
{
}

bool FRPCDoSAnalyticsVars::operator == (const FRPCDoSAnalyticsVars& A) const
{
	return PlayerIP == A.PlayerIP && PlayerUID == A.PlayerUID && MaxSeverityIndex == A.MaxSeverityIndex &&