Fish-Net: Networking Evolved
  • Overview
    • What is FishNet?
      • Features
        • Unity Compatibility
        • Performance
          • Benchmark Setup
          • Fish-Networking Vs Mirror
      • Pro, Projects, and Support
      • Business Support
      • Development
        • Changelog
        • Roadmap
      • Branding
      • Legal Restrictions
    • Showcase
      • Upcoming Releases
    • Asset Integrations
      • Fish-Network-Discovery
    • Community Resources
  • Guides
    • Getting Started
      • Installing Fish-Networking
      • Getting Connected
      • Preparing Your Player
      • Moving Your Player Around
      • Spawning and Despawning Items
      • Using SyncVars to Sync Colors
      • Connecting to Remote Devices
      • Beyond the Basics
    • High-Level Overview
      • Fundamentals
      • Networking Models
      • Terminology
        • Server, Client, Host
        • Communicating
        • Miscellaneous
      • Transports
    • Features
      • Server and Client Identification
        • Executing on Server or Client
        • NetworkConnections
      • Networked GameObjects and Scripts
        • NetworkObjects
        • NetworkBehaviour
        • Spawning and Despawning
          • Predicted Spawning
          • Nested NetworkObjects
          • Object Pooling
      • Network State Events
      • Network Communication
        • Remote Procedure Calls
        • SyncTypes
          • Customizing Behavior
          • SyncVar
          • SyncList
          • SyncHashSet
          • SyncDictionary
          • SyncTimer
          • SyncStopwatch
          • Custom SyncType
        • Broadcasts
      • Data Serialization
        • Custom Serializers
          • Interface Serializers
          • Inheritance Serializers
      • Ownership
        • Using Ownership To Read Values
      • Area of Interest (Observer System)
        • Modifying Conditions
        • Custom Conditions
      • Scene Management
        • Scene Events
        • Scene Data
          • SceneLookupData
          • SceneLoadData
          • SceneUnloadData
        • Loading Scenes
          • Automatic Online and Offline Scenes
        • Unloading Scenes
        • Scene Stacking
        • Scene Caching
        • Scene Visibility
        • Persisting NetworkObjects
        • Custom Scene Processors
          • Addressables
      • InstanceFinder
      • Addressables
      • Transports
        • Multipass
      • Prediction
        • What Is Client-Side Prediction
        • Configuring PredictionManager
        • Configuring TimeManager
        • Configuring NetworkObject
        • Offline Rigidbodies
        • Interpolations
        • Creating Code
          • Controlling An Object
          • Non-Controlled Object
          • Understanding ReplicateState
            • Using States In Code
            • Predicting States In Code
          • Advanced Controls
        • Custom Comparers
        • PredictionRigidbody
        • Using NetworkColliders
      • Lag Compensation
        • States
        • Raycast
        • Projectiles
    • Upgrading API
    • Server Hosting
      • Edgegap - Official Partner
        • Getting Started with Edgegap
      • Hathora
        • Getting Started with Hathora
      • Amazon Web Services (AWS)
        • Getting Started with AWS
    • Upgrading To Fish-Networking
    • Troubleshooting
      • Technical Limitations
      • Creating Bug Reports
        • Report Example
      • FAQ
  • FishNet Building Blocks
    • Components
      • Managers
        • NetworkManager
        • TimeManager
        • PredictionManager
        • ServerManager
        • ClientManager
        • SceneManager
        • TransportManager
          • IntermediateLayer
        • StatisticsManager
        • ObserverManager
          • HashGrid
        • RollbackManager (Pro Feature)
      • Prediction
        • Network Collider
          • NetworkCollision
          • NetworkCollision2D
          • NetworkTrigger
          • NetworkTrigger2D
        • OfflineRigidbody
        • PredictedOwner
        • PredictedSpawn
      • Utilities
        • PingDisplay
        • BandwidthDisplay
        • Tick Smoothers
          • NetworkTickSmoother
          • OfflineTickSmoother
          • MonoTickSmoother [Obsolete]
          • DetachableNetworkTickSmoother [Obsolete]
      • PlayerSpawner
      • DefaultScene
      • ServerSpawner
      • Authenticator
      • ColliderRollback
      • NetworkAnimator
      • NetworkBehaviour
      • NetworkTransform
      • NetworkObject
      • NetworkObserver
    • Prefabs
      • NetworkManager
      • NetworkHudCanvas
    • ScriptableObjects
      • ObserverConditions
        • DistanceCondition
        • GridCondition
        • HostOnlyCondition
        • MatchCondition
        • OwnerOnlyCondition
        • SceneCondition
      • SpawnablePrefabs
        • DefaultPrefabObjects
        • SinglePrefabObjects
        • DualPrefabObjects
      • LevelLoggingConfiguration
    • Transports
      • Tugboat
      • Multipass
      • Yak (Pro Feature)
      • Bayou
      • FishyWebRTC
      • FishyUnityTransport
      • FishySteamworks (Steam)
      • FishyEOS (Epic Online Services)
      • FishyFacepunch (Steam)
      • FishyRealtime (Photon)
  • API Documentation
    • API Reference
