SlideShare a Scribd company logo
1 of 48
Transforming from Peer-to-
Peer to Dedicated Servers
on a Live game
How connectivity was
fixed on For Honor
Laurent Chouinard
Online Project Lead – For Honor
Talk given at MIGS18, Tuesday, November 13th 2018
https://www.linkedin.com/in/laurentchouinard/
https://twitter.com/LaurentPointCa
/
Creating a fight game
Betas and launch
Root cause
Let’s make servers!
Open test results
Deploying a server infra
Then what?
INTRO
CREATING A
FIGHT GAME
/
Art of Battle fight mechanics use action/reaction
patterns
Reaction time vital to all
defensive moves
FIGHTING PROTOTYPE
/
Peer-to-peer
via host
Peer-to-peer
Full mesh
Dedicated
server
NETWORK MODELS
/
Most fighting games use peer-to-peer
A server or host would increase latency
Replication: positional updates, conflicts difficult to resolve
Gameplay simulation: synchronicity guaranteed, ideal for
duels, complex for melee
In the end, latency was key
SOME ASSUMPTIONS
/
Peer-to-peer
via host
Peer-to-peer
Full mesh
Dedicated
server
CHOICES MADE
+
Deterministic
Gameplay
Simulation
/ DETERMINISTIC GAMEPLAY SIMULATION
Lockstep
marching
Exchanging
inputs
No
randomness
a + b = c
a + b = c
/ DETERMINISTIC GAMEPLAY SIMULATION
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
Player 1
frames
Player 2
frames
Time
OK OK?!
/ DETERMINISTIC GAMEPLAY SIMULATION
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
Player 1
frames
Player 2
frames
Time
OK OK
BETAS AND
LAUNCH
/ DURING DEVELOPMENT
Near-perfect
development and
testing
environments
Alpha and beta
phases: issues
were drowned by
the noise
Occasional
glitches flagged as
rare, can’t
reproduce
© Nan Palmero - https://www.flickr.com/photos/nanpalmero/20724139849
/ LAUNCH
/ LAUNCH
/
#1 complaint of the
community:
“Disconnections!”
LAUNCH
https://commons.wikimedia.org/wiki/User:Jacklee
https://commons.wikimedia.org/wiki/User:Stefan-Xp
Dashboards
are all green?
/
Extreme parameters make the gameplay
simulation system unable to correct and keep up.
“That’s gotta be performance related.”
Performance-focused update with hundreds of
fixes: no change.
POST-LAUNCH ANALYSIS
ROOT CAUSE
/
Input received is too old
or
Desync cannot be recovered
GAMEPLAY SIMULATION HAS TO GIVE UP
/ INPUT TOO OLD
1 2 3 4 5 6
1 2 3 4 5 6
Player 1
frames
Player 2
frames
!
Effort to rewind and
resimulate
becomes too big.
/ DESYNC
… 10 … 20 … 30
… 10 … 20 … 30
Player 1
frames
Player 2
frames
?! ?!?!
Simulation buffer
contains no valid
snapshot
/
But why?
Packets are duplicated,
old frames are rejected,
and players that lag are removed!
GAMEPLAY SIMULATION HAS TO GIVE UP
/
A B
C D
PROBLEM #1: LOAD FEEDBACK LOOP
/ PROBLEM #2: HOST MIGRATION
A B
C D
/ PROBLEM #3: PEER ROUTING
A B
C D
NAT NAT
X
/ PROBLEM #4: JOINING IN PROGRESS
E B
C D
/ THE WEAKEST LINK
/ CEILING
100s of improvements later
 Connectivity bugs resolved
 Performance problems addressed
