Skip to main content

Server Architecture ๐Ÿ—๏ธ

Overview of Z-Craftโ€™s server infrastructure and technical setup.

Server Infrastructure

Main Servers

ServerTypeSpecsPurpose
SurvivalJava32GB RAM, 16 CPUMain survival world
CreativeJava16GB RAM, 8 CPUUnlimited building
PvP ArenaJava16GB RAM, 12 CPUCompetitive gameplay
BedrockBedrock24GB RAM, 12 CPUCross-platform play
HubProxy8GB RAM, 4 CPUServer selection
DatabasePostgreSQL32GB RAM, 8 CPUPlayer data storage

Network Architecture

Players
  โ†“
Load Balancer (nginx)
  โ†“
Hub Server (Paper)
  โ†“
Survival / Creative / PvP / Bedrock
  โ†“
Database (PostgreSQL)
Cache (Redis)

Hosting Provider

  • Provider: Premium Dedicated Servers
  • Location: Multiple regions (US East, EU Central, AU Sydney)
  • Uptime SLA: 99.9%
  • DDoS Protection: Enterprise-grade protection
  • Backup: Daily backups, 30-day retention

Server Software

Java Servers

Server Software: Paper (fork of Spigot)
  • Latest versions for performance
  • Regular security updates
  • Plugin support

Bedrock Server

Server Software: BDS (Bedrock Dedicated Server)
  • Official Microsoft server
  • Cross-platform compatibility
  • Regular updates

Database

System: PostgreSQL 14
  • Player accounts and progression
  • Economy data
  • Chat logs and moderation records
  • Scheduled backups

Cache Layer

System: Redis
  • Session caching
  • Real-time data
  • Command rate limiting
  • Performance optimization

Performance Monitoring

Uptime Monitoring

  • Tool: Nagios + Grafana
  • Alerts: Instant notifications
  • Response Time: < 15 minutes
  • Status Page: status.z-craft.xyz

Metrics Tracked

  • Server CPU and memory usage
  • Player count and connection rate
  • Network I/O and latency
  • Database query performance
  • Plugin performance
  • Error rates and logs

Performance Targets

  • TPS (Ticks Per Second): 19.8-20 (optimal)
  • Ping (Average): < 50ms
  • Uptime: 99.9% monthly
  • Database Response: < 100ms
  • Backup Completion: < 30 minutes

Backup & Disaster Recovery

Backup Schedule

TypeFrequencyRetentionLocation
HourlyEvery hour24 hoursLocal storage
Daily3 AM UTC30 daysOff-site storage
WeeklySundays3 monthsEncrypted cloud
Monthly1st of month1 yearSecure archive

Recovery Procedures

Full Server Recovery:
  1. Notify players of outage
  2. Stop all servers
  3. Restore from latest backup
  4. Verify data integrity
  5. Restart servers gradually
  6. Monitor for issues
Partial Recovery:
  • Restore specific world regions
  • Recover player data
  • Reverse recent transactions
  • Update affected players
RTO (Recovery Time Objective): < 2 hours RPO (Recovery Point Objective): < 1 hour

Security Measures

Network Security

  • Firewall: Enterprise firewall with DDoS protection
  • IP Filtering: Whitelist/blacklist for abuse prevention
  • Rate Limiting: Prevent brute force attacks
  • SSL/TLS: Encrypted connections
  • VPN Access: For staff administration

Server Security

  • Plugin Validation: Scan all plugins before deployment
  • Regular Updates: Security patches applied immediately
  • Permissions: Minimal privilege principle
  • Logs: Comprehensive audit trails
  • Intrusion Detection: Monitor for unauthorized access

Account Security

  • Password hashing (bcrypt)
  • Session tokens
  • IP verification
  • 2FA support
  • Account lockout protection

Performance Optimization

Java Tuning

Memory: -Xmx28G -Xms28G (for 32GB server)
Garbage Collection: G1GC optimizations
Threads: CPU count matched

Paper Optimizations

  • Async chunk loading
  • Entity-per-chunk limits
  • Reduced lag generators
  • Optimized pathfinding
  • Efficient spawning algorithms

Network Optimization

  • Compression enabled for players > 100ms ping
  • View distance adjustment per client
  • Entity culling
  • Chunk loading optimization
  • Player list updates throttled

Plugin Architecture

Custom Plugins

Core Plugins:
  • Economy System
  • Land Claims
  • Teleportation
  • Player Shops
  • Guild System
  • Job System
  • Quest System

Plugin Communication

  • EventBus for inter-plugin communication
  • Shared API for data access
  • Database synchronization
  • Cache invalidation

Plugin Safety

  • Sandboxed execution
  • Permission verification
  • Crash isolation
  • Memory limits per plugin
  • Automatic restart on crash

Scalability

Current Capacity

  • Max Players: 1000 per server
  • Simultaneous Total: 5000+ across network
  • Database: 1 million+ player records

Scaling Strategy

Horizontal Scaling:
  • Add servers as player count grows
  • Load balancer distribution
  • Database replication
Vertical Scaling:
  • Upgrade hardware specs
  • Optimize code
  • Cache improvements

Growth Plan

  • Monitor player growth
  • Capacity planning quarterly
  • Scale proactively
  • Load testing before expansion

Disaster Recovery Plan

Natural Disasters

  • Backup Data Centers: Multiple geographic locations
  • Cloud Redundancy: Off-site encrypted backups
  • Network Redundancy: Multiple ISP connections

Cyberattacks

  • DDoS Mitigation: Enterprise protection
  • Incident Response: 24/7 monitoring
  • Security Updates: Rapid patching
  • Communication: Transparent player updates

Data Loss

  • Hourly Backups: Minimal data loss
  • Encrypted Storage: Secure backup storage
  • Recovery Testing: Monthly drills
  • Multiple Copies: Geographically distributed

Questions about infrastructure? Contact staff ๐Ÿ”ง