Overview of Diarkis
Diarkis and Modules
Diarkis is a high-performance network middleware platform designed to facilitate real-time communication between servers and clients, with a primary focus on online multiplayer game architectures and other latency-sensitive, distributed systems.
SDK Support and Integration:
Server-Side SDK: Implemented in Go (Golang), the server SDK enables developers to build scalable, fault-tolerant backend systems capable of managing state synchronization, matchmaking, and message routing with minimal latency.
Client-Side SDKs: Diarkis provides native client libraries for both C++ and C#, allowing for seamless integration into a wide range of platforms and applications.
Game Engine Integration: To streamline adoption in game development workflows, Diarkis offers:
A dedicated Unreal Engine plugin for native integration within the UE networking stack.
A Unity Engine SDK, providing Unity-specific APIs and abstractions to support real-time multiplayer functionality.
This comprehensive SDK suite enables cross-platform development and rapid deployment of synchronized, distributed systems in both gaming and non-gaming domains.
Supported Operating Systems
Linux
Windows
MacOS
iOS
Android
Supported Platforms:
PS4, PS5
Xbox One, Xbox Series X, Xbox Series S
Nintendo Switch, Switch 2 (Coming soon)
Steam
Server Architecture Philosophy
The Diarkis server architecture is purpose-built for decentralized and distributed networking, enabling the formation of fault-tolerant, horizontally scalable server clusters. Each cluster operates as a unified logical server, abstracting the complexity of distributed state and session management from the application layer.
Cluster Design and Implementation:
Decentralized Cluster Formation: Diarkis servers—referred to as Pods—are deployed as part of a distributed cluster where each Pod is capable of handling client traffic and participating in shared state replication. The server is fully implemented in Golang (Go) for high concurrency and low-level network control.
Fault Tolerance: The system is designed to tolerate node-level failures. If one or more Pods become unavailable, the cluster continues to function seamlessly without disruption to game logic or synchronization. Client reconnection to a healthy Pod is sufficient to resume stateful operations.
Networking Protocols and Transport:
Client Connectivity: All user clients communicate directly with Pods over TCP or UDP, depending on application requirements.
RUDP Implementation: For UDP-based transport, Diarkis includes a proprietary implementation of Reliable UDP (RUDP). This protocol layer includes:
Packet retransmission mechanisms
Out-of-order packet handling
Support for MTU exceed recovery and fragmentation
This hybrid TCP/UDP approach provides developers with fine-grained control over latency, reliability, and network performance for high-frequency, real-time applications.
Visual Representation:
The diagram below illustrates the Diarkis server cluster configuration, showcasing Pod distribution, client communication paths, and transport layer support across a resilient and scalable infrastructure. For deployment guidelines and transport API integration, refer to the Diarkis Server Documentation.
Comparative Analysis: Traditional Network Server Architectures vs. Diarkis
While there are various methodologies for implementing network server systems, many rely on conventional architectures that differ significantly from Diarkis' decentralized, cluster-based design. In this section, we examine a commonly used reference architecture—typically characterized by centralized state management and monolithic control—and provide a technical comparison against the Diarkis approach.
This analysis will highlight key differences in areas such as scalability, fault tolerance, latency performance, state consistency, and operational complexity, illustrating the architectural advantages of Diarkis in high-concurrency, real-time environments.
Operational Limitations of Traditional Server Architectures
In conventional network server implementations, scaling operations—such as adding or removing real-time server instances—typically require manual configuration, deployment adjustments, and system restarts. These processes often involve direct modifications to routing tables, load balancer configurations, or service discovery mechanisms.
This manual intervention introduces a high risk of human error, including misconfiguration, downtime, and inconsistent state propagation across servers. Additionally, it increases operational overhead and complicates the deployment pipeline, making traditional systems less suitable for environments requiring dynamic scaling, high availability, and fault resilience.
By contrast, modern cluster-based systems like Diarkis are designed to automate node orchestration and user redistribution, significantly reducing administrative complexity and improving runtime adaptability.
Automated Infrastructure Management in Diarkis
In contrast to traditional architectures, Diarkis is designed for fully automated cluster management, requiring no manual intervention for server scaling, configuration, or workload distribution when paired with Kubernetes.
When nodes are added or removed, the Diarkis server cluster automatically handles service discovery, load rebalancing, and state synchronization across the distributed environment. User sessions are seamlessly reassigned without interrupting real-time communication, ensuring zero-downtime scalability and high operational resilience.
This automation minimizes human error, reduces DevOps overhead, and enables elastic infrastructure behavior ideal for high-availability, latency-sensitive applications.
Single Point of Failure in Traditional Architectures
A critical limitation in traditional network server designs is the reliance on a centralized control component, most commonly a relational database or centralized session manager, which introduces a single point of failure (SPOF) for the entire system.
In such architectures, all matchmaking logic, user state, and session metadata are stored and managed through a centralized database. Any failure or degradation in this component can result in widespread service disruption, including dropped connections, failed matchmaking requests, and inconsistent state recovery.
Moreover, centralized control inherently limits system scalability and redundancy, making it difficult to achieve high availability or tolerate faults under real-time, high-concurrency workloads. This architecture poses significant operational risk, particularly in environments requiring continuous uptime and horizontal scalability.
In contrast, Diarkis distributes both state and control logic across a decentralized server cluster, eliminating single points of failure and enabling fault-tolerant, high-availability networking.
Decentralized Cluster Architecture in Diarkis
Diarkis server clusters are architected as fully decentralized systems, with no centralized control node or master authority governing the cluster. All nodes operate independently yet cooperatively, sharing state and load responsibilities across the cluster in a peer-based model.
This design eliminates the traditional single point of failure (SPOF), as no single server or component is responsible for global coordination or state persistence. If any node within the cluster becomes unavailable, the remaining nodes continue to operate seamlessly, preserving active sessions, state synchronization, and real-time message routing without service interruption.
The cluster-wide redundancy and distributed control logic inherent in Diarkis ensures high fault tolerance, system-wide resilience, and continuous availability, making it ideal for mission-critical, real-time applications that demand maximum uptime and scalability.
Client-to-Server Communication in Diarkis – Server Relay Synchronization Model
Diarkis employs a server-relay synchronization model as its primary method of client-to-server communication. In this architecture, the Diarkis server cluster acts as a central relay hub, mediating all data exchange between connected clients.
Rather than relying on direct peer-to-peer communication, client messages are transmitted to the server, which then processes, filters, and forwards relevant data to other intended recipients within the network. This approach ensures data integrity, message ordering, and secure delivery, while also supporting cross-server communication within the distributed cluster.
The server-relay model is particularly well-suited for scenarios requiring deterministic synchronization, centralized rule enforcement, and visibility control, such as real-time multiplayer games, simulations, and collaborative environments. It also enables clients behind restrictive NAT or firewall configurations to fully participate in synchronized sessions without requiring direct connectivity.
Peer-to-Peer (P2P) Communication in Diarkis
In addition to server-relay synchronization, Diarkis supports peer-to-peer (P2P) communication as an alternative synchronization method for latency-sensitive, high-frequency data exchange between clients.
In the P2P model, clients establish direct communication channels with each other, bypassing the server as an intermediary during the data transmission phase. Diarkis acts as a P2P coordination and discovery service, facilitating the connection setup process while maintaining cluster-wide awareness of peer states.
Connection Establishment Process:
Address Exchange & Signaling: Diarkis initiates the P2P handshake by coordinating the exchange of public IP addresses and port information between participating clients. This is performed through a secure, server-assisted signaling mechanism.
NAT Traversal via Hole Punching: Once address information is exchanged, clients perform UDP hole punching to traverse NAT devices and establish direct connectivity. Diarkis supports advanced traversal scenarios and includes partial support for Symmetric NAT environments.
Upon successful hole punching, clients transmit UDP packets directly to each other, enabling low-latency, high-throughput communication ideal for real-time interactions such as positional updates, direct input synchronization, or voice/video streaming.
If P2P connectivity fails due to restrictive NAT/firewall conditions, Diarkis provides fallback to server-relay mode using its internal TURN-like relay functionality, ensuring uninterrupted communication across all client environments.
Diarkis CSAR – Dedicated Game Server Communication Framework
Diarkis CSAR (Cluster Server Assignment & Routing) is a high-performance, dedicated game server solution designed to seamlessly integrate non-Diarkis game servers into the Diarkis cluster for real-time, low-latency multiplayer communication. It enables dynamic session routing, client redirection, and stateful communication between clients and dedicated game servers written in C# or C++.
Key Communication and Server Integration Features:
Dedicated Game Server Support: CSAR allows clients to be routed to custom game server instances developed in C# or C++, supporting server authoritative game logic, simulation, or world state management. These servers operate externally but remain fully integrated into the Diarkis cluster via CSAR’s routing layer.
Dynamic Client Assignment: Clients can be dynamically assigned or migrated to a dedicated game server during runtime—for example, when transitioning from a lobby to a match server. This is handled without session disruption, using low-latency signaling and cluster-aware routing.
Bidirectional Data Relay: CSAR supports bidirectional, protocol-agnostic communication (TCP, UDP, and Diarkis RUDP) between clients and dedicated servers, ensuring reliable, ordered packet delivery with support for retransmission and flow control when needed.
Session Continuity and State Preservation: Client redirection maintains full session context, allowing persistent gameplay experiences across server boundaries without requiring re-authentication or handshake renegotiation.
Cluster-Based Load Balancing: Server assignments are distributed intelligently across the Diarkis cluster using CSAR’s built-in load-aware routing logic, ensuring optimal resource utilization and horizontal scalability.
Diarkis CSAR is purpose-built to support server authoritative multiplayer architectures that demand dedicated game server logic, while maintaining the advantages of Diarkis’ decentralized infrastructure, high availability, and real-time responsiveness. It bridges the gap between flexible client networking and robust server-side control—ideal for fast-paced, session-based multiplayer games.
Diarkis Client SDK
The Diarkis client is written in C++. There is also a C# interface available. The client SDK includes plugins for Unreal Engine and Unity Engine.
Diarkis Modules
Diarkis includes built-in modules that game developers can utilize.
Last updated
Was this helpful?