# Resource Quota

The following table shows quotas of basic resources of Cloud Base. The maximum number of API calls includes two parts: calls for Mini Program APIs and calls for server APIs.

Category Quota Type Quota
Storage Capacity 5 GB
Number of downloads 1,500,000/month
Number of uploads 600,000/month
Public network downstream traffic None
CDN origin-pull traffic 1 5 GB/month
CDN CDN traffic 5 GB/month
Cloud function Number of calls 200,000/month
Resource usage 2 40,000 GB/month
Public network outbound traffic 1 GB/month
Number of concurrent requests (for a single cloud function) 20
Database Capacity 2 GB
QPS 30
Number of concurrent connections 3 20
Number of reads 50,000/day
Number of writes 30,000/day
Maximum number of collections 100

In addition to the above quota parameters, the Mini Program·Cloud Base also includes the following system parameter limits:

Runtime memory for a cloud function (in a single run): 256 MB 4

Number of cloud functions: 50

Database traffic: 16 MB in each packet output

Maximum number of indexes in a single collection in the database: 20

The above quotas are for one environment, not applicable to all environments.

To apply for a higher upper limit, developers may send an email to miniprogram@tencent.com: the subject is "Apply for adjustment to upper limit of resources called by the Mini Program·Cloud Base", and the body includes the Mini Program account AppID, the name of the environment to be adjusted, the upper limit of the resource to be adjusted (applicable only to resource quotas and non-system parameters), the service category of the Mini Program (can be queried in basic settings of the Mini Program), reasons for the resource adjustment, and the planned launch time of the product.

In addition, because the online payment function will be launched recently on Mini Program·Cloud Base, in order to give developers sufficient time to make adjustment, the deadline of application for quota adjustments is prolonged from May 17, 2019 to June 30, 2019.

Notes:

  1. CDN origin-pull traffic: Refers to the traffic generated during CDN origin-pull storage after CDN acceleration is enabled.
  2. Cloud function resource usage GBs: Resource usage = Memory configured for the function x Charged running duration. Memory configured for the function is calculated in GB, and charged duration is calculated in seconds (converted from milliseconds). So resource usage is calculated in GBs (GB-second). For example, if the function is configured with a memory of 256 MB and runs 1760 ms (calculated by 1800 ms) for each processing, the resources used in a single run are (256/1024)*(1800/1000) = 0.45 GBs. Resources used in each run are calculated on a monthly basis.
  3. Number of concurrent connections in the database refers to the number of concurrent database requests. If 30 database operation requests are initiated at a time, 20 requests are executed at the same time, and a concurrency excess error is returned for the remaining 10 requests. One database request (regardless of whether the request s initiated by the Mini Program or the cloud function) consumes one connection, and there is a limit on the number of concurrent connections for each cloud environment and the quota is calculated separately. If it takes an average of 10 ms for the database query, one connection can support up to 100 qps (1000 ms/10 ms = 100), and 20 connections can support up to 2000 qps.
  4. Runtime memory for a cloud function (in a single run): When a cloud function is running, the maximum available memory is 256 MB. The runtime memory information displayed in the running log of the cloud function is the actual memory usage at the current run, which may be lower than the maximum available memory. Billing is calculated based on the configured memory, i.e. 256 MB.
点击咨询小助手