This document is about: SERVER 5
SWITCH TO

This page is a work in progress and could be pending updates.

Server Config Settings

Instance

Multiple instances are supported. Each instance has its own node in the config file.

SettingTypePhoton DefaultConfig DefaultDescription
AckSendingDelayMillisecondsLong5How long the server waits before sending an ACK, allowing it to piggyback onto a data packet. Doesn't increase latency.
AOInitialQueueSizeLong
AOMaxConsecutiveOperationsLong
AppDataInactivityTimeoutLongA timeout for the application (managed code) if it doesn't get any data, as opposed to low-level (native code) keep-alive pings.
DatagramSocketAllocatorPoolSizeShortNumber of datagram sockets kept in the pool for later reuse. Trade-off of speed vs resources.
DatagramSocketMaxConsecutiveOperationsShort
DatagramSocketMaxPooledBuffersShort
DataSendingDelayMillisecondsLong5How long the server waits to accumulate more data before sending. Larger = fewer datagrams but higher latency.
DefaultPacketThrottleLong
DisplayNameStringLoadBalancing (MyCloud)Optional display name for this instance, shown in Photon Control.
DumpTypeFull, Maxi, MiniFullType of crash dumps: "Full", "Maxi", or "Mini". Less info but less disk space from first to last.
EnableInstanceCountersBool
EnablePerformanceCountersBoolDetermines whether performance counters are enabled. Requires suitable privileges for shared memory segment creation.
EnableTotalCountersBool
EncTypesAllowedALL|CLEAR|CBC|GCMALL
ENETBufferAllocatorPoolSizeLongNumber of ENet buffers kept in pool for reuse. Trade-off of speed vs resources.
LogFileLocationStringSets the path for logfiles. Can be absolute or relative to PhotonSocketServer.exe.
LogFileNameString
LoggingEnabledBool
LogUnimportantExceptionsBool
MaxDumpsToAttemptToProduceLong10
MaxDumpsToProduceLong10Maximum number of dump files written. New ones can be written if old files are moved/deleted.
MaximumRetransmitTimeoutLong0Maximum retransmission time. 0 = feature is turned off.
MaximumTimeoutLong3000030000Maximum time before an ENet peer's lack of response causes a timeout disconnect. Determined dynamically per peer based on RTT.
MaxInboundQueuedDataPerPeerLong
MaxMessageSizeLong512000Max bytes for a UDP, TCP or WebSocket message. Exceeding disconnects the client. Can be overridden per listener.
MaxQueuedDataPerPeerLong163840512000Max reliable data a peer can queue. Once exceeded, future reliable sends return an error code.
MinimumRetransmitTimeoutLong200Minimum retransmission time. Low-latency peers may be delayed. Reduces server load.
MinimumTimeoutLong50005000Minimum time before an ENet peer timeout disconnect. Determined dynamically per peer based on RTT.
NameStringInstance name.
PacketThrottleAccelerationLong
PacketThrottleCounterLong
PacketThrottleDecelerationLong
PacketThrottleEnabledBool
PacketThrottleScaleLong
PacketThrottlIntervalLong
PacketTraceRingBufferSizeLong
PeerMaxPooledBuffersLong
PerPeerMaxReliableDataInTransitLong1638451200Max reliable data in-flight (bytes) before queuing. Once reached, future reliable data is queued.
PerPeerTransmitRateLimitKBSecLong256256Max data (reliable + unreliable) per second in KB. When reached, reliable data queued, unreliable dropped.
PerPeerTransmitRatePeriodMillisecondsLong200How often the transmit rate limit is checked. Smaller = smoother; larger = less resources.
PingIntervalMillisecondsLongHow often a ping is sent when no data flows. Larger = less server load. Defaults to ENet standard 500ms.
ProduceDumpsBoolTRUEEnable or disable crash dump file creation.
ReportOnJobBoolDetermines if Photon is running inside a Win32 job object and reports on imposed limits.
RoundTripThrottleMultiplierLong
RTTACKAdjustmentTimeoutLong0When set, uses last retransmit-timeout (fast resend) instead of ×2 if peer received data during this period. 0 = off.
SchemaValidationFailureIsFatalBoolSet to false to prevent schema validation errors being fatal during startup.
ShutdownTimeoutLong60000Timeout (ms) before forcibly killing the Photon process on shutdown. Minimum value is 60000.
StreamSocketAllocatorPoolSizeShortNumber of TCP sockets kept in pool for reuse. Trade-off of speed vs resources.
StreamSocketMaxConsecutiveOperationsShort
StreamSocketMaxPooledBuffersShort
TCPBufferAllocatorPoolSizeLongNumber of TCP data transfer buffers kept in pool for reuse.
TCPBufferSizeLongSize of buffer for TCP data transfer. Doesn't restrict message size. Ideally slightly more than average message size.
UnreliableQueueTimeoutLong
UnsequencedFragmentsBoolFALSEFragmented messages for non-reliable data will be sent as Unsequenced.
ValidateSchemaBoolSet to false to prevent schema validation errors being detected at startup.

