Skip to main content

Room-Based Game Network Access

Network Model

For games that require room creation, we typically need to assign an independent public address (IP:Port) for each room. After successful player matching, players are assigned to the same room, and before the game starts, game clients connect to the room through this public address:

Below we introduce methods for assigning independent public addresses for each room in TKE.

EIP Solution

TKE supports binding EIPs to Pods. Each Pod is assigned an independent public IP, and the room's public address becomes the Pod's EIP + the port number monitored by the room process.

Configuration method reference: Pod Binding EIP.

CLB Mapping Solution

Install the tke-extend-network-controller plugin to implement public address mapping for each Pod using CLB layer 4 listeners. Each Pod occupies one port on the CLB, and the room's public address within the Pod becomes the public IP or domain name of the CLB instance bound to the Pod, along with the corresponding listener port number.

Installation and configuration method reference: Using CLB to Assign Public Address Mapping for Pods.

Solution Comparison and Selection

SolutionCostResource ConsumptionUsage Limitations
EIPIP resource fees (charged when idle) + network fees, refer to EIP Billing OverviewOne EIP can only bind to one Pod, requiring more EIP resourcesEIP resources are relatively limited, with application quantity limits and daily application frequency limits (refer to EIP Quota Limits), making it less suitable for large-scale use
CLB MappingInstance fees + network fees, refer to CLB Billing OverviewOne CLB can bind to many Pods, controllable CLB instance consumptionCLB has listener quantity and instance quantity quota limits, mainly listener quantity limits (default 50), meaning a single CLB can map addresses for 50 Pods (refer to CLB General Limits), but these limits can be adjusted based on demand through support tickets, making it suitable for large-scale use