Skip to main content

Create an API Gateway

An API Gateway is the foundation of FPT API Gateway: every Route, Service, Upstream, Consumer, and Plugin belongs to an API Gateway. Create one first, before you configure anything else.

warning

Creating an API Gateway provisions real infrastructure (a node cluster and a Load Balancer) in the VPC you select and incurs costs.

Steps 1–2Click Create Gateway and enter Basic Information
1 / 6
Steps 1–2: Click Create Gateway and enter Basic Information

Click the image to zoom in.

Create an API Gateway​

The creation screen is a 4-step wizard: Basic Information → Service Configuration → Endpoint → Review & Create. You move to the next step only when every required field (red *) in the current step is valid.

To create an API Gateway, follow these steps:

  1. Select API Gateway → Gateway in the left menu, then click Create Gateway.

  2. Enter the following information on the Basic Information step:

FieldRequiredDescription
NameYAPI Gateway name, shown in the list and in the API Gateway selector of the Route, Service, and Upstream screens. Up to 255 characters, starting with a letter, using only letters a-z, numbers 0-9, and -. Example: gateway-test-01.
DescriptionNPurpose of the API Gateway, for example which system or environment it serves. Up to 500 characters.
Deployment TypeYSelect Dedicated Cloud: API Gateway runs on your VPC infrastructure, and FPT deploys and operates it. Serverless and Self-managed are coming-soon features.
Access typeYPublic (default): the API Gateway gets a public URL that can be called from the Internet. Private: accessible only within the same VPC.

Basic Information step of the Create API Gateway wizard

  1. Click Next, then enter the Launch configuration information on the Service Configuration step:
FieldRequiredDescription
Cloud ProviderYInfrastructure provider. Pre-filled with FPT Smart Cloud.
TenantYTenant on FPT Cloud Console that owns the resources. The list depends on the signed-in account.
RegionYDeployment region, which affects latency to end users.
VPCYVPC that holds the API Gateway cluster. The list depends on the selected Tenant and Region.
SubnetYSubnet in the VPC above, where the Worker nodes are placed.
Storage PolicyYStorage policy (IOPS level) for the Worker node disks.
FlavorYResources of each Worker node, for example 2 vCPU - 4GB RAM, 4 vCPU - 8GB RAM, 8 vCPU - 16GB RAM. The list shows only flavors that fit the quota of the VPC.
Worker nodesYNumber of nodes in the API Gateway cluster, from 1 to 10.

The Region → VPC → Subnet fields load in order. A field stays empty until the field before it is selected, and changing a field clears the fields after it.

If the Tenant / Region has no VPC, the VPC field shows No data with an FPT Cloud Console Portal link and a Create VPC button. Click either one to open FPT Cloud Console in a new tab, create a VPC, then come back and continue. The Subnet field shows a similar message when the VPC has no Subnet.

VPC field showing No data with the Create VPC button

For development or low load, use 2 vCPU - 4GB RAM with 1 node. For production, use 4 vCPU - 8GB RAM or more with at least 2 nodes, because a single node has no redundancy if it fails.

Launch configuration on the Service Configuration step

  1. Enter the Autoscaling configuration information so the cluster scales the number of nodes with the load:
  • Autoscaling = Enable (default): enter the following information.
FieldRequiredDescription
Minimum nodesYMinimum number of nodes the cluster always keeps, from 1 to 10.
Maximum nodesYMaximum number of nodes the cluster can scale out to, from 1 to 10 and greater than or equal to Minimum nodes.
CPU scale-out thresholdYAverage CPU percentage. Above this threshold, the system considers adding nodes. Default 80.
Memory scale-out thresholdYAverage memory percentage. Above this threshold, the system considers adding nodes. Default 80.
  • Autoscaling = Disable: the 4 fields above are hidden and the cluster runs with exactly the number of Worker nodes you entered.

Service Configuration step with Autoscaling disabled

  1. Select the Load Balancer Size in Load balancer configuration: Basic-1, Basic-2, or Advanced-2. The size sets the number of concurrent connections and the throughput of the Load Balancer in front of the cluster. Choose a larger package when you expect high API traffic.

Autoscaling and Load balancer configuration on the Service Configuration step

  1. Click Next, then choose the endpoints on the Endpoint step:
FieldRequiredDescription
Default EndpointNDomain that the system assigns to the API Gateway. On by default.
Custom DomainNOff by default: a default domain is assigned, and you can add a Custom Domain later. Turn it on to enter a Domain name and select a Certificate that covers it now.

If you turn Default Endpoint off, you must turn Custom Domain on and enter a valid domain and certificate, because the custom domain becomes the only endpoint of the API Gateway.

  1. Click Next to go to the Review & Create step. Review all the information, grouped into Basic Information, Launch configuration, Autoscaling configuration, Load balancer configuration, and Endpoint. To change something, click Previous to go back to that step.

Top of the Review & Create step

Bottom of the Review & Create step with the Create button

danger

Check Tenant, Region, VPC, and Subnet carefully before you create the API Gateway. These values cannot be changed after the cluster is created. If they are wrong, you must delete the API Gateway and create it again.

  1. Click Create to finish.

The message Create API Gateway successfully appears, and the new API Gateway appears at the top of the API Gateway Manager list with the Processing status.

New API Gateway with the Processing status in the list

At any step, you can leave with Cancel or the API Gateway link at the top of the screen. The data you entered is not saved.

Track the status after creation​

Provisioning runs in the background (building the cluster, deploying the API Gateway application, and assigning a domain) and can take up to several hours.

StatusMeaning
ProcessingThe API Gateway is being provisioned and cannot be used yet. The Gateway URL column already has a URL, but it does not serve traffic yet.
ActiveProvisioning succeeded. The Gateway URL works, and you can select the API Gateway on the Route, Service, Upstream, Consumer, and Plugin screens.
ErrorProvisioning failed, and the API Gateway does not serve traffic.

The status refreshes periodically. Click Refresh to update it right away.

Common issues​

ErrorCauseSolution
Name is requiredName is emptyEnter an API Gateway name.
Please select a deployment typeDeployment Type is not selectedSelect Dedicated Cloud.
Name has invalid charactersThe name does not start with a letter, or contains characters other than a-z, 0-9, and -Change the name to follow the rule in Step 2.
Name must be at most 255 characters longThe name is longer than 255 charactersShorten the name.
Description must be at most 500 characters longThe description is longer than 500 charactersShorten the description.
Worker nodes must be at least 1 / Worker nodes must be at most 10Worker nodes is outside the 1–10 rangeEnter a number from 1 to 10.
Minimum nodes must be at least 1 / must be at most 10 (same for Maximum nodes)The value is outside the 1–10 rangeEnter a number from 1 to 10.
Maximum nodes must be greater than Minimum nodesMaximum nodes is smaller than Minimum nodesIncrease Maximum nodes or lower Minimum nodes.
Something went wrong. Please try again laterTimeout or system error when you click Create. The form keeps your dataClick Create again after a moment.
The API Gateway changes to ErrorProvisioning failed on the infrastructure side. The list does not show the reasonDelete the API Gateway and create it again. If it is still Error, contact support to check the VPC, Subnet, and Storage Policy quotas.

Next steps​

Last updated on