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, select the required configurations and 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 more information about the billing methods for these three types, see Billing.
Region
Select the gateway's region.
ImportantAfter the resource is created, you cannot change its region.
Instance Name
Enter a custom name for the gateway. A recommended naming convention is `environment` or `environment-business_realm`, such as `test` or `order-prod`. The name can be up to 64 characters long.
Instance Specification
Select node specifications based on your actual requirements. For the capacity specifications of different gateway specifications, see Product selection. The Serverless edition does not have gateway specifications.
Resource Group
Use the default resource group or an existing resource group. To create a new resource group, click Create Resource Group.
NoteUse resource groups to classify and manage resources under your Alibaba Cloud account. This lets you manage permissions, deploy resources, and monitor resources by group instead of managing each resource individually.
Network Type
Supports three access types: Public Network, Private Network, and Public + Private.
Internet: When you access the gateway over the Internet, you incur data transfer costs for traffic that is uniformly billed based on Cloud Data Transfer (CDT) and uses the Border Gateway Protocol (BGP) in a multi-line pattern. For more information, see Internet data transfers.
Private Network: No data transfer costs are incurred for access over a private network.
Internet + Private Network:
When you access the gateway over the internet, data transfer costs are incurred. Internet traffic is billed based on CDT and uses the BGP (multi-line) mode. No data transfer costs are incurred for access over a private network.
Private Network
Select the virtual private cloud (VPC) where the gateway instance runs. To create a new VPC, go to the VPC console.
NoteThe VPC of the gateway must be the same as the VPC of the service.
Select Zone
Select Auto-assign or Manually Select.
Auto-assign: Select a vSwitch, and the system automatically allocates 2 zones to deploy gateway nodes.
Manually Select: 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 console.
Simple Log Service
Select Use Simple Log Service to activate Simple Log Service (SLS) and enable the gateway log delivery feature, providing 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 the AI Gateway configuration details and then click Activate Now.
NoteCreating the gateway instance takes 1 to 5 minutes.
Return to the AI Gateway Instance page. Verify that the gateway information is correct and that the Status is Running. This indicates that the gateway was created successfully.
Advanced features
When you create a gateway instance, you can configure advanced features to use log data for monitoring and analysis or to compress requests and responses to reduce gateway traffic. You can enable Gzip hardware acceleration only when you create the instance. You cannot enable this feature after the instance is created. However, there are no restrictions on when you can enable Simple Log Service (SLS).
Enable Gzip hardware acceleration
Gzip hardware acceleration is a technology that uses dedicated hardware devices for fast data compression and decompression. By offloading Gzip compression and decompression tasks from the CPU to dedicated hardware, this technology significantly improves processing efficiency and reduces CPU load.
The Serverless edition does not support Gzip hardware acceleration.
Procedure
On the AI Gateway purchase page, set the following parameters and click Buy Now to create a gateway instance:
Region: Gzip hardware acceleration is supported in the Hangzhou, Beijing, Shanghai, Shenzhen, Ulanqab, China (Hong Kong), and Singapore regions.
This feature may not be available in all zones within the supported regions. For the most up-to-date information, refer to the product purchase page.
Instance Specification: Select aigw.medium.x1 or higher.
GZIP Hardware Accelerator: Select this option to enable Gzip hardware acceleration.
Zone: Select a zone that Supports Gzip hardware acceleration and then select a vSwitch.
After the instance is created, click the ID or name of the target instance. In the navigation pane on the left, click Parameters. In the Gateway Engine Parameters area, edit the EnableGzipHardwareAccelerate parameter.
NoteIf you did not select Enable Gzip Hardware Acceleration when you purchased the instance, you cannot enable this feature later.
After you enable this feature, the client must be able to process Gzip-compressed data. For supported clients, add the
Accept-Encoding: gziprequest header.
Performance reference
Enable gateway log delivery
To collect, store, and analyze gateway operational logs, you can activate Simple Log Service (SLS) when you create a gateway instance. This allows for log analysis and dashboard monitoring.
When you create the gateway instance, select Use Simple Log Service. This action activates SLS and enables the gateway log delivery feature.
After you enable log delivery, you can go to to view gateway logs.