Alien Swarm: Reactive Drop

Alien Swarm: Reactive Drop

Not enough ratings
Tutorial for Hosting ASRD Servers Using Budget Cloud Servers + Home PC
By 法克*尤尔*马泽尔
For server owners using cloud servers, the monthly rental costs are typically high. Cloud service providers usually offer packages with significant limitations - either cheap with low performance or high-performance with expensive pricing. Additionally, while personal computers have sufficient hardware capabilities, they often suffer from poor network quality. This tutorial provides a method to combine budget cloud servers with home PCs for server hosting.
   
Award
Favorite
Favorited
Unfavorite
Advantages and Limitations of the Solution
Core Advantages

  • 🌐 Perfectly combines the superior network of cloud servers with the powerful computing capabilities of home PCs
  • 💰 Dramatically reduces cloud server costs
  • 🚀 Breaks through CPU/RAM performance bottlenecks of cloud servers
  • 🛡️ Completely avoids NAT type issues in home networks
  • ⚡ Quick deployment without complex networking knowledge

Important Considerations

  • 🔌 Requires a permanently running PC
  • ⚡ Additional electricity costs and hardware depreciation (negligible compared to cloud server savings)
  • 🖥️ Linux systems recommended for better network performance (this tutorial covers Windows; Linux setup is similar)
Key Technology Analysis
BGP Multi-line Access Principle

Cloud service providers' networks are generally of higher quality than home broadband with greater bandwidth. Players from different ISPs connecting to cloud servers experience much lower latency. This is because cloud server providers' data centers are mostly BGP data centers, where the facilities are interconnected with mainstream ISPs' backbone networks via high-speed fiber optics. Additionally, these data centers are equipped with high-end enterprise routers that use BGP protocol for data routing and forwarding, ensuring extremely low network latency and high reliability.

In summary, cloud providers achieve the following through BGP protocol:
  • Intelligent selection of optimal ISP paths
  • Single IP multi-line access (multi-ISP access)
  • 99.9% network availability guarantee
  • <10ms backbone network latency


Reliable UDP Protocol (RUDP)

As a shooter game, ASRD uses raw UDP for communication. UDP is an unreliable protocol by design, providing no guarantee for data transmission reliability. During network peak hours, ISPs may actively discard UDP packets at backbone nodes to alleviate congestion while prioritizing TCP reliability and large clients' data transfers. This explains why home broadband gaming often experiences lag and packet loss during peak times, and why home-hosted servers frequently receive complaints about poor network quality.

To address UDP's unreliability, RUDP introduces application-layer mechanisms such as:
  • Data verification
  • Packet loss retransmission

This maintains UDP's low latency advantages while mitigating its drawbacks.

KCP Protocol

KCP is an open-source reliable UDP protocol created by developer skywind3000, specifically designed for real-time applications. Key features include:
  1. Smart Retransmission Mechanism
    • Selective retransmission: Only retransmit actually lost packets (TCP retransmits all subsequent packets)
    • Dual triggering: Supports both timeout retransmission and fast retransmission (immediate retransmission upon receiving 3 duplicate ACKs)
    • Dynamic RTT prediction: Real-time network round-trip time calculation with 30% shorter retransmission timeout threshold than TCP

  2. Flow Control & Congestion Control
    • Bandwidth adaptation: Dynamically adjusts sending rate based on packet loss rate (non-TCP "multiplicative decrease" mode)
    • Optional transmission modes: Provides Normal/Fast/Turbo modes, with Turbo mode offering 30% lower latency than TCP

  3. Forward Error Correction Optimization
    • FEC encoding support: Generates M redundant packets for every N data packets (e.g., 2:1 configuration resists 30% packet loss)
    • Packet fragmentation: Automatically splits large packets to avoid MTU limits, with 40% higher reassembly efficiency than traditional UDP


Typical comparison with TCP: Under 20% packet loss, KCP achieves:
  • 3× TCP throughput
  • 60% lower average latency
  • Only 24-byte header overhead

This protocol trades partial bandwidth efficiency for transmission real-time performance, making it ideal for FPS games and real-time multimedia applications.

KCP-Tube: KCP-based Bidirectional Transparent Forwarding Software

KCPTube is an open-source C++ network acceleration tool deeply optimized for KCP protocol, specifically designed to solve UDP reliability issues in complex network environments. Supports Windows/Linux/macOS. KCP-Tube GitHub Page[github.com]

Network Communication Flow

