In the peer-to-peer client-server model, the server software runs on the machine of a player who is also taking part in the game. The server software and the game client are usually integrated in the same executable.
In the dedicated server model, the server software is a separate application which usually has no visual output. It runs on a separate machine which is usually (but not necessarily) sitting in a datacenter.
The peer-to-peer model is cheaper and more convenient, because nobody needs to pay for separate machines to run servers. But it also has a couple disadvantages:
- The host must be a player with a public facing IP. They can not be behind a NAT router (unless they configure it to do port forwarding, but that's something you need to explain to players how to do).
- When the host quits the game, then the game is either over or you need to migrate the game to a new host. Host migration can be technically challenging and is often hard to do without pausing the game for a couple seconds (although some developers figured out pretty smart ways to do it with minimal disruption).
- Poor game experience when the host has a weak machine or a bad internet connection.
- The host has an unfair advantage, because they are playing with a network latency ("ping") of zero.
- It is difficult to prevent the host from cheating.
- The players can use network diagnosis tools to find out the IP address of the host and the host those of all players, which is problematic from a privacy perspective.
Using a relay fixes the first and last problem by having a server in a datacenter as an intermediate between players and hosts. But now you again need servers in a datacenter. Just cheaper servers, because they do nothing but sending data back and forth while the computationally expensive game mechanics are calculated on the machine of a player.