IOPool

Handles all I/O operations: datagram sending/reception, TCP read completions, etc. Can also handle ENet protocol operations if ENetThreadPool\OnlyDispatchTimers is "true".

SettingTypePhoton DefaultConfig DefaultDescription
NumThreadsShort4Number of threads for socket I/O. 4–8 is good. 0 = 2× CPU cores.
NumEntriesPerCallShort

ENetThreadPool

Used for all ENet protocol operations: deblocking inbound datagrams, ACK handling, retransmission, and ping generation.

SettingTypePhoton DefaultConfig DefaultDescription
DispatchTimeoutLong100If a work item isn't picked up within this many ms, a new thread may be started.
InitialThreadsShort8Number of threads the pool starts with.
MaxDormantThreadsShort8Max idle threads before excess are shut down.
MaxThreadsShort8Max threads. If Initial=Min=Max, pool is static (more efficient).
MinThreadsShort8Minimum threads in the pool.
OnlyDispatchTimersBoolFALSEIf true, only ENet timer operations use this pool. If false, all ENet protocol operations are dispatched here.
PoolMaintPeriodLong5000How often (ms) the pool checks on and shuts down dormant threads.

Runtime

Defines the Photon Runtime behavior.

SettingTypePhoton DefaultConfig DefaultDescription
ApplicationRootDirectoryString
AssemblyStringPhotonHostRuntime, Culture=neutralPhoton Runtime assembly. MUST be signed by Exit Games key. PublicKeyToken must NOT be specified.
CLRBaseDirectoryString
CLRVersionStringLoad a specific .NET runtime version (e.g. "v4.0" or "v2.0"). By default uses latest.
EnableMDABoolFALSEEnables managed debugging assistants. Configure with a .mda.config file.
GCConcurrentBoolTRUE
GCServerBoolTRUE
GCTrimmingBoolTRUE
NoiseyManagedFailuresBool
TypeStringPhotonHostRuntime .PhotonDomainManagerDomain manager type. MUST derive from IPhotonDomainManager.
UnhandledExceptionPolicyIgnore, TerminateProcessTerminateProcessTerminateProcessReloadAppDomain value is OBSOLETE.

Applications

SettingTypePhoton DefaultConfig DefaultDescription
DefaultStringNameServerDefault application if none specified.
PassUnknownAppsToDefaultAppBoolFALSEIf true, unknown app names use default. If false, fatal error terminating the connection.

Application

SettingTypePhoton DefaultConfig DefaultDescription
ApplicationRootDirectoryString
AssemblyStringAssembly to use. Can include full specification with PublicKeyToken.
BaseDirectoryStringShould contain a "bin" folder with all assemblies and config files.
NameStringArbitrary name for dispatch.
StartTimeoutMillisecondsLong0Photon shuts down if app doesn't start in time. 0 = no timeout.
StopTimeoutMillisecondsLong0Photon shuts down if app doesn't stop in time. 0 = no timeout.
TypeStringType loaded as the application. MUST derive from IPhotonApplication.

TCPListener

