This document is about: SERVER 5
SWITCH TO

5.0 베타에서5.0 RC1으로 업데이트 지침서

주요 변경 사항에 대한 개요

이 지침서는 v5.0 BETA에서 v5.0 RC1로 업데이트에 대한 안내입니다. 더 이상 사용되지 않고 SDK에서 제거되는 CounterPublisher (앱, 프로젝트 및 DLLs)를 제외하고 주로 환경 구성에 대한 변경이 있습니다.

PhotonServer.config 변경 사항

  • 이제 서버 애플리케이션 인스턴스를 정의하는 데 새 구문을 사용하는 것이 좋습니다: 다음 대신에:

    XML

    <Configuration>
      <LoadBalancing>
      </LoadBalancing>
    </Configuration>
    

    아래를 사용합니다:

    XML

    <Configuration>
      <Instance Name="LoadBalancing">
      </Instance>
    </Configuration>
    

HTTP 리스너

WebSocketListeners (그리고 기타 HTTP 리스너)의 구문이 변경되었습니다.

이전 (v5 베타):

XML

    <WebSocketListeners>
      <WebSocketListener
        IPAddress="0.0.0.0"
        Port="9090"
        DisableNagle="true"
        InactivityTimeout="10000"
        OverrideApplication="Master">
      </WebSocketListener>
      <WebSocketListener
        IPAddress="0.0.0.0"
        Port="9091"
        DisableNagle="true"
        InactivityTimeout="10000"
        OverrideApplication="Game">
      </WebSocketListener>
    </WebSocketListeners>

이후 (v5):

XML

    <HTTPListeners>
      <HTTPListener
        Name="*:[PORT]::Master"
        IPAddress="0.0.0.0"
        Port="9090"
        DisableNagle="true"
        InactivityTimeout="10000">
        <Routing>
          <Route 
            Url="/+" 
            OverrideApplication="Master"
            PeerType="WebSocket"
            Counters="false" />
          <Route Url="/photon/m" Ping="true" Counters="false"/>
        </Routing>
      </HTTPListener>
      <HTTPListener
        Name="*:[PORT]::Game"
        IPAddress="0.0.0.0"
        Port="9091"
        DisableNagle="true"
        InactivityTimeout="10000"
        AppDataInactivityTimeout="15000">
        <Routing>
          <Route 
            Url="/+" 
            OverrideApplication="Game"
            PingEvery="2000" 
            PeerType="WebSocket"
            Counters="false" />
          <Route Url="/photon/g" Ping="true" Counters="false"/>
        </Routing>
      </HTTPListener>
      <HTTPListener
        Name="*:[PORT]::NameServer"
        IPAddress="0.0.0.0"
        Port="9093"
        DisableNagle="true"
        InactivityTimeout="10000"
        AppDataInactivityTimeout="15000">
        <Routing>
          <Route 
            Url="/+" 
            OverrideApplication="NameServer"
            PeerType="WebSocket"
            Counters="false" />
          <Route Url="/photon/n" Ping="true" Counters="false"/>
        </Routing>
      </HTTPListener>
    </HTTPListeners>

LoadBalancing 환경 구성 변경 사항

파일 이름 변경

첫째, 가장 큰 차이점은 이제 각 서버 애플리케이션에 이름 형식이 "{application_name}.xml.config"인 자체 구성 파일이 있다는 것입니다. 이것은 특히 기본적으로 동일한 파일 이름과 콘텐츠를 공유하던 Master 및 GameServer 애플리케이션의 경우 중요합니다:"Photon.LoadBalancing.dll.config" 이제 해당 파일의 내용이 두 개의 파일로 분할됩니다:

  • "deploy\LoadBalancing\Master\bin\Master.xml.config"
  • "deploy\LoadBalancing\GameServer\bin\GameServer.xml.config"

다음은 환경 구성 파일들의 목록입니다:

Master

이전 (v5 BETA):

"deploy\LoadBalancing\Master\bin\Photon.LoadBalancing.dll.config"

이후 (v5):

"deploy\LoadBalancing\Master\bin\Master.xml.config"

GameServer

이전 (v5 베타):

"deploy\LoadBalancing\GameServer\bin\Photon.LoadBalancing.dll.config"

이후 (v5):

"deploy\LoadBalancing\GameServer\bin\GameServer.xml.config"

NameServer

이전 (v5 BETA):

"deploy\NameServer\bin\Photon.NameServer.dll.config"

이후 (v5):

"deploy\NameServer\bin\NameServer.xml.config"

구조체 변경

두 번째로 중요한 변화는 환경 구성 파일들이 새로운 구조체를 갖고 있습니다.

이전 파일 구조체:

XML

<?xml version="1.0"?>
<configuration>
  <configSections>
    <!-- sections defined here -->
  </configSections>
  <applicationSettings>
     <!-- app settings -->
  </applicationSettings>
  <!-- other settings -->
  <startup>
  </startup>
</configuration>

새로운 파일 구조체:

XML

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <Photon>
    <!-- all settings here -->
  </Photon>
</configuration>

루트 <Photon> 요소를 주목하세요.

