A Cloud-native API Gateway instance provides service exposure, traffic management, security, and API lifecycle management. This topic explains how to create one.
Basic configuration
-
Log on to the Cloud-native API Gateway console. In the left-side navigation pane, click Instance. On the Instances page, click Instance Creation. On the Cloud-native API Gateway purchase page, configure the following parameters:
-
Product Type: Select Pay-as-you-go or Subscription. For more information about billing, see Billing overview.
-
pay-as-you-go: You are charged hourly. Usage for less than one hour is billed as a full hour. Bills are settled hourly.
-
subscription: You are billed based on a monthly or yearly (12-month) commitment.
-
-
Region: Select the region where you want to deploy the gateway instance. This region must be the same as your backend service's region. You cannot change this setting after the instance is created.
-
Gateway Name: Enter a custom name for the gateway. We recommend using a name that indicates the environment and business domain, such as
testororder-prod. The maximum length is 64 characters. -
GatewaySpec: Select an instance specification based on a capacity assessment of your business needs.
-
Resource Group: Select an existing resource group or use the default one. You can use resource groups to manage permissions, deployments, and monitoring for a group of resources instead of managing each resource individually. To create a new resource group, click Create Resource Group.
-
Network Type: Select Internet, Private Network, or Public + Private.
-
Internet: When the gateway is accessed over the public network, you are charged for outbound traffic. This traffic is billed through Cloud Data Transfer (CDT) and uses the BGP (Multi-ISP) service. For more information, see Public network traffic.
-
Private Network: No data transfer fees are charged for traffic over the private network.
-
Public + Private: When the gateway is accessed over the public network, you are charged for outbound traffic. This traffic is billed through Cloud Data Transfer (CDT) and uses the BGP (Multi-ISP) service. No data transfer fees are charged for traffic over the private network.
-
-
VPC: Select the VPC for the gateway instance. The gateway's VPC must be the same as your service's VPC.
-
Select Zone: Select Auto-assign or Manual Select.
-
Auto-assign: Select the vSwitches for the gateway nodes. The system automatically deploys the nodes across two zones.
-
Manual Select: Manually select the Zone and vSwitches for the gateway nodes.
-
-
-
After you complete the configuration, click Buy Now. On the Confirm Order page, review the configuration details and click Open now.
Instance creation takes 1 to 5 minutes.
-
On the Cloud-native API Gateway Instance page, check the status of the gateway instance you created. A status of Running indicates that the gateway instance was created successfully.
Advanced features
When you create a gateway instance, you can configure advanced features to monitor and analyze log data using Simple Log Service (SLS), or compress requests and responses to reduce traffic using Gzip hardware acceleration. Gzip hardware acceleration can only be enabled when you create a gateway instance and cannot be enabled later.
Enable Gzip hardware acceleration
Gzip hardware acceleration is a technology that uses dedicated hardware to accelerate data compression and decompression. By offloading Gzip compression and decompression tasks from the CPU to dedicated hardware, this feature significantly improves processing efficiency and reduces CPU load.
Procedure
-
On the Cloud-native API Gateway purchase page, after completing the basic configurations, configure the following parameters and click Open now:
-
Region: Gzip hardware acceleration is supported in the following regions: China (Hangzhou), China (Beijing), China (Shanghai), China (Shenzhen), China (Ulanqab), China (Hong Kong), and Singapore.
This feature may not be available in all zones within the supported regions. For the latest information, refer to the product purchase page.
-
GatewaySpec: Select apigw.medium.x1 or a higher specification.
-
Gzip Hardware Acceleration: Select this option to enable Gzip hardware acceleration.
For Instance Specification, select
apigw.medium.x1(Max Client Connections: 384,000, Max New HTTPS Connections/sec: 12,800, Max Short-lived Connection QPS: 28,000, Max Long-lived Connection QPS: 35,000, and SLA: 99.99%). For Resource Group, select Default Resource Group. For Network Access Type, select Public Network. For VPC, select the target VPC. For Zone Selection, click Manual Select, select China (Hangzhou) Zone J and China (Hangzhou) Zone K (both support Gzip hardware acceleration), and then select a VSwitch for each zone.
-
-
After the instance is created, click the ID or name of the target instance. In the left-side navigation pane, click Parameters. In the Gateway Engine Parameters section, edit the EnableGzipHardwareAccelerate parameter.
If you did not select Enable Gzip hardware acceleration during purchase, you cannot enable this parameter.
-
After this feature is enabled, clients must be able to process Gzip-compressed data. For supported clients, add the
Accept-Encoding: gzipheader to requests.
Performance reference
Enable gateway log delivery
To collect, store, and analyze gateway logs, enable Simple Log Service (SLS) when you create a gateway instance. This provides log analysis and dashboard monitoring.
While completing the basic configurations, select Use Simple Log Service (SLS). The system then activates SLS and enables the gateway log delivery feature.
After log delivery is enabled, you can view gateway logs under .
Next steps
-
Cloud-native API Gateway supports multiple API types, including REST API, HTTP API, and WebSocket API. You can configure routing rules or policies for different API types.
-
You can create a service to add a backend service to your instance. The instance then centrally manages the endpoints of your backend services.
-
To configure gateway routing for external access to your internal services, refer to Use an HTTP API to access applications in Container Service for Kubernetes (ACK).
-
If you encounter issues while using Cloud-native API Gateway, refer to the FAQ.
