CLS is pay-as-you-go by default for all regions. Users are charged based on their actual storage usage, requests, traffic, and other billable items on a daily basis. For more information on the regions, see Regions and Access Endpoints.
For details about pay-as-you-go pricing, see Product Pricing.
Billable Item | Description | Billing Formula |
---|---|---|
Write traffic | Write traffic fees will incur when a log is uploaded or processed data is shipped to the target log topic. They are calculated by the volume of the data received by CLS and don't distinguish between traffic over private and public networks. Note: If logs are compressed before upload, the fees will be calculated by the actual data volume after compression (LogListener compresses logs for upload by default). For example, if the raw log data volume is 4 GB and the compression ratio is 1:4 (which is subject to the actual log content and ranges from 1:4 to 1:10 generally), the write traffic after compression will be 1 GB. |
Write traffic fees = unit price per GB * daily accumulative write traffic |
Standard/IA index traffic | Index traffic fees incurred during standard/IA index generation are billed by the volume of data generated when CLS creates indexes. Note:
|
Standard index traffic fees = unit price per GB * daily accumulative standard index traffic IA index traffic fees = unit price per GB * daily accumulative IA index traffic |
Private network read traffic | Billed by the downstream traffic generated when the CLS private domain name is accessed. For example, no read traffic or fees will be incurred when you consume CLS logs or ship logs to COS or CKafka over a private network, or when you search and analyze logs via the console or API. |
Private network read traffic fees = unit price per GB * daily accumulated private network read traffic |
Public network read traffic | Billed by the downstream traffic generated when the CLS public domain name is accessed. For example, no read traffic or fees will be incurred when you download CLS logs, consume logs, or ship logs to COS or CKafka over a public network, or when you search and analyze logs via the console or API. |
Public network read traffic fees = unit price per GB * daily accumulated public network read traffic |
Billable Item | Description | Billing Formula |
---|---|---|
Standard/IA log storage | Such fees are charged by the standard/IA storage space occupied by the log data. Note: If logs are compressed before upload, the fees will be calculated by the actual data volume after compression (LogListener compresses logs for upload by default). For example, if the raw log data volume is 4 GB and the compression ratio is 1:4 (which is subject to the actual log content and ranges from 1:4 to 1:10 generally), the incremental log storage capacity will be 1 GB. |
Standard log storage fees = unit price per GB * daily average standard log storage capacity IA log storage fees = unit price per GB * daily average IA log storage capacity |
Standard/IA index storage | Such fees are billed by the standard/IA storage space occupied by the index data. Note: The index storage capacity is irrelevant to log compression during upload, and the volume of uncompressed raw log data shall prevail. For example, if the raw log data volume is 4 GB and the write traffic is 1 GB after compression (the compression ratio is 1:4), the index traffic will be 4 GB after full-text index is enabled, and the incremental index storage capacity will be 4 GB. |
Standard index storage fees = unit price per GB * daily average standard index storage capacity IA index storage fees = unit price per GB * daily average IA index storage capacity |
Billable Item | Description | Billing Formula |
---|---|---|
Data processing | Such fees are billed by the data volume of logs processed by the data processing feature. Note: The log data volume is irrelevant to log compression during upload, and the volume of uncompressed raw log data shall prevail. For example, if the raw log data volume is 4 GB and the compression ratio is 1:4 (which is subject to the actual log content and ranges from 1:4 to 1:10 generally), the write traffic after compression will be 1 GB, but the data volume for data processing will still be 4 GB. |
Data processing fees = unit price * processed data volume |
Billable Item | Description | Billing Formula |
---|---|---|
Service request | Such fees are billed by the total number of CLS API calls, including those initiated in the Tencent Cloud console and via LogListener, APIs, and SDKs for log upload, search, and analysis. | Service request fees = unit price per one million requests * (daily accumulative number of requests / 1000000) |
Topic partition | Billed by the number of topic partitions used, including the read-write topic partitions and read-only partitions. | Topic partition fees = unit price x daily accumulated number of topic partitions |
The service request and topic partition fees have low unit prices and only account for a very small part of the total fees if you use CLS normally. Such fees are mainly used to prevent abuse such as high numbers of meaningless concurrent API calls.
Company A's website receives 100 million requests per day, and each request produces an average of a 100-byte log. This results in 100 million logs per day for a total of approximately 9.31 GB. Company A decides to upload the NGINX access logs to the CLS in Beijing region, and store them in the standard storage for 15 days, with the log search, analysis, and alarm features enabled but the data processing, download, consuming, and shipping features disabled.
Billable Item | Description | Usage | Unit Price | Pay-as-you-go Fees |
---|---|---|---|---|
Write traffic | Logs are compressed at a compression ratio of about 1:4 when uploaded via LogListener, and the traffic after compression is about 2.33 GB. | 9.31 GB * (1:4) = 2.33 GB | 0.032 USD/GB/day | 0.07456 USD/day |
Standard index traffic | Full-text index is enabled, that is, index is enabled for all fields, which generates 9.31 GB index traffic. | 9.31 GB * 100% = 9.31 GB | 0.062 USD/GB/day | 0.577 USD/day |
Standard log storage | 9.31 GB logs are uploaded every day, which take up about 2.33 GB storage space after compression. The average volume of logs stored for 15 days is 34.95 GB. | 9.31 GB * (1:4) * 15 = 34.95 GB | 0.0024 USD/GB/day | 0.084 USD/day |
Standard index storage | Indexes of 9.31 GB are generated every day. The average storage capacity after 15 days is 139.65 GB. | 9.31 GB * 15 = 139.65 GB | 0.0024 USD/GB/day | 0.335 USD/day |
Service request | LogListener is used to group and upload logs in batches, producing about 100,000 upload requests. | 100,000 requests | 0.026 USD/million requests/day | 0.0026 USD/day |
Topic partition | The peak bandwidth for business logs is 8 MB/s. Two topic partitions are needed. | 2 partitions | 0.007 USD/partition/day | 0.014 USD/day |
Total | 1.087 USD/day |
As you can see from the billable items, the index traffic and storage fees are the major fees for the following reasons:
Therefore, to reduce the product costs, you can appropriately adjust the index configuration to reduce the index traffic and storage capacity.
For example, the raw log is as follows:
10.20.20.10 ::: [Tue Jan 22 14:49:45 CST 2019 +0800] ::: GET /online/sample HTTP/1.1 ::: 127.0.0.1 ::: 200 ::: 647 ::: 35 ::: http://127.0.0.1/
The log will be captured as the following fields during log collection:
IP: 10.20.20.10
bytes: 35
host: 127.0.0.1
length: 647
referer: http://127.0.0.1/
request: GET /online/sample HTTP/1.1
status: 200
time: [Tue Jan 22 14:49:45 CST 2019 +0800]
request
and status
fields, the indexes generated by the log will be 48 bytes in size (i.e., size of the key and value of request
and status
, which are 48 bytes / 172 bytes = 27.9% of all fields). In this way, the index traffic and storage capacity will be reduced to 27.9% of those for full-text index. However, you can only use the request
and status
fields to search for and analyze logs and view other fields in this case.For more methods to reduce product costs, see Saving Product Use Costs.
Was this page helpful?