title: Architecture of a multiplayer lobby and matchmaking system?
body: <p>I am looking to design a system where a player can </p>
  
  <ol>
  <li><p>Run the game, hit a button to enter the arena, which will send his IP Address/player profile/network stats up to the server. </p></li>
  <li><p>The matchmaking/lobby server will maintain a collection of all available players. It will continuously look for pairs of players that are a "match" (algorithm not important right now).</p></li>
  <li><p>When it finds two queued players that are a "match", based on the player profile data it will pick one of the players as the server and will then notify the game clients that a match has been found. Based on the notification the client receives, the client who was selected as the server will launch a server and the other player's client will connect to that initialized server when it's ready.</p></li>
  </ol>
  
  <p>What is a good way to set this up? My first thought was to send the player stats up via an HTTP POST. But it could be minutes in some cases before the server finds a match and responds with what type of connection the player will have and who their opponent will be. Would HTTP be appropriate for this? Or should this be a lower level customized socket based approach? Or am I completely off here?</p>
  
  <p>P.S The game is a being developed in Unity. I'd prefer answers that weren't just, "here's a link to a plugin that works" as I'm interested in understanding the architecture behind how this is typically implemented.</p>
  
  <p>Any guidance would be appreciated.</p>