tencent cloud


Last updated: 2022-04-28 14:34:01

    What is COS?

    Tencent Cloud Cloud Object Storage (COS) is a cloud-based non-hierarchical distributed storage service that provides cost-effective, fast, and reliable data storage solutions. COS stores your data across multiple AZs, incorporating redundant storage to ensure data reliability, and allows multiple clients or application threads to read or write data at the same time.

    You can use web APIs to store and retrieve data through CVM instances or over the internet. You can also use the URL of a specified domain name to store and retrieve individual data object in COS through HTTP or HTTPS protocol.

    For more information about COS, see COS Documentation.

    What is the difference between Cloud Object Storage (COS) and Cloud File Storage (CFS)?

    COS has no limit on directory hierarchy or data format and can store any amount of data. There is no upper limit on bucket storage capacity and no partitioning is required. It supports HA deployment to ensure the eventual consistency of data but does not support features such as file locking. COS APIs support data access using HTTP or HTTPS protocol, and COS offers a variety of SDKs and tools that can be integrated into your business. Objects uploaded to COS can also be accessed or downloaded directly via a URL.

    Cloud File Storage (CFS) uses common network file transfer protocols, can create file systems and implement large-scale expansion, but needs to be mounted onto CVM. It can store data for a wide range of applications such as websites, online distribution, and archiving. Featuring high computing throughput and extremely high availability and persistence, it is also suitable for scenarios demanding high concurrence or shared storage.

    What is the difference between COS and CBS?

    COS has no limits on file systems, directory structure, file number, or storage capacity and needs to be managed and accessed via web APIs. COS offers various SDKs and tools for business integration, which can be used independently without CVM. COS supports access to massive amounts of data but is not suitable for scenarios involving millisecond-level response or random I/O.

    Cloud Block Storage (CBS) needs to be used together with CVM and can only be mounted and used after the file system is partitioned or formatted. It comes in different types with various performance metrics such as IOPS and throughput for different scenarios.

    You can go to the object details page on the COS console to get the object address and signature link.

    If your file is public-read:

    • If you want to make it accessible to others all the time, we recommend directly using the object address.
    • If you want to make it accessible to others for only a certain period of time, we recommend directly copying the signature link, which carries the signature parameter and is valid for 1 hour.

    If your file is private:

    • If you want to make it accessible to others all the time, we recommend changing its access permission to public-read/private-write and using the object address.
    • If you want to make it accessible to others for only a certain period of time, we recommend directly copying the signature link, which carries the signature parameter and is valid for 1 hour.

    What is a "folder" or "directory" in COS?

    Strictly speaking, the concepts of folders and directories do not apply to COS. However, taking into account the usage habits of different users, COS can display "folders" in the console just like the directory structure of a traditional file management system. For more information, see Folder and directory.

    Can COS files be recovered after being deleted?

    The data redundancy storage mechanism of COS is designed for scenarios where it is necessary to recover data in case of hardware failure. If you manually delete your data from COS or configure automated deletion, Tencent Cloud will delete the data as requested after which the data is irrecoverable.

    You can proactively delete files in the following ways:

    • Deleting files in the COS console by deleting a single file, deleting files in batches, clearing incomplete multipart uploads, or emptying buckets.
    • Deleting files using COSCMD or COSBrowser.
    • Deleting files using the COS APIs or SDKs.
    • Configuring the system to delete files regularly through the COS lifecycle management feature.
    • Syncing the CRUD operations between buckets in different regions using the COS cross-region replication sync feature, so that existing files with the same name will be overwritten or deleted.

    How can I avoid accidental deletion?

    • The best way to avoid accidental deletion is to back up the files in your bucket on a regular basis. You can protect your data in the following ways:
      • Downloading COS objects to your local file system or third-party servers using the COSCMD tool.
      • Performing intra-region or cross-region bucket data backup using the COS Migration Tool or the cross-region replication feature.
      • Regularly backing up your data to other COS buckets using COS APIs or SDKs.
      • Saving your past versions of data using versioning.
    • Using COS permission management. For more information, see Cloud Access Management Practices:
      • Separating read permission and write permission. For businesses where it is only necessary to read data, use a sub-account with read permission or a temporary key to access the data.
      • Separating permissions for different buckets. For different businesses, only authorize permissions for buckets, directories, and operations within the scope of that particular business.
      • Not using a root account to access COS.
      • Accessing COS using a temporary key.
      • Properly managing your data access credentials, such as your Tencent Cloud account password, CAM sub-account access credentials, and TencentCloud API key.

    Does COS support statistics collection?

    COS is capable of monitoring stored data and displaying the details and trends of various metrics in the monitoring data window. To view general data trends, go to the Overview page in the COS console, and you can view data such as storage size, number of requests, and traffic of each storage class.
    To view the statistics of a single bucket, see Querying Monitoring Data.

    In addition to the COS console, you can also view the monitoring information of different buckets on the Cloud Monitoring page where you can also configure different alarm policies to fit your business needs.

    Does COS support image processing?

    The COS console has integrated Cloud Infinite features, which enable you to scale, crop, and add watermarks to your images. For more information, see Enabling Image Processing.

    Does COS support image compression?

    COS is a distributed storage service for unstructured data and cannot support image compression on its own. For more information on image compression, see Cloud Infinite.

    Does COS support thumbnails?

    COS is a distributed storage service for unstructured data and cannot support thumbnails on its own. For more information on thumbnails, see Cloud Infinite.

    Does COS support transcoding video files?

    COS is a distributed storage service for unstructured data and cannot support video transcoding on its own. For information on how to transcode video files, see Media Processing Service.

    Does COS support the auto decompression of uploaded files?

    COS is a distributed storage service for unstructured data and does not support file decompression; however, you can use the SCF service to decompress files. For more information, see File Decompression.

    What are the specifications and limits of COS?

    For more information, see Specifications and Limits.

    What is the length limit on a bucket name?

    The bucket length limit has been changed since the COS console update in September 2021. According to the new policy, the length of a bucket name is affected by the number of characters in the region abbreviation and APPID, as the combined full domain can contain 60 characters at most. Note that previous bucket names will not be affected. If you need longer names to meet special requirements, contact us.

    Which version of COS should I use, an earlier version or the current version?

    The implementation of earlier versions of COS is quite different than that of the current version. The current version has more features than earlier versions, and earlier versions are not updated with the latest features. We recommend that you use the current version for a better experience. If you are using an earlier version, contact us to activate the current version.

    The current version comes with different APIs and SDK APIs than those in earlier versions. JSON APIs are used in earlier versions and XML APIs are used in the current version. JSON APIs have the same underlying architecture as XML APIs. Their data is interoperable and can intersect, but they are ultimately not compatible with each other and have different domain names.

    How do I monitor error code information?

    You can use Cloud Monitoring to get different types of HTTP error code messages. For more information, see Monitoring and Alarms. For information on how to use cloud monitoring and obtain relevant data, see Cloud Monitor Console Guide.

    How do I calculate the availability of COS?

    Refer to the following example for information on how to calculate COS availability:
    Tom uses COS to run his ecommerce business. Assume that his business incurred fees of 100 USD from November 1 to 30, 2018, during which two unavailability events occurred as shown below:

    Unavailability Event No. Duration 5-Minute Record of Unavailability Event HTTP Return Code Number of Failing Requests Number of Valid Requests
    15 min November 15, 2018, 10:00 - 10:05 503 100 100
    November 15, 2018, 10:05 - 10:10 503 99 100
    November 15, 2018, 10:10 - 10:15 503 98 100
    15 min November 20, 2018, 16:00 - 16:05 500 150 150
    November 20, 2018, 16:05 - 16:10 500 148 150
    November 20, 2018, 16:10 - 16:15 500 140 150

    In all other periods, Tom's requests were successful and a 200 status code was returned.

    In this case, the overall availability for the service period is as follows:

    (1) Calculate the per-5-minute error rate for the current month

    According to the case details: When Tom's business is normal, the per-5-minute error rate is 0%.

    Unavailability event 1: This event occurred on November 15, 2018 and lasted from 10:00 - 10:15. The per-5-minute error rate was:

    • 100 / 100 * 100% = 100% from 10:00 - 10:05
    • 99 / 100 * 100% = 99% from 10:05 - 10:10
    • 98 / 100 * 100% = 98% from 10:10 - 10:15

    Unavailability event 2: This event occurred on November 20, 2018 and lasted from 16:00 - 16:15. The 5-minute error rate was:

    • 150 / 150 * 100% = 100% from 16:00 - 16:05
    • 148 / 150 * 100% = 98.67% from 16:05 - 16:10
    • 140 / 150 * 100% = 93.33% from 16:10 - 16:15

    (2) Calculate the service availability for the current month

    In this case:

    • Total duration of the service period: 30 days * 24 hours/day * 60 minutes/hour=43,200 minutes.
    • Total number of 5-minute periods: 43,200 minutes / 5 minutes = 8,640.
    • Total number of unavailable 5-minute periods: (15 + 15) minutes / 5 minutes = 6.
    • Sum of the per-5-minute error rates: (100% + 99% + 98% + 100% + 98.67% + 93.33%) + (8640 - 6) * 0% = 589%

    The service availability for this month: (1 - 589% / 8640) * 100% = 99.93%

    (3) Calculate relevant compensation

    In this example, the service availability is 99.93%, which is lower than the standard 99.95% but higher than 99.9%. According to the indemnification standard, Tom is eligible for indemnification equivalent to 20% of the total monthly service fees, i.e., 20 USD.
    Tom only needs to submit a ticket to apply for compensation within sixty (60) calendar days after the end of the service period, i.e., prior to January 29, 2019, and Tencent Cloud will compensate Tom for his losses by issuing a voucher.

    How do I disable and/or stop being billed for COS services?

    There is no one-click option for disabling COS. If there are long periods of time in which you do not use COS, you can save storage costs by transitioning your data to the ARCHIVE storage class. For more information on the transition operation, see Setting Lifecycle.

    If you decide to stop using COS, you can avoid any further billing by permanently deleting all of your COS data (including incomplete multipart uploads and object versions). There is no need to de-register your account, and if you use other Tencent Cloud products, avoid doing so as it will affect your other services.


    To delete your COS data and incomplete multipart uploads, see Deleting Objects, and Deleting Incomplete Multipart Uploads.

    Before the you complete the deletion process, note the following:

    • Data, once deleted from COS, cannot be recovered, so make backups accordingly.
    • Check your billing cycle to avoid overdue payments. For more information, see Billing Cycle.
    • If your account has overdue payment (i.e., your account balance is below 0), COS services will be suspended after 24 hours.
    • If your account has overdue payment and COS services are suspended, the free tier for which your account is eligible won’t be available.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support