Player -->| Connect | Cloud[Cloud Server:27050] Cloud -->| KCP Tunnel | HomePC[Home PC:30000] HomePC -->| Local Forward | GameServer[ASRD Service:27050]

The bidirectional packet forwarding between cloud server and home PC remains transparent to both ASRD server and players:
  • ASRD server sees connections from local LAN
  • Players connect to the cloud server
Detailed Setup Guide
0. Find an Idle Computer

You need an idle personal computer. Even a several-year-old PC typically outperforms cloud providers' budget plans. You may use your main PC if acceptable.

Note:
- ASRD server and KCP-Tube server must run on this PC
- Prepare for 24/7 operation
- Ensure your home broadband has a public IPv4 address (contact ISP if unavailable, usually free)

Record your home broadband's public IPv4 as IP1 (example: 1.1.1.1). This is critical for later steps.

1. Configure KCP-Tube Server on Home PC

Download KCP-Tube[github.com] (supports Windows/Linux/macOS/Docker). It is recommended to read the configuration guides on Github page. Or follow these steps for Windows if you are lazy:

  1. Extract files to e.g., \Desktop\kcptube (contains kcptube.exe). In this directory:
  2. Create server.conf with:
    mode=server kcp=fast2 inbound_bandwidth=300M outbound_bandwidth=30M listen_port=30000 destination_port=27050 destination_address=192.168.1.103 encryption_algorithm=none ipv4_only=true blast=1 fec=1:1 log_path=./

    Configuration details:
    1. mode=server, kcp=fast2 (refer to GitHub docs)
    2. Bandwidth values must match your actual ISP limits
    3. Adjust listen_port, destination_address, destination_port to match your LAN IP. DO NOT USE 127.0.0.1 since ASRD server might reject connections from 127.0.0.1.
    4. encryption_algorithm=none avoids performance overhead
    5. blast=1 enables burst transmission
    6. fec=1:1 adds redundancy for 50% packet loss tolerance

  3. Create start-server.bat with:
    kcptube.exe server.conf pause

  4. Run start-server.bat. Successful output:
    kcptube version ******* Error Found in Configuration File(s): No Servers: 1 Relays: 0 Clients: 0 kcptube is running in server mode


2. Configure Router Port Forwarding

If your PC uses LAN IP (e.g., `192.168.*.*`):
- Forward UDP port 30000 on router to PC's local IP:port
- For non-public IP users: Configure UDP hole punching via KCP-Tube (see GitHub docs)

At this stage:
- Internet → IP1:30000 → Router → PC 192.168.1.103:30000 → KCP-Tube → 27050
- Non-KCP packets will be discarded

3. Rent Cloud Server

Choose cheapest cloud plan meeting bandwidth requirements:
  • Record cloud server IP as IP2 (example: `2.2.2.2`)
  • Open UDP port PORT1 (e.g., `27050`) in firewall/security group


4. Configure KCP-Tube Client on Cloud Server

  1. Extract files to e.g., \Desktop\kcptube
  2. Create client.conf with:
    mode=client kcp=fast2 inbound_bandwidth=200M outbound_bandwidth=200M listen_port=27050 destination_port=30000 destination_address=1.1.1.1 encryption_algorithm=none ipv4_only=true blast=1 fec=1:1 log_path=./

    Key points:
    1. mode=client with matching kcp value
    2. Set destination_address=IP1 and destination_port=30000
    3. Keep encryption/IPv4/blast/fec consistent with server config

  3. Create start-client.bat with:
    kcptube.exe client.conf pause

  4. Run start-client.bat. Successful output:
    kcptube version ******* Error Found in Configuration File(s): No Servers: 0 Relays: 0 Clients: 1 kcptube is running in client mode


Now all traffic to IP2:27050 transparently forwards to home PC's 27050.

5. Run ASRD Server on Home PC

Standard server setup with one additional critical parameter -hostip IP2. For example:
srcds.exe -appid 582400 -ip 0.0.0.0 -port 27050 -hostip 2.2.2.2 -game reactivedrop -maxplayers 12 +exec server.cfg +map lobby


For SrcdsGuardian users:
SrcdsGuardian.exe -appid 582400 -ip 0.0.0.0 -port 27050 -hostip 2.2.2.2 -game reactivedrop -maxplayers 20 +exec server.cfg +map lobby

Note: -hostip parameter forces Steam to report cloud server IP (IP2) instead of actual home IP.