Game Stability still an issue
LET’S MAKE
SERVERS!
/ SERVER DESIGN
We need low latency!
• Super lightweight to run as fast as possible
(150-200 fps)
• Server does not need to run simulation
• Aware of the game state, handles session
joining and leaving
• Performance Monitor to isolate "the weakest
link" and protect other players
/ CONNECTION COMPLEXITY
1 link 3 links 6 links
/ CONNECTION COMPLEXITY
28 links 8 links
/ A LESSON IN LATENCY
73 ms
ISP 1 ISP 2
36 ms 36 ms
6 ms
AB via server
78 ms
Console player:
AB via P2P
73 ms (best, direct)
150 ms (worst, routed)
All values are averages of the single trip (time going from player A to player B)
+5 ms ?!?
/ A LESSON IN LATENCY
ISP 1 ISP 2
Big Cloud Providers
• Goggles
• Tropical Forest
• IndigoVery large pipes
Super optimized
Well maintained
Peering exchanges
No strong incentive
/ SERVER: MULTIPLEX AND MERGE
Player A Player C
Input:
Attack
A: Attack
B: Dodge
Merge
Player B
Input:
Dodge
/ SERVER: INPUT CANCEL
Player A Player C
Input:
Attack
A: Attack
Cancel
Player B
LATE
Input:
Dodge
/ PERFORMANCE MONITOR: KICK
Goal: remove the cause of game degradation
• Major framedrop: self-eject
• Lag with everyone: self-eject
• Contribution to advance the simulation is low:
self-kick or vote-kick
/
/
Connectivity errors
1 resync every 4 matches
10% pauses
Weakest link impact
RESULTS FOR STABILITY
Reduced by 75%
GONE, no resync
GONE, no migrations
GONE, no ripple effect
/ BONUS
No NAT management
Players IP hidden
42% reduction in match creation errors
DEPLOYING A
SERVER INFRA
/ AMAZON GAMELIFT
MatchMaking Gamelift Queue
Fleet of instances
Region 1
Fleet of instances
Region 2
/ AMAZON GAMELIFT
MatchMaking
Gamelift Queue
Region 1
Fleet of instances
Region 1
Fleet of instances
Region 2
Gamelift Queue
Region 2
Gamelift Queue
Region 3
Gamelift Queue
Region 3
Fleet of instances
Region 3
Fleet of instances
Region 4
/
Server-side switch that allows us to activate per
game mode, per platform.
• PvP modes: Move to DS
• PvAI modes: Keep P2P for now
Phase 1: February 2018 - PC only
Phase 2: March 2018 - Consoles
Phase 3: May 2018 - Move PvAI to DS as well
PROGRESSIVE ROLL-OUT
THEN WHAT?
/
Start with Windows to simplify development
Multi-tenancy up to the limit
Optimize threading and logging to bring it higher
Switch to Linux
More multi-tenancy
Future tenancy and scaling optimizations
OPTIMIZATION PATH
/
1. Don’t ignore the small things!
2. Monitoring player experience is better than servers
and services.
3. Cost-driven design is a double-edged sword. Focus
on the right tech for the problem, then see its
optimization potential.
4. Deliver small increments often, and measure.
OUR KEY LEARNINGS
/
QUESTIONS?
THANK YOU!

More Related Content

Similar to MIGS18 Transforming from peer-to-peer to dedicated servers on a live game

Scalability & Big Data challenges in real time multiplayer games
Scalability & Big Data challenges in real time multiplayer gamesScalability & Big Data challenges in real time multiplayer games
Scalability & Big Data challenges in real time multiplayer gamesYan Cui
 
Akka for realtime multiplayer mobile games
Akka for realtime multiplayer mobile gamesAkka for realtime multiplayer mobile games
Akka for realtime multiplayer mobile gamesYan Cui
 
Building fast,scalable game server in node.js
Building fast,scalable game server in node.jsBuilding fast,scalable game server in node.js
Building fast,scalable game server in node.jsXie ChengChao
 
What Would Blizzard Do
What Would Blizzard DoWhat Would Blizzard Do
What Would Blizzard DoNick Pruehs
 
Behind story in publisher that developer doesn't know
Behind story in publisher that developer doesn't knowBehind story in publisher that developer doesn't know
Behind story in publisher that developer doesn't knowDavid Kim
 
Building Multiplayer Games (w/ Unity)
Building Multiplayer Games (w/ Unity)Building Multiplayer Games (w/ Unity)
Building Multiplayer Games (w/ Unity)Noam Gat
 
Hosting AAA Multiplayer Experiences with Multiplay
Hosting AAA Multiplayer Experiences with MultiplayHosting AAA Multiplayer Experiences with Multiplay
Hosting AAA Multiplayer Experiences with MultiplayUnity Technologies
 