일부 이전 구성 섹션(XML 요소)은 더 이상 필요하지 않습니다:

  • <configSections>
  • <applicationSettings>
  • <startup>
  • <runtime>
  • <CounterPublisher>

일부 요소가 이름이 변경되었습니다:

  • <Photon.LoadBalancing.Common.CommonSettings>은 이제 <LoadBalacing>입니다.
  • <Photon.Common.Authentication.Settings> 은 이제 <Authentication>입니다.
  • <Photon.LoadBalancing.MasterServer.MasterServerSettings>은 이제 <Master>입니다
  • <Photon.LoadBalancing.GameServer.GameServerSettings> 은 이제 <GameServer>입니다.
  • <Photon.NameServer.Settings> 은 이제 <NameServer>입니다.
  • <WebRpcSettings> 은 이제<WebRpc>입니다.
  • <AuthSettings> 은 이제 <CustomAuth>입니다.

또한 각 설정 노드에는 이전 일반 형식 대신 설정과 일치하는 사용자 지정 이름이 있습니다. 이 사항은 변경 사항이 없는 <WebRPC> (이전 <WebRpcSettings>) 및 <CustomAuth> (이전 <AuthSettings)을 제외한 모든 요소에 적용됩니다.

이전 설정 노드 형식:

XML

<setting name="SettingName" serializeAs="String">
    <value>SettingValue</value>
</setting>

새로운 설정 노드 형식:

XML

<SettingName>SettingValue</SettingName>

다음은 파일별로 변경 사항에 대해 좀 더 자세히 보여줍니다:

Master

이전 파일 구조체:

XML

<?xml version="1.0"?>
<configuration>
  <configSections>
    <!-- sections defined here -->
  </configSections>
  <applicationSettings>
    <Photon.LoadBalancing.Common.CommonSettings>
    </Photon.LoadBalancing.Common.CommonSettings>
    <Photon.Common.Authentication.Settings>
    </Photon.Common.Authentication.Settings>
    <Photon.LoadBalancing.MasterServer.MasterServerSettings>
    </Photon.LoadBalancing.MasterServer.MasterServerSettings>
  </applicationSettings>
  <Photon>
    <CounterPublisher>
    </CounterPublisher>
  </Photon>
  <WebRpcSettings>
  </WebRpcSettings>
  <startup>
  </startup>
</configuration>

새로운 파일 구조체:

XML

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <Photon>
    <LoadBalancing>
    </LoadBalancing>
    <Authentication>
    </Authentication>
    <Master>
      <S2S>
      </S2S>
      <GS>
      </GS>
      <Limits>
        <Inbound>
        </Inbound>
        <Lobby>
        </Lobby>
      </Limits>
    </Master>
    <WebRpc>
      <HttpQueueSetting>
      </HttpQueueSettings>
    </WebRpc>
  </Photon>
</configuration>

GameServer

이전 파일 구조체:

XML

<?xml version="1.0"?>
<configuration>
  <configSections>
    <!-- sections defined here -->
  </configSections>
  <applicationSettings>
    <Photon.LoadBalancing.Common.CommonSettings>
    </Photon.LoadBalancing.Common.CommonSettings>
    <Photon.Common.Authentication.Settings>
    </Photon.Common.Authentication.Settings>
    <Photon.LoadBalancing.MasterServer.GameServerSettings>
    </Photon.LoadBalancing.MasterServer.GameServerSettings>
  </applicationSettings>
  <Photon>
    <CounterPublisher>
    </CounterPublisher>
  </Photon>
  <WebRpcSettings>
  </WebRpcSettings>
  <startup>
  </startup>
</configuration>

새로운 파일 구조체:

XML

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <Photon>
    <LoadBalancing>
    </LoadBalancing>
    <Authentication>
    </Authentication>
    <GameServer>
      <S2S>
      </S2S>
      <Master>
      </Master>
      <Limits>
        <Inbound>
          <EventCache>
          </EventCache>
          <Properties>
          </Properties>
          <Operations>
          </Operations>
        </Inbound>
      </Limits>
      <HttpQueueSetting>
      </HttpQueueSettings>
    </GameServer>
    <WebRpc>
      <HttpQueueSetting>
      </HttpQueueSettings>
    </WebRpc>
  </Photon>
</configuration>

NameServer

동일한 속성/특성 값을 유지하면서 <AuthSettings> 노드<CustomAuth>로 변경 (이름 변경 / 교체)되었습니다.

이전 파일 구조체:

XML

<?xml version="1.0"?>
<configuration>
  <configSections>
    <!-- sections defined here -->
  </configSections>
  <applicationSettings>
    <Photon.NameServer.Settings>
    </Photon.NameServer.Settings>
    <Photon.Common.Authentication.Settings>
    </Photon.Common.Authentication.Settings>
  </applicationSettings>
  <AuthSettings>
  </AuthSettings>
  <startup>
  </startup>
  <runtime>
  </runtime>
</configuration>

새로운 파일 구조체:

XML

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <Photon>
    <NameServer>
    </NameServer>
    <Authentication>
    </Authentication>
    <CustomAuth>
      <HttpQueueSetting>
      </HttpQueueSettings>
    </CustomAuth>
  </Photon>
