Start typing to search across invoices, services, domains, tickets, and more...
A mobile or online game serving Greater China, Southeast Asia, Japan and Korea needs a game backend architecture that keeps account and payment data central but puts real-time battle servers close to players: Hong Kong CN2 GIA for mainland China, Taipei for Taiwan, Tokyo and Seoul for Japan and Korea, and Singapore, Bangkok or Kuala Lumpur for Southeast Asia. IMIDC provides servers in all of these locations, with DDoS protection for launch day and a path from a single VPS to dedicated servers and host nodes.
Split the backend by how much state each tier holds, because stateless tiers scale by adding boxes while stateful tiers need careful placement.
| Tier | Job | Typical protocol | State | Where to run it |
|---|---|---|---|---|
| Login / account | Auth, SDK login, anti-cheat checks, payments callback | HTTPS | Stateless (DB-backed) | One home region, behind CDN/DDoS protection |
| Gateway | Holds client connections, routes messages, rate-limits | TCP / WebSocket | Session only | Every player region |
| Lobby / matchmaking | Friends, chat, guilds, queues | TCP / WebSocket | Light (Redis) | Home region or per region |
| Room / battle | Authoritative simulation, ticks at 15–60 Hz | UDP (KCP) or TCP | In-memory, per match | As close to players as possible |
| Data | Player profiles, inventory, leaderboards, logs | Internal | Durable | Home region, replicas nearby |
Battle servers should be disposable: if one dies, only the matches on it end. Everything a player owns lives in the data tier.
Use TCP or WebSocket for turn-based, card and idle games, and UDP with a reliability layer such as KCP for action, shooter and MOBA-style real-time play.
| Transport | Best for | Strength | Weakness |
|---|---|---|---|
| TCP | Card, RPG, SLG, idle games | Simple, reliable, firewall-friendly | Head-of-line blocking: one lost packet stalls everything on lossy mobile links |
| WebSocket | H5 / mini-games, web clients | Works through proxies and CDNs | Same stalls as TCP; slightly more overhead |
| Raw UDP | Position updates you can afford to lose | Lowest latency | You build ordering, reliability and encryption yourself |
| KCP over UDP | MOBA, shooters, racing, real-time PvP | Fast retransmit; often noticeably lower jitter than TCP on lossy networks | More bandwidth (redundant sends); some corporate/campus networks block UDP, so keep a TCP fallback |
Place battle servers by where players physically are and how their ISPs route, then verify with real mtr traces from each target network.
| Player market | IMIDC location | Why |
|---|---|---|
| Mainland China | Hong Kong | CN2 GIA (AS4809) avoids the congested public international links that many standard routes use at peak hours |
| Taiwan, Hong Kong, Macau | Taipei, Taiwan | Local native IPs and short paths to Taiwanese ISPs |
| Japan | Tokyo, Japan | Japan's main network hub; CN2 option if the same server also serves mainland players |
| South Korea | Seoul, South Korea | KT network with Korean native IPs; Korean players notice even small latency differences |
| Singapore, Malaysia, Indonesia, Philippines | Singapore or Kuala Lumpur (via sales) | Submarine-cable hub for maritime Southeast Asia |
| Thailand, Vietnam, Cambodia | Bangkok, Thailand (via sales) or Hong Kong | Shorter mainland-Southeast-Asia paths |
One compliance note: hosting in Hong Kong needs no ICP filing, but publishing a game to mainland Chinese players is regulated separately (for example, game publishing approval). Server location does not change that; check with a qualified advisor. This is not legal advice.
Default Linux socket buffers are sized for general workloads; bursty game traffic needs larger UDP buffers and backlogs.
# /etc/sysctl.d/90-game-udp.conf (battle / room servers)
net.core.rmem_max = 26214400
net.core.wmem_max = 26214400
net.core.rmem_default = 1048576
net.core.wmem_default = 1048576
net.core.netdev_max_backlog = 50000
net.ipv4.udp_rmem_min = 16384
net.ipv4.udp_wmem_min = 16384
net.core.somaxconn = 65535
net.ipv4.ip_local_port_range = 10240 65000
fs.file-max = 2097152
# apply and verify
sysctl --system
sysctl net.core.rmem_max
# watch for dropped UDP packets during load tests
netstat -su | grep -Ei "receive buffer errors|packet receive errors"
# open the battle-server port range (ufw example)
ufw allow 7350/tcp
ufw allow 30000:30999/udp
If receive buffer errors keeps climbing during a load test, the kernel is dropping packets before your server reads them: raise the buffers, pin game processes to cores, or run fewer rooms per process. Also enable BBR on TCP gateways and raise ulimit -n for processes holding many sockets.
Open-source servers such as Nakama (accounts, matchmaking, chat, leaderboards) or Colyseus (Node.js rooms) get a studio from prototype to soft launch without writing every service from scratch.
# docker-compose.yml - Nakama game backend + PostgreSQL (single node, staging)
services:
postgres:
image: postgres:16
environment:
POSTGRES_DB: nakama
POSTGRES_PASSWORD: change-me
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
retries: 10
nakama:
image: heroiclabs/nakama:3.22.0
depends_on:
postgres:
condition: service_healthy
entrypoint:
- "/bin/sh"
- "-ecx"
- >
/nakama/nakama migrate up --database.address postgres:change-me@postgres:5432/nakama &&
exec /nakama/nakama --name nakama-hk1
--database.address postgres:change-me@postgres:5432/nakama
--session.token_expiry_sec 7200 --logger.level INFO
ports:
- "7349:7349" # gRPC API
- "7350:7350" # HTTP / WebSocket API for clients
- "127.0.0.1:7351:7351" # admin console: localhost only
restart: unless-stopped
volumes:
pgdata:
# start: docker compose up -d && docker compose logs -f nakama
change-me and set server and session keys before any public test.Redis handles anything hot and short-lived; the relational database handles anything a player would complain about losing.
Game launches are prime DDoS targets, from competitors, extortionists or angry players, so plan protection before the store page goes live.
Scale in stages, moving the tier that hurts first, usually the database or battle servers, to bigger hardware.
| Stage | Rough peak concurrent players | Suggested layout |
|---|---|---|
| Prototype / closed beta | Up to ~2,000 | 1–3 VPS: all-in-one Nakama/Colyseus plus database, e.g. a Hong Kong CN2 GIA VPS and a Japan VPS |
| Soft launch in 1–2 markets | ~2,000–20,000 | Dedicated server for the database, dedicated or large VPS for battle servers per region, Redis on its own instance |
| Full Asia launch | 20,000+ | Host nodes (dedicated servers running Proxmox VE or Kubernetes) packing many battle instances, database primary plus replicas, colocation for your own hardware if needed |
Concurrency per server varies enormously with tick rate and game logic, so treat these numbers as planning ranges and load-test with bots before each stage.
Match the product to the tier and the market rather than buying one size everywhere.
A common split is battle servers on IMIDC Hong Kong CN2 GIA for mainland players and Singapore or Bangkok servers for Southeast Asia, with one shared account and payment backend. Hong Kong alone can also serve parts of Southeast Asia acceptably, but test with real players before deciding.
Turn-based, card and idle games are fine on TCP or WebSocket. Real-time action, shooters and MOBAs benefit from UDP with a reliability layer such as KCP, plus a TCP fallback for networks that block UDP.
No ICP filing is needed for servers hosted outside mainland China, including IMIDC Hong Kong. Game publishing in mainland China is regulated separately, so check with a qualified advisor; this is not legal advice.
IMIDC offers VPS and dedicated servers in Seoul on the KT network and in Tokyo, both with local native IPs, alongside Hong Kong, Taipei and Southeast Asian locations.
Combine provider-level DDoS protection with architecture: hide battle-server IPs until a match starts, require tokens on the first UDP packet, and keep login APIs behind CDN. Tell IMIDC your launch date in advance so capacity and protection can be planned.
Ready to plan your Asia launch? Start with a Hong Kong CN2 GIA VPS or Seoul dedicated server, contact IMIDC sales for Singapore, Bangkok and Kuala Lumpur nodes or a launch-day DDoS plan, or open a ticket to talk through your architecture with an engineer.