Srinivas, Nirmalaya - Testing a massively multi-player online game
Srinivas, Nirmalaya - Testing a massively multi-player online gameSrinivas, Nirmalaya - Testing a massively multi-player online game
Srinivas, Nirmalaya - Testing a massively multi-player online gamevodQA
 
rdp remotefx spice arm-linux thin client
rdp remotefx spice arm-linux thin clientrdp remotefx spice arm-linux thin client
rdp remotefx spice arm-linux thin clientliwu.dong
 
Dynamic Wounds on Animated Characters in UE4
Dynamic Wounds on Animated Characters in UE4Dynamic Wounds on Animated Characters in UE4
Dynamic Wounds on Animated Characters in UE4Michał Kłoś
 
Multiplayer Networking Game
Multiplayer Networking GameMultiplayer Networking Game
Multiplayer Networking GameTanmay Krishna
 
Photon vs UNET: Battle of the Giants
Photon vs UNET: Battle of the GiantsPhoton vs UNET: Battle of the Giants
Photon vs UNET: Battle of the GiantsChristof Wegmann
 
Vulnerabilities in multiplayer games (2001-2012)
Vulnerabilities in multiplayer games (2001-2012)Vulnerabilities in multiplayer games (2001-2012)
Vulnerabilities in multiplayer games (2001-2012)Luigi Auriemma
 
Console development
Console developmentConsole development
Console developmentspartasoft
 
Mastering Multiplayer Stage3d and AIR game development for mobile devices
Mastering Multiplayer Stage3d and AIR game development for mobile devicesMastering Multiplayer Stage3d and AIR game development for mobile devices
Mastering Multiplayer Stage3d and AIR game development for mobile devicesJean-Philippe Doiron
 
Adobe AIR for mobile games
Adobe AIR for mobile gamesAdobe AIR for mobile games
Adobe AIR for mobile gamesJames Wrightson
 
Behind the Scenes: Deploying a Low-Latency Multiplayer Game Globally
Behind the Scenes: Deploying a Low-Latency Multiplayer Game GloballyBehind the Scenes: Deploying a Low-Latency Multiplayer Game Globally
Behind the Scenes: Deploying a Low-Latency Multiplayer Game GloballyJames Gwertzman
 

Similar to MIGS18 Transforming from peer-to-peer to dedicated servers on a live game (20)

Scalability & Big Data challenges in real time multiplayer games
Scalability & Big Data challenges in real time multiplayer gamesScalability & Big Data challenges in real time multiplayer games
Scalability & Big Data challenges in real time multiplayer games
 
Akka for realtime multiplayer mobile games
Akka for realtime multiplayer mobile gamesAkka for realtime multiplayer mobile games
Akka for realtime multiplayer mobile games
 
Building fast,scalable game server in node.js
Building fast,scalable game server in node.jsBuilding fast,scalable game server in node.js
Building fast,scalable game server in node.js
 
What Would Blizzard Do
What Would Blizzard DoWhat Would Blizzard Do
What Would Blizzard Do
 
Behind story in publisher that developer doesn't know
Behind story in publisher that developer doesn't knowBehind story in publisher that developer doesn't know
Behind story in publisher that developer doesn't know
 
Building Multiplayer Games (w/ Unity)
Building Multiplayer Games (w/ Unity)Building Multiplayer Games (w/ Unity)
Building Multiplayer Games (w/ Unity)
 
Sgin2013 scrum accomplished-mmog-sajitvasudevan
Sgin2013 scrum accomplished-mmog-sajitvasudevanSgin2013 scrum accomplished-mmog-sajitvasudevan
Sgin2013 scrum accomplished-mmog-sajitvasudevan
 
Hosting AAA Multiplayer Experiences with Multiplay
Hosting AAA Multiplayer Experiences with MultiplayHosting AAA Multiplayer Experiences with Multiplay
Hosting AAA Multiplayer Experiences with Multiplay
 
Srinivas, Nirmalaya - Testing a massively multi-player online game
Srinivas, Nirmalaya - Testing a massively multi-player online gameSrinivas, Nirmalaya - Testing a massively multi-player online game
Srinivas, Nirmalaya - Testing a massively multi-player online game
 
rdp remotefx spice arm-linux thin client
rdp remotefx spice arm-linux thin clientrdp remotefx spice arm-linux thin client
rdp remotefx spice arm-linux thin client
 
