A unified access cluster acts as a unified access point and a cell-based gateway. Unified access clusters are deployed and managed in parallel within each Kubernetes cluster. Multiple parallel unified access clusters combine to form a federated access cluster, which is a logical cluster entity. The unified access gateway uses a cluster to load balance service traffic. You can plan your clusters based on traffic type, such as public or internal.
After the cluster is online, you must create a unified access instance and an access configuration for Server Load Balancer or unified access to enable traffic access and routing. You must set the specific forwarding and listener rules in Application service access configuration.
Component roles
The main role of the unified access gateway is to forward requests. It identifies the target application for a user request based on the routing type, domain name, and path information in the request, and then forwards the request.
Routing types
Routing is divided into two main types: Gzone routing (non-cell-based routing) and Rzone routing (cell-based routing).
Gzone routing: A target server group is randomly selected based on the target application and target cell type. If multiple target server groups exist, traffic is distributed based on the weight of each group.
Rzone routing: When the final destination of a user request is identified as an Rzone server, a lock is parsed from the user request's cookie to calculate a specific Rzone routing destination. The parsing steps are as follows:
The key for the lock is zone_op. The value is calculated from this key.
The target cell is calculated and the request is forwarded based on this value.
Routing example
Assume that the following routing rules are set based on the value range of zone_op:
[00,49]: Route to the rz00 cell.
[50,99]: Route to the rz01 cell.
The routing results are as follows:
If the value of zone_op is outside the [00,99] range: Traffic is routed to the server group of the target application in the data center where the current spanner is located. If multiple target server groups exist, traffic is distributed based on the weight of each server.
If the value of zone_op is within the [00,49] range: Traffic is routed to the target server in the rz00 cell of the target application. If multiple target server groups exist, traffic is distributed based on the weight of each server.
If the value of zone_op is within the [50,99] range: Traffic is routed to the target server in the rz01 cell of the target application. If multiple target server groups exist, traffic is distributed based on the weight of each server.
Scenarios
The main scenarios are as follows:
In active geo-redundancy, elastic traffic, and disaster recovery switchover scenarios, you must manage data center traffic using allocation and shifting.
After you dynamically modify routing rules, the access routing component routes service traffic to the new target data center based on the new rules. This enables traffic allocation, elastic capacity, and disaster recovery switchovers.
Deployment method: Per-data center deployment. This means that one access routing cluster is deployed in each data center.
Notes
Containers in a unified access cluster can only be scheduled to dedicated unified access nodes. Therefore, you must ensure that sufficient resources are available for scheduling when you create a unified access cluster.
If a scheduling failure occurs because of insufficient resources after you create the cluster, you can scale out the nodes on the cluster management page and select the Unified Access Node type. For more information, see Scale out a cluster.
A unified access cluster spans multiple zones. Therefore, you must ensure that each zone has sufficient resources.
Procedure
Log on to the console.
In the navigation pane on the left, choose Network > Unified Access Clusters to go to the Unified Access Clusters page.
Click Create Gateway Cluster, configure the following parameters, and then click Submit.
Configure the basic information.
Configuration Item
Description
Cluster Name
The name can contain only lowercase letters, digits, and hyphens (-). It must start with a letter and end with a letter or a digit. The name must be 1 to 29 characters in length.
Network Type
The available network types are internal and public. After you specify the network type for a cluster, you can only create unified access instances of the same network type on that cluster.
Initial Cluster Status
Set the status to Online or Maintenance.
Online: The gateway cluster provides external traffic forwarding services and can accept updates to forwarding rules.
Maintenance: The gateway cluster only provides external traffic forwarding services and does not accept requests to update forwarding rules.
Container Specifications
The total resources of a single node in a unified access cluster are the sum of the fixed resources for the control plane and the custom resources for the data plane. The container specifications and the number of nodes determine the request processing capacity of the cluster. For more information, see Stress testing results.
Fixed resources for the control plane: The specifications are fixed at 1C/1G/10G (CPU/memory/disk).
Custom resources for the data plane: You can customize the resources. The recommended minimum specifications are 4C/8G/40G. The ratio of CPU to memory to disk capacity is 1:2:10. Typically, data plane specifications of 1C/2G/10G can support 3,200 QPS of short-lived HTTP connections.
Host network mode
The network model used by the gateway cluster.
If you select Yes, pods use the IP address of the host where the containers are located.
If you select No, each pod has an independent IP address.
NoteIn high-density deployment mode, you can only select No, which is non-host mode.
Configure the container version.
Configuration Item
Description
Name
The version name of the gateway container. The name must be 1 to 5 characters in length. It can contain only lowercase letters, digits, and hyphens (-). It must start with a letter and end with a letter or a digit.
Container Image
The Registry Address of the gateway container. Enter
registry.cn-hangzhou.aliyuncs.com/sofastack/spanner:1.3.0.NoteThe image version has been updated from spannerplus 1.1.0 to spanner 1.3.0.
Number of Replicas
The number of gateway nodes. For disaster recovery, a cluster should contain at least three nodes. Plan the container specifications and number of nodes based on your capacity requirements.
NoteCreating a gateway cluster with zero replicas makes the cluster unavailable. You must scale out the cluster again.
Label
Enter a key and a value to add a label to the gateway containers of this version.