This topic describes how to create an AI Gateway instance.
Procedure
Log on to the AI Gateway console.
In the navigation pane on the left, choose Instance. In the top menu bar, select a region.
-
Click Create Instance. On the AI Gateway purchase page, configure the required settings, then click Buy Now.
Configuration Item
Description
Product Type
Supports Dedicated Instance (Pay-as-you-go), Dedicated Instance (Subscription), and Serverless (Pay-as-you-go). For billing details of these types, see Billing Overview.
Region
Select the region for your gateway.
ImportantYou cannot change the region after the resource is created.
GatewayName
Enter a custom name for your gateway. We recommend using environment names or environment plus business domain names, such as test or order-prod. The name can be up to 64 characters long.
GatewaySpec
Select node specifications based on your needs. For capacity details of different gateway specifications, see Gateway Types. Serverless instances do not have gateway specifications.
resource
Select the default resource group or an existing one. To create a new resource group, click Create Resource Group.
NoteUse resource groups to categorize and manage resources under your Alibaba Cloud account. This lets you manage permissions, deploy resources, and monitor resources by group instead of handling each resource individually.
Network Type
Supports three access types: Public Network, Private Network, and Internet + Private Network.
-
Internet: Accessing the gateway over the Internet incurs data transfer costs. Internet traffic is billed through Cloud Data Transfer (CDT) using Border Gateway Protocol (BGP) (multi-line) mode. For more information, see Internet Traffic.
-
Private Network: No data transfer costs apply.
-
Internet + Private Network:
Accessing the gateway over the Internet incurs data transfer costs billed through CDT using BGP (multi-line) mode. Accessing over the private network incurs no data transfer costs.
VPC
Select the VPC where the gateway instance runs. To create a new VPC, go to the VPC Management Console.
Note-
The VPC of the gateway must match the VPC of your backend services.
-
When selecting a VPC, the system shows whether containers or Nacos clusters exist in it to help avoid incorrect selections.
Zone Selection
Select Automatic Allocation or Manual Selection.
-
Automatic Allocation: Select one vSwitch. The system automatically allocates two zones to deploy gateway nodes.
-
Manual Selection: Manually select the zones and vSwitches for deploying gateway nodes.
vSwitch
Select the vSwitch where the gateway instance runs. To create a new vSwitch, go to the VPC Management Console.
Simple Log Service
Select Use Simple Log Service (SLS) to enable SLS and activate log delivery for log analysis and dashboards. For more information, see Enable Gateway Log Delivery.
Service-linked Role
Automatically created. This role allows AI Gateway to access other Alibaba Cloud services.
-
-
On the Confirm Order page, review your AI Gateway configuration and click Buy Now.
NoteCreating a gateway instance takes 1 to 5 minutes.
-
Return to the AI Gateway Instance page. Verify that the gateway information is correct and the Status is Running. This indicates that the gateway was created successfully.
Advanced Features
When creating a gateway instance, if you want to use log data for monitoring and analysis or compress request and response payloads to reduce traffic, follow the instructions below. Note that Gzip hardware acceleration can only be enabled during gateway creation—it cannot be enabled afterward. Log service has no such restriction.
Enable Gzip Hardware Acceleration
Gzip hardware acceleration uses dedicated hardware to compress and decompress data quickly. By offloading Gzip decompression tasks from the CPU to specialized hardware, this feature significantly improves processing efficiency and reduces CPU load.
Serverless instances do not support Gzip hardware acceleration.
Procedure
-
On the AI Gateway purchase page, complete the following configurations before clicking Buy Now:
-
Region: Gzip hardware acceleration is available in Hangzhou, Beijing, Shanghai, Shenzhen, Ulanqab, China (Hong Kong), and Singapore.
Some zones within supported regions may not support this feature. Refer to the product purchase page for the latest availability.
-
GatewaySpec: Select a specification of aigw.medium.x1 or higher.
-
Gzip Hardware Acceleration: Check to enable Gzip hardware acceleration.
-
Available Zone: Select a zone that supports Gzip hardware acceleration and choose a vSwitch.
-
-
After the instance is created, click the instance ID or name. In the navigation pane on the left, click Parameters. In the Gateway Engine Parameters section, edit the EnableGzipHardwareAccelerate parameter.
NoteIf you did not select Enable Gzip Hardware Acceleration during purchase, you cannot enable this setting later.
-
After enabling this feature, ensure your client can handle Gzip-compressed data. Supported clients must include
Accept-Encoding: gzipin the request header.
Performance Reference
Enable Gateway Log Delivery
To collect, store, and analyze operational logs from your gateway, enable Simple Log Service (SLS) during gateway instance creation for log analysis and dashboard monitoring.
While creating the gateway instance, select Use Simple Log Service (SLS). The system will activate SLS and enable gateway log delivery.
After enabling log delivery, go to Observability > Log Center to view gateway logs.