Powered by GitBook
On this page
  • Client-Server Architecture
  • Dedicated Server
  • Host (Listen Server)
  • Peer-to-Peer (P2P)
  • Relay Servers
  • Host Migration
  1. Guides
  2. High-Level Overview

Networking Models

This page discusses the varius networking models and architectures used in games and what Fish-Networking uses.

PreviousFundamentalsNextTerminology

Last updated 11 days ago

Client-Server Architecture

The client-server model is the most widely used approach in multiplayer networking. In this model:

  • Server: The authoritative instance of the game. It manages game logic, synchronizes game state, validates player actions, and handles communication between clients.

  • Client: A player's instance of the game. It sends input to the server and receives updates about the game state.

There are two main types of servers:

Dedicated Server

The server runs as its own process, separate from any player. It’s more secure and scalable, commonly used in competitive or large-scale games.

As you can see from the above diagram, the clients (players) are all connected directly to the server and communicate with it instead of with each other.


Host (Listen Server)

The server and one of the clients run in the same process. This is common in smaller games or development environments.

The above diagram demonstrates how the listen server is similar to the dedicated server model where all clients connect directly with the server, but unlike the dedicated server, the listen server is also acting as a client (player).

FishNet supports both dedicated and host server models out of the box.


Peer-to-Peer (P2P)

In peer-to-peer networking, each player (or peer) connects directly to others without a central server. This reduces latency and server costs but comes with challenges:

  • Poor security and cheating prevention

  • Difficult to synchronize game state reliably

  • NAT traversal issues

P2P is rarely used in modern real-time multiplayer games, especially competitive ones, due to these drawbacks. FishNet does not use P2P, as it is designed around the client-server model for reliability and security.

Very often a listen server setup is referred to as P2P, FishNet does support a listen server.


Relay Servers

Sometimes clients are unable to connect directly to the server due to NAT (Network Address Translation) or firewall restrictions. A relay server acts as a middleman to forward traffic between clients and the server.

Relay servers:

  • Allow connectivity when direct connections fail

  • Introduce additional latency

  • May be used as a fallback or for web-based games


Host Migration

When using a listen server, the host leaving the game would cause all players to leave the game; Host migration is a feature for maintaining game sessions in the event the current host disconnects or experiences network issues. It enables a new host to be elected from the remaining connected players, minimizing disruption and ensuring the game session can continue seamlessly.

Fish-Networking doesn't yet have built-in host migration, but it is a feature that may be added in the future.

Fish-Networking supports multiple third-party relay services including , , , , and .

Unity's Relay
Edgegap's Distributed Relay
Photon Realtime
Epic Online Services' Relay Service
Steam Datagram Relay
A dedicated server model
A listen-server model
A Peer-to-peer model
A relay server
An image showing multiple clients connected to a single server
An image showing multiple clients connected to a single server which is also acting as a client itself
An image of four clients all interconnected with each other.
An image of a three clients connecting to a server which links them to a server and client instance.