All Products
Search
Document Center

API Gateway:Dedicated instances

Last Updated:Sep 20, 2023

All cloud resources of a dedicated instance are exclusive to the instance. Therefore, dedicated instances are suitable for production environments.

API Gateway provides eight specifications for dedicated instances. The following table describes the detailed information of these specifications.

Instance specification

Maximum inbound requests per second (RPS)

Maximum inbound connections

Maximum new inbound connections per second (CPS)

Maximum size of outbound connection pool

Maximum inbound Internet bandwidth (Mbit/s)

Maximum outbound Internet bandwidth (Mbit/s)

SLA

api.s1.small

2,500

50,000

5,000

1,200

5,120

100

99.95%

api.s1.medium

5,000

100,000

5,000

2,400

5,120

100

99.95%

api.s2.large

10,000

200,000

5,000

4,800

5,120

200

99.99%

api.s2.large.x2

20,000

400,000

10,000

9,600

5,120

200

99.99%

api.s2.large.x3

30,000

600,000

10,000

14,400

5,120

400

99.99%

api.s2.large.x4

40,000

800,000

20,000

19,200

5,120

400

99.99%

api.s2.large.x5

50,000

1,000,000

20,000

24,000

5,120

600

99.99%

api.s2.large.x6

60,000

1,000,000

20,000

28,800

5,120

600

99.99%

Note

Data is transmitted serially in a long connection over HTTP. This means that the sender must wait for the previous request to be acknowledged before they can send the next request. You can use this rule to estimate the required maximum size of outbound connection pool of your instance. The following example shows how:

You purchase the api.s1.small specification, in which the maximum size of outbound connection pool is 1,200. Assume that the response time of the backend service for each request is 1 second, the maximum outbound requests per second (RPS) is 1,200. If the number of outbound requests exceeds 1,200, requests beyond the limit wait in a queue for a maximum of 500 milliseconds. If a request still cannot be sent within the period, a D504CO error is returned to the client.

FAQ

1. How do I select a specification for a subscription instance?

API Gateway classifies instance specifications by RPS. The queries per second (QPS) value is greater than the RPS value given the same network conditions. You can determine which specification to choose based on the QPS value.

2. What options are provided for scenarios featuring traffic spikes, such as sales promotions?

API Gateway provides two methods to deal with these situations: Method 1: subscription + instance upgrade or downgrade. For more information about instance upgrade and downgrade, see Change instance specifications. Method 2: subscription + pay-as-you-go + API group migration. For example, the average QPS is 2,000. QPS is expected to increase to 4,000 during a promotion that lasts for 24 hours. We recommend that you:

  • Purchase a subscription instance of the api.s1.small specification for day-to-day use.

  • Before the promotion, purchase a pay-as-you-go instance of the api.s1.medium specification. Three hours before the promotion starts, log on to the API Gateway console and migrate API groups from the subscription instance to the purchased pay-as-you-go instance. After the migration, make sure that access to the pay-as-you-go instance is normal. After the promotion, migrate the API groups back to the subscription instance. Make sure that access to the subscription instance is normal. Then, release the pay-as-you-go instance. This way, you need only to pay a small amount of fees for the pay-as-you-go instance.