SettingTypePhoton DefaultConfig DefaultDescription
AppDataInactivityTimeoutLongTimeout for managed code if no data received (vs native keep-alive pings).
CertificatePathString
CertificateValidationExceptionsString
CipherListString
CounterNameString
CountersBool
CustomConnectMessageIsRequiredBoolFALSEIf true, a custom prefix/suffix is required on each Connect message.
CustomConnectMessagePrefixStringString ignored if sent as prefix of a client's connect message.
CustomConnectMessageSuffixStringString ignored if sent as suffix of a client's connect message.
DefaultApplicationStringDefault app for this listener if client connects to an unloaded app. Overrides global Default.
DefaultDomainString
DisabledBoolFALSE
DisableNagleBoolTRUETRUEIf true, Nagle is disabled; outbound TCP data sent immediately. May improve latency.
FlowControlMaxQueuedBytesLong
InactivityTimeoutLong50005000Time (ms) between data receipts before connection is aborted. 0 = disabled.
IPAddressString0.0.0.0IP to listen on. 0.0.0.0 = all interfaces.
IPAddressIPv6String::IPv6 address to listen on. :: = all interfaces.
ListenBacklogShort150Size of listen backlog queue. Affects simultaneous connection establishment, not active connections.
LoggingEnabledBoolTRUE
MaxInboundMessageSizeLongMax inbound message bytes. Default is MaxMessageSize.
MaxMessageSizeLong
MaxOutboundMessageSizeLongMax outbound message bytes. Default is MaxMessageSize.
MaxProtocolVersionString
MessageRateLimitLong
MessageRateLimitPeriodLong
MinProtocolVersionString
OverrideApplicationStringOverride application for this connector. Client selection is ignored.
ParentCountersString
PolicyFile
PortUShort45304530Port to listen on.
RateLimitKBSecLong
RateLimitMessageSecLong
RateLimitPeriodLong
RateLimitRateShort
RecvBufferSizeLong0TCP recv buffer / window size. 0 = OS default.
RootCertificatesString
SecureBool
SendBufferSizeLong0TCP send buffer size. 0 = OS default.
SupportClearTextConnectionsBool
ValidClientCertificateDomainsString

ServerCertificate (TCP)

SettingTypePhoton DefaultConfig DefaultDescription
CertificateString
KeyString
PathString

UDPListener

To define a list of UDP/ENet listeners.

SettingTypePhoton DefaultConfig DefaultDescription
DefaultApplicationStringSee TCPListener.
DisabledBoolFALSE
EncTypesAllowedALL|CLEAR|CBC|GCMALL
IPAddressString0.0.0.00.0.0.0IP to listen on. 0.0.0.0 = all interfaces.
IPAddressIPv6String::IPv6 address. :: = all interfaces.
ListenBacklogShort500See TCPListener.
MaxInboundMessageSizeLongSee TCPListener.
MaxMessageSizeLong
MaxOutboundMessageSizeLongSee TCPListener.
NameString
OverrideApplicationStringSee TCPListener.
PacketTraceRingBufferSizeLong
PerPeerMaxReliableDataInTransitLong
PerPeerTransmitRateLimitKBSecLong
PortUShort50555055Port to listen on.
RecvBufferSizeLong
SendBufferSizeLong
TraceAllPeersBoolFALSE
TraceEnabledBoolFALSE
TracePeerTimeoutsBool

PolicyFileListener

Same as TCPListener plus additional settings.

SettingTypePhoton DefaultConfig DefaultDescription
AppDataInactivityTimeoutLongTimeout for managed code if no data received.
CertificatePathString
CertificateValidationExceptionsString
CipherListString
CounterNameString
CountersBool
CustomConnectMessageIsRequiredBoolFALSEIf true, custom prefix/suffix required on Connect.
CustomConnectMessagePrefixStringSee TCPListener.
CustomConnectMessageSuffixStringSee TCPListener.
DefaultApplicationStringSee TCPListener.
DefaultDomainString
DisabledBoolFALSE
DisableNagleBoolTRUETRUESee TCPListener.
FlowControlMaxQueuedBytesLong
InactivityTimeoutLong50005000See TCPListener.
IPAddressString0.0.0.0See TCPListener.
IPAddressIPv6String::See TCPListener.
ListenBacklogShort150See TCPListener.
LoggingEnabledBoolTRUE
MaxInboundMessageSizeLongSee TCPListener.
MaxMessageSizeLong
MaxOutboundMessageSizeLongSee TCPListener.
MaxProtocolVersionString
MinProtocolVersionString
OverrideApplicationStringSee TCPListener.
ParentCountersString
PolicyApplicationString
PolicyFile
PortUShort45304530Port to listen on.
RateLimitKBSecLong
RateLimitPeriodLong
RateLimitRateShort
RecvBufferSizeLong0See TCPListener.
RootCertificatesString
SecureBool
SendBufferSizeLong0See TCPListener.
SupportClearTextConnectionsBool
ValidClientCertificateDomainsString

ServerCertificate (Policy)

SettingTypePhoton DefaultConfig DefaultDescription
CertificateString
KeyString
PathString