go-man API
go-man APIgo-man API
go-man API
 
Dynamic Wounds on Animated Characters in UE4
Dynamic Wounds on Animated Characters in UE4Dynamic Wounds on Animated Characters in UE4
Dynamic Wounds on Animated Characters in UE4
 
Multiplayer Networking Game
Multiplayer Networking GameMultiplayer Networking Game
Multiplayer Networking Game
 
Battlefield 4 + Frostbite + Mantle
Battlefield 4 + Frostbite + MantleBattlefield 4 + Frostbite + Mantle
Battlefield 4 + Frostbite + Mantle
 
Photon vs UNET: Battle of the Giants
Photon vs UNET: Battle of the GiantsPhoton vs UNET: Battle of the Giants
Photon vs UNET: Battle of the Giants
 
Vulnerabilities in multiplayer games (2001-2012)
Vulnerabilities in multiplayer games (2001-2012)Vulnerabilities in multiplayer games (2001-2012)
Vulnerabilities in multiplayer games (2001-2012)
 
Console development
Console developmentConsole development
Console development
 
Mastering Multiplayer Stage3d and AIR game development for mobile devices
Mastering Multiplayer Stage3d and AIR game development for mobile devicesMastering Multiplayer Stage3d and AIR game development for mobile devices
Mastering Multiplayer Stage3d and AIR game development for mobile devices
 
Adobe AIR for mobile games
Adobe AIR for mobile gamesAdobe AIR for mobile games
Adobe AIR for mobile games
 
Behind the Scenes: Deploying a Low-Latency Multiplayer Game Globally
Behind the Scenes: Deploying a Low-Latency Multiplayer Game GloballyBehind the Scenes: Deploying a Low-Latency Multiplayer Game Globally
Behind the Scenes: Deploying a Low-Latency Multiplayer Game Globally
 

Recently uploaded

CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)Wonjun Hwang
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...ScyllaDB
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data SciencePaolo Missier
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTopCSSGallery
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxjbellis
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxFIDO Alliance
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxFIDO Alliance
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهMohamed Sweelam
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityVictorSzoltysek
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Skynet Technologies
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 

Recently uploaded (20)

CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 

MIGS18 Transforming from peer-to-peer to dedicated servers on a live game

  • 1. Transforming from Peer-to- Peer to Dedicated Servers on a Live game How connectivity was fixed on For Honor Laurent Chouinard Online Project Lead – For Honor Talk given at MIGS18, Tuesday, November 13th 2018 https://www.linkedin.com/in/laurentchouinard/ https://twitter.com/LaurentPointCa
  • 2. / Creating a fight game Betas and launch Root cause Let’s make servers! Open test results Deploying a server infra Then what? INTRO
  • 4. / Art of Battle fight mechanics use action/reaction patterns Reaction time vital to all defensive moves FIGHTING PROTOTYPE
  • 6. / Most fighting games use peer-to-peer A server or host would increase latency Replication: positional updates, conflicts difficult to resolve Gameplay simulation: synchronicity guaranteed, ideal for duels, complex for melee In the end, latency was key SOME ASSUMPTIONS
  • 8. / DETERMINISTIC GAMEPLAY SIMULATION Lockstep marching Exchanging inputs No randomness a + b = c a + b = c
  • 9. / DETERMINISTIC GAMEPLAY SIMULATION 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 Player 1 frames Player 2 frames Time OK OK?!
  • 10. / DETERMINISTIC GAMEPLAY SIMULATION 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 Player 1 frames Player 2 frames Time OK OK
  • 12. / DURING DEVELOPMENT Near-perfect development and testing environments Alpha and beta phases: issues were drowned by the noise Occasional glitches flagged as rare, can’t reproduce © Nan Palmero - https://www.flickr.com/photos/nanpalmero/20724139849
  • 15. / #1 complaint of the community: “Disconnections!” LAUNCH https://commons.wikimedia.org/wiki/User:Jacklee https://commons.wikimedia.org/wiki/User:Stefan-Xp Dashboards are all green?
  • 16. / Extreme parameters make the gameplay simulation system unable to correct and keep up. “That’s gotta be performance related.” Performance-focused update with hundreds of fixes: no change. POST-LAUNCH ANALYSIS
  • 18. / Input received is too old or Desync cannot be recovered GAMEPLAY SIMULATION HAS TO GIVE UP
  • 19. / INPUT TOO OLD 1 2 3 4 5 6 1 2 3 4 5 6 Player 1 frames Player 2 frames ! Effort to rewind and resimulate becomes too big.
  • 20. / DESYNC … 10 … 20 … 30 … 10 … 20 … 30 Player 1 frames Player 2 frames ?! ?!?! Simulation buffer contains no valid snapshot
  • 21. / But why? Packets are duplicated, old frames are rejected, and players that lag are removed! GAMEPLAY SIMULATION HAS TO GIVE UP
  • 22. / A B C D PROBLEM #1: LOAD FEEDBACK LOOP
  • 23. / PROBLEM #2: HOST MIGRATION A B C D
  • 24. / PROBLEM #3: PEER ROUTING A B C D NAT NAT X
  • 25. / PROBLEM #4: JOINING IN PROGRESS E B C D
  • 27. / CEILING 100s of improvements later  Connectivity bugs resolved  Performance problems addressed Game Stability still an issue
  • 29.
  • 30. / SERVER DESIGN We need low latency! • Super lightweight to run as fast as possible (150-200 fps) • Server does not need to run simulation • Aware of the game state, handles session joining and leaving • Performance Monitor to isolate "the weakest link" and protect other players
  • 31. / CONNECTION COMPLEXITY 1 link 3 links 6 links
  • 32. / CONNECTION COMPLEXITY 28 links 8 links
  • 33. / A LESSON IN LATENCY 73 ms ISP 1 ISP 2 36 ms 36 ms 6 ms AB via server 78 ms Console player: AB via P2P 73 ms (best, direct) 150 ms (worst, routed) All values are averages of the single trip (time going from player A to player B) +5 ms ?!?
  • 34. / A LESSON IN LATENCY ISP 1 ISP 2 Big Cloud Providers • Goggles • Tropical Forest • IndigoVery large pipes Super optimized Well maintained Peering exchanges No strong incentive
  • 35. / SERVER: MULTIPLEX AND MERGE Player A Player C Input: Attack A: Attack B: Dodge Merge Player B Input: Dodge
  • 36. / SERVER: INPUT CANCEL Player A Player C Input: Attack A: Attack Cancel Player B LATE Input: Dodge
  • 37. / PERFORMANCE MONITOR: KICK Goal: remove the cause of game degradation • Major framedrop: self-eject • Lag with everyone: self-eject • Contribution to advance the simulation is low: self-kick or vote-kick
  • 38. /
  • 39. / Connectivity errors 1 resync every 4 matches 10% pauses Weakest link impact RESULTS FOR STABILITY Reduced by 75% GONE, no resync GONE, no migrations GONE, no ripple effect
  • 40. / BONUS No NAT management Players IP hidden 42% reduction in match creation errors
  • 42. / AMAZON GAMELIFT MatchMaking Gamelift Queue Fleet of instances Region 1 Fleet of instances Region 2
  • 43. / AMAZON GAMELIFT MatchMaking Gamelift Queue Region 1 Fleet of instances Region 1 Fleet of instances Region 2 Gamelift Queue Region 2 Gamelift Queue Region 3 Gamelift Queue Region 3 Fleet of instances Region 3 Fleet of instances Region 4
  • 44. / Server-side switch that allows us to activate per game mode, per platform. • PvP modes: Move to DS • PvAI modes: Keep P2P for now Phase 1: February 2018 - PC only Phase 2: March 2018 - Consoles Phase 3: May 2018 - Move PvAI to DS as well PROGRESSIVE ROLL-OUT
  • 46. / Start with Windows to simplify development Multi-tenancy up to the limit Optimize threading and logging to bring it higher Switch to Linux More multi-tenancy Future tenancy and scaling optimizations OPTIMIZATION PATH
  • 47. / 1. Don’t ignore the small things! 2. Monitoring player experience is better than servers and services. 3. Cost-driven design is a double-edged sword. Focus on the right tech for the problem, then see its optimization potential. 4. Deliver small increments often, and measure. OUR KEY LEARNINGS