</configuration>

플러그인

<Configuration></Configuration> 이 다음과 같이 둘러쌓여져 있습니다:

XML

<Configuration>
  <PluginSettings Enabled="True">
    <Plugins>
      <!-- custom plugin settings here -->
    </Plugins>
  </PluginSettings>
</Configuration>

HttpQueueSettings

HttpQueue는 모든 HTTP(아웃바운드)에 사용됩니다. 따라서 대기열 관련 설정을 한 그룹으로 묶는 것이 타당했습니다. 이 설정 그룹은 GameServer, WebRPC 및 CustomAuth 설정(하위 그룹으로)에서 사용됩니다. 대부분의 설정은 v4에서 이미 사용할 수 있었지만 이제는 보다 체계적이고(새로운 구조), 깔끔하고 일관된(네이밍) 기능을 제공합니다.

  • HttpRequestTimeout: 언제까지(밀리 초로) HTTP 응답을 대기할 수 있는지를 나타냄.
  • LimitHttpResponseMaxSize: HTTP 응답 페이로드에 허용되는 최대 크기
  • MaxBackoffTime: HTTP 요청을 다시 보낼 때의 백오프 임계값입니다.
  • MaxConcurrentRequests: 허용된 최대 동시 HTTP 요청 수
  • MaxErrorRequests: 대기 중인 요청을 처리하는 동안 발생할 수 있는 최대 오류 수 HttpQueue에 도달하면 연결이 끊어지고(대기 중인 모든 요청을 지우고 들어오는 요청을 거부함) ReconnectInterval이후 다시 재개합니다.
  • MaxQueuedRequests: 대기열에 넣을 수 있는 최대 요청 수
  • MaxTimedOutRequests: 처리 대기 중인 대기열에서 시간 초과된 최대 요청 수 HttpQueue에 도달하면 연결이 끊어지고(대기 중인 모든 요청을 지우고 들어오는 요청을 거부함) ReconnectInterval 이후 다시 재개합니다.
  • QueueTimeout: 요청이 HttpQueue에서 QueueTimeout 밀리초 동안 머물 경우 해당 요청은 자동으로 제거됩니다.
  • ReconnectInterval: HTTP 요청 프로세스를 재개하기 전에 대기열이 대기하는 시간(밀리초)입니다.

LoadBalancer 와 Workload 환경 구성 변경 사항

Workload 환경 구성 변경

이전 구조체:

XML

<?xml version="1.0" encoding="utf-8" ?>
<FeedbackControlSystem>
  <FeedbackControllers>
      <!-- one or more controllers setup -->
  </FeedbackControllers>
</FeedbackControlSystem>

새로운 구조체 (래퍼 <Configuration></Configuration> 요소/노드 추가됨):

XML

<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
  <FeedbackControlSystem>
    <FeedbackControllers>
      <!-- one or more controllers setup -->
    </FeedbackControllers>
  </FeedbackControlSystem>
</Configuration>

LoadBalancer 환경 구성 변경

LoadBalancer 환경 구송 파일은 "deploy\LoadBalancer.config"입니다.

XML

<?xml version="1.0" encoding="utf-8" ?>
  <LoadBalancer ReserveRatio="{ReserveRatio}" ValueUp="{ValueUp}">
    <LoadBalancerWeights>
      <Level name="0" Level="Level0" Value="{Value0}" />
      <Level name="1" Level="Level1" Value="{Value1}"/>
      <Level name="2" Level="Level2" Value="{Value2}"/>
      <Level name="3" Level="Level3" Value="{Value3}"/>
      <Level name="4" Level="Level4" Value="{Value4}"/>
      <Level name="5" Level="Level5" Value="{Value5}"/>
      <Level name="6" Level="Level6" Value="{Value6}"/>
      <Level name="7" Level="Level7" Value="{Value7}"/>
      <Level name="8" Level="Level8" Value="{Value8}"/>
      <Level name="9" Level="Level9" Value="{Value9}"/>
    </LoadBalancerWeights>
  </LoadBalancer>

새로운 구조체 (래퍼 <Configuration></Configuration> 요소/노드 추가됨):

XML

<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
  <LoadBalancer ReserveRatio="{ReserveRatio}" ValueUp="{ValueUp}">
    <LoadBalancerWeights>
      <Level name="0" Level="Level0" Value="{Value0}" />
      <Level name="1" Level="Level1" Value="{Value1}"/>
      <Level name="2" Level="Level2" Value="{Value2}"/>
      <Level name="3" Level="Level3" Value="{Value3}"/>
      <Level name="4" Level="Level4" Value="{Value4}"/>
      <Level name="5" Level="Level5" Value="{Value5}"/>
      <Level name="6" Level="Level6" Value="{Value6}"/>
      <Level name="7" Level="Level7" Value="{Value7}"/>
      <Level name="8" Level="Level8" Value="{Value8}"/>
      <Level name="9" Level="Level9" Value="{Value9}"/>
    </LoadBalancerWeights>
  </LoadBalancer>
</Configuration>
Back to top