S2S

SettingTypePhoton DefaultConfig DefaultDescription
AppDataInactivityTimeoutLongTimeout for managed code if no data received.
CertificateString
CertificatePathStringSee TCPListener.
CipherListStringSee TCPListener.
ConnectTimeoutLong
DisableNagleBoolTRUESee TCPListener.
FlowControlMaxQueuedBytesLongSee TCPListener.
InactivityTimeoutLongSee UDPListener.
KeyString
LoggingEnabledBoolTRUESee TCPListener.
MaxInboundMessageSizeLongSee UDPListener.
MaxMessageSizeLongSee UDPListener.
MaxOutboundMessageSizeLongSee UDPListener.
MaxProtocolVersionString
MinProtocolVersionString
PasswordString
PingFrequencyShort2500How often a ping is sent when no data is flowing.
RateLimitKBSecLongSee TCPListener.
RateLimitPeriodLongSee TCPListener.
RateLimitRateShortSee TCPListener.
RecvBufferSizeLongSee UDPListener.
RootCertificatesStringSee TCPListener.
SecureBoolSee TCPListener.
SendBufferSizeLongSee UDPListener.
WriteCompletionTimeoutLong

SecurePorts / SecurePort

SettingTypePhoton DefaultConfig DefaultDescription
PortUShort

HTTPListener

SettingTypePhoton DefaultConfig DefaultDescription
AppDataInactivityTimeoutLongTimeout for managed code if no data received.
CertificatePathStringSee TCPListener.
CertificateValidationExceptionsStringSee TCPListener.
CipherListStringSee TCPListener.
CounterNameStringSee TCPListener.
CountersBoolSee TCPListener.
CustomConnectMessagePrefixStringSee TCPListener.
CustomConnectMessageSuffixStringSee TCPListener.
DefaultApplicationString
DefaultDomainStringSee TCPListener.
DisabledBoolFALSESee UDPListener.
DisableNagleBoolSee TCPListener.
FlowControlMaxQueuedBytesLongSee TCPListener.
InactivityTimeoutLong1000010000See UDPListener.
IPAddressString0.0.0.00.0.0.0See UDPListener.
IPAddressIPv6String::See UDPListener.
ListenBacklogShortSee UDPListener.
LoggingEnabledBoolSee TCPListener.
MaxHeadersLong
MaxHeadersLengthLong
MaxInboundMessageSizeLongSee TCPListener.
MaxMessageSizeLong
MaxOutboundMessageSizeLongSee TCPListener.
MaxProtocolVersionString
MaxUriLengthLong
MinProtocolVersionStringSee TCPListener.
NoCacheBool
OverrideApplicationStringSee TCPListener.
ParentCountersStringSee TCPListener.
PeerTypeSimple, Reliable, WebSocket
PermittedOriginsString
PingBool
PolicyFileString
PortUShort9091See UDPListener.
RateLimitKBSecLongSee TCPListener.
RateLimitPeriodLongSee TCPListener.
RateLimitRateShortSee TCPListener.
RecvBufferSizeLongSee UDPListener.
RouteCountersBool
SecureBoolFALSESee TCPListener.
SendBufferSizeLongSee UDPListener.
SupportClearTextConnectionsBoolSee TCPListener.
UrlString
ValidClientCertificateDomainsStringSee TCPListener.
WebHookBool

ServerCertificate (HTTP)

SettingTypePhoton DefaultConfig DefaultDescription
CertificateString
KeyString
PathString

StandardHeaders (HTTP)

SettingTypePhoton DefaultConfig DefaultDescription
NameString
ValueString

Routing / Route

SettingTypePhoton DefaultConfig DefaultDescription
AppDataInactivityTimeoutLongTimeout for managed code if no data received.
CounterNameString
CountersBool
DefaultApplicationString
DisableNagleBoolSee TCPListener.
InactivityTimeoutLong
MaxInboundMessageSizeLong
MaxMessageSizeLong
MaxOutboundMessageSizeLong
NameString
NoCacheBool
OverrideApplicationString
ParentCountersString
PeerTypeSimple, Reliable, WebSocket
PermittedOriginsString
PingBool
PingEveryLongOnly WebSockets.
SubProtocolsStringOnly WebSockets.
UrlString
WebHookBool

StandardHeaders (Route)

SettingTypePhoton DefaultConfig DefaultDescription
NameString
ValueString
Back to top