Game Server
Running a game server doesn't end when the game is installed — that's where the actual work starts. The articles in this category cover the operations side: preparing a server on Linux, tuning it for performance, building a backup strategy, protecting against DDoS, and setting up monitoring. I learned by doing that when player counts climb, the first thing to fall over is usually not the game but the database or disk I/O; that a backup only counts as a backup once you've tried restoring it; and that monitoring has to be in place before something breaks, not after. The goal is to give anyone running their own server enough foundation to understand what happened instead of panic-searching at midnight.
MySQL Deadlock: What It Is and How to Fix It
Why does a MySQL deadlock happen and how do you fix it? InnoDB lock logic, reading the log and ordering transactions, step by step.
Server Log Management: Size Control with logrotate
Master server log management with logrotate: rotate, compress and keep your game server logs from filling the disk.
Linux Performance Commands: Finding Bottlenecks
Use the Linux performance commands top, htop, iostat and vmstat to pinpoint server bottlenecks across CPU, RAM and disk I/O step by step.
Game State Synchronization: Consistency on the Server
How does game state synchronization work? We cover authoritative servers, interpolation and tick-based updates for client consistency.
What Is CMake? Build a Multi-File C++ Server Project
What is CMake and how do you build a multi-file C++ server project from scratch? Targets, libraries and a practical, working setup.
MySQL Connection Pool: A Connection Management Guide
How a MySQL connection pool removes the cost of opening a new connection per request and dramatically reduces server load.
Game Latency Reduction: Location, Routing and Code
Three layers to lower game latency: the right server location, network route optimization and tick/packet tuning in code.
SSH Security: Key-Based Login and fail2ban Guide
Harden SSH security with key-based login, disabling passwords, port changes and brute-force protection using fail2ban, step by step.
Game Anti Cheat Architecture: Server-Side Validation
The foundation of game anti cheat architecture: server-side validation, the authority model and the logic of cheat detection.
C++ Socket Programming: Build a Simple TCP Server
Learn c++ socket programming step by step by building a working TCP server with the Berkeley sockets API on Linux.
Server Scaling for Games: Horizontal vs Vertical
Server scaling for game backends: a bigger machine or more machines? The real trade-offs of vertical vs horizontal scaling and how to choose.
MySQL Replication: A Master-Replica Setup Guide
A step-by-step guide to MySQL replication: build a master-replica setup, offload reads, enable GTID and monitor the replica with real commands.
Server Backup: Game Server Disaster Recovery Guide
Protect your game server from data loss with automated server backup, offsite copies and a tested restore plan.
systemd Service: Auto-Start Your Game Server
Use a systemd service file to auto-start your game process on boot, restart it on crash, and read its logs with journalctl.
Game Loop Tick Rate: Designing the Server Loop
What is game loop tick rate, why a fixed timestep matters and how to build a stable server loop. Explained with practical C++ examples.
C++ Memory Management: How to Prevent Leaks
A practical guide to C++ memory management: use RAII, smart pointers and Valgrind to catch leaks and write clean, stable code.
Server Monitoring for Game Servers with Grafana & Prometheus
Set up game server monitoring with Prometheus, node_exporter and Grafana to track CPU, RAM and player metrics live.
iptables Firewall: A Practical Linux Server Guide
Set up an iptables firewall on your Linux server: write port rules, drop unwanted traffic and filter basic attacks. A hands-on, step-by-step guide.
Game Server DDoS Protection: A Layered Strategy
A practical guide to defending a game server DDoS by combining an anti-DDoS provider, firewall and rate-limit layers.
MySQL Slow Query Log: Finding Costly Queries
How to enable the MySQL slow query log, which settings matter, and how to find your most costly queries with pt-query-digest, step by step.
MySQL my.cnf Tuning: A Performance Settings Guide
A step-by-step guide to optimizing your MySQL my.cnf with buffer pool, connection and log settings for real server performance gains.
MySQL Index Optimization: Fixing Slow Queries
A practical guide to diagnosing slow queries with EXPLAIN and speeding up your database with the right MySQL index.
Game Packet Design: Headers, Serialization, Byte Order
Game packet design: how to build a solid binary protocol over TCP with headers, serialization and byte order.
TCP vs UDP for Game Servers: Which to Choose?
The TCP vs UDP game server decision: reliability or low latency? We break down both protocols, real scenarios and the right choice.