Skip to content
Cloud & Infrastructure

FiveM Infrastructure

Hardened, automated infrastructure for high-concurrency multiplayer servers, where a single unmitigated attack ends a community.

Year
2024
Type
High-concurrency game server platform
Status
Live
Audience
Multiplayer community operators and the players who depend on persistent state.
FiveM Infrastructure system visual
01Overview

The context.

The platform runs persistent multiplayer game servers with hundreds of simultaneous players and continuous state mutation.

It began as a rescue: the community was being taken offline by volumetric attacks and losing player state to unrecoverable crashes.

The rebuild treated the deployment as production infrastructure — immutable images, edge filtering, real backups and measurable recovery.

02Problem

What was actually broken.

Pain observed
  • Volumetric and application-layer attacks took servers down weekly.
  • Configuration lived on the server and existed nowhere else.
  • Crashes lost hours of player progression with no recovery path.
  • Resource contention made peak-hour latency unplayable.
Business risk

Player trust collapses after the second unrecoverable outage.

Technical constraint

Sustaining low-latency real-time state under hostile traffic, with no maintenance window the community would tolerate.

03Solution

What was engineered.

  • Edge filtering and rate limiting in front of every entry point, with per-connection anomaly scoring.
  • Infrastructure as code: every server rebuildable from a signed image in minutes, with zero manual configuration.
  • Continuous state snapshots with tested point-in-time recovery, measured by actual restore drills.
  • Resource isolation per service, plus metrics and alerting on the signals that predict a bad night.
04Architecture

Layer by layer.

Frontend

Operator control panel with live player, resource and incident views.

  • React
  • TypeScript
  • WebSocket
Backend

Control-plane API orchestrating provisioning, restarts and snapshots.

  • Node.js
  • TypeScript
  • Job queue
API

Authenticated admin API with signed, audited privileged actions.

  • REST
  • HMAC
  • Audit log
Database

Relational player state with aggressive index tuning and hot backups.

  • PostgreSQL
  • PITR
Edge

Traffic scrubbing, rate limiting and connection reputation at the perimeter.

  • DDoS mitigation
  • WAF
  • Anycast
Infrastructure

Immutable containerised nodes provisioned from declarative definitions.

  • Docker
  • Ansible
  • Infrastructure as code
Authentication

Hardware-key protected admin access with least-privilege service accounts.

  • 2FA
  • SSH certificates
  • Least privilege
Observability

Metrics, logs and traces with alerting on leading indicators.

  • Prometheus
  • Grafana
  • Loki
05Decisions

The why behind each trade-off.

Why immutable infrastructure?

Servers repaired by hand drift until nobody knows what is running. Rebuilding from a signed image makes recovery a routine operation rather than an archaeology exercise.

Why Docker for game workloads?

Resource isolation and reproducible runtime. One misbehaving resource can no longer starve the process everyone else depends on.

Why edge filtering instead of host-level rules?

Volumetric traffic must die before it reaches the origin. Filtering at the host means the link is already saturated by the time the rule fires.

Why restore drills?

A backup that has never been restored is a hypothesis. Scheduled drills turned recovery time into a number the operator can quote.

06Challenges

What resisted.

  • Security

    Attack patterns evolved every few weeks, so mitigation had to be layered and observable rather than a single static ruleset.

  • Performance

    Peak-hour tick stability required profiling the real workload; the fix was I/O scheduling and query shape, not more CPU.

  • Deployment

    Zero acceptable downtime meant staged rollouts with instant rollback to the previous known-good image.

  • Reliability

    Snapshot cadence was tuned against measured state-change rates so worst-case loss stayed within a defined bound.

07Lessons

What it taught.

  • Availability is a security property. Uptime you cannot defend is uptime you do not have.
  • Untested recovery is not recovery. The drill is the deliverable.
  • Real-time systems reward profiling over provisioning almost every time.
08Results

Measured, not claimed.

400+

Concurrency

Simultaneous players at sustained peak.

99.9%

Attack uptime

Availability maintained under mitigation.

6 min

Rebuild time

Full node reconstruction from image.

<5 min

Recovery point

Worst-case state loss, drill-verified.

09Gallery

The system in context.

Edge-to-origin traffic path with scrubbing layers.
Edge-to-origin traffic path with scrubbing layers.
Operator console with live incident and resource telemetry.
Operator console with live incident and resource telemetry.

Technology stack

Frontend
  • React
  • TypeScript
  • Tailwind CSS
Backend
  • Node.js
  • TypeScript
  • Job queues
Infrastructure
  • Docker
  • Ansible
  • Nginx
  • Linux hardening
Security
  • WAF
  • DDoS mitigation
  • 2FA
  • Least privilege
Observability
  • Prometheus
  • Grafana
  • Loki
Next case studyAgriPen