Log Service supports the pay-as-you-go billing method that charges you based on the amount of resources used.

Billing description

  • Deduction period: Fees are deducted on a daily basis. A bill is generated every day to charge you based on the amount of resources used on the billed day.
  • Free quotas: Log Service offers free quotas on a monthly basis and clears them at the end of each month. If the amount of resources used in a month is within free quotas, you are not charged. Otherwise, the excess amount is charged.
  • LogShipper: On August 25, 2020, Alibaba Cloud will start billing the data that is shipped to Object Storage Service (OSS),MaxCompute ,AnalyticDB for MySQL, and Time Series Database (TSDB) for storage or analysis.You are billed based on the uncompressed size of the data that is shipped from Logstores. Each gigabyte of uncompressed data costs USD 0.05.
  • Data transformation:Expenses for reading data from the source Logstore and writing data to the destination Logstore are charged based on the billing standards of Log Service. During public preview, the server and network resources consumed by the data transformation feature are free of charge. However, you will be charged for using these resources from August 15, 2020.

Pricing and free quotas

The following table lists billing items and their unit prices and free quotas.
Resource item Unit price Free monthly quota
Read/Write traffic based on compressed log data USD 0.045/GB 500 MB
Storage space USD 0.002875/GB per day 500 MB
Indexing traffic USD 0.0875/GB 500 MB
Other item
Active shards USD 0.01/day 31 days for a shard
Read/Write operations USD 0.03/1 million operations 1 million operations
Read traffic over public network USD 0.2/GB None

Read/Write traffic based on compressed log data

  • Read/Write traffic is calculated based on the transmission of compressed log data. Generally, the compression ratio is 10% to 20%.
  • Read/Write traffic includes traffic generated by consumption in streaming mode, for example, when you use the API, SDK, or consumer group to consume log data. Log data is automatically compressed when you use the API or SDK to write logs to Log Service.
  • Traffic generated by index-based queries and analysis is free of charge. For example, you are not charged when you query and analyze logs, generate reports, and use the alerting feature in the Log Service console.
Note When you click Consumption Preview to preview log data in a Logstore in the Log Service console, a small amount of streaming consumption traffic is generated.

Example: Raw logs are 10 GB in size. After the logs are written to Log Service, they are compressed to 1.5 GB. In this case, 1.5 GB of log data is charged.

Storage space

The storage space is the total size of compressed log data and indexes.

Example: Log data is written to Log Service at 1 GB per day and compressed to 200 MB. Indexing is enabled for 10% of the raw log data. The size of indexes is 100 MB. If the data is stored for 30 days, the cumulative maximum storage space after 30 days is 9 GB, that is, 30 days × (100 MB/day + 200 MB/day) = 9 GB. At that time, the daily storage fee for the data is about USD 0.026, that is, USD 0.002875/GB × 9 GB = USD 0.026.

Indexing traffic

  • By default, indexing is disabled. Indexing traffic is charged after you enable and use indexing.
  • Indexing traffic is calculated and charged when you create index fields.
  • Indexing traffic is calculated only once if you create both full text indexes and key/value indexes.
  • Created indexes occupy storage space. Therefore, storage space fees are incurred.

Example: If fields to be queried account for 10% of logs whose size is 10 GB, an indexing fee is charged for 1 GB of log data. In this case, the indexing fee is USD 0.0875.

Active shards

Only shards in the read/write state are charged for a lease. Merged or split shards are not charged for a lease.

Generally, you can write 430 GB of log data per day to a shard.

Example: Three shards in the read/write state need to be merged. After they are merged, only one shard is in the read/write state, and other shards become read-only. In the bill generated tomorrow for today, three shards are charged. In the bill generated the day after tomorrow for tomorrow, only one shard is charged, that is, USD 0.01.

Read/Write operations

The number of operations to write logs to Log Service is determined by the log generation speed. Log Service can minimize the number of read/write operations at the back end.

Example: Logtail is used to collect multiple logs at a time. It performs 1 million write operations. The total fee is USD 0.03.

Read traffic over public network

When log data collected by Log Service is read and consumed by applications outside Alibaba Cloud, the generated data traffic is charged.

Example: If Log Service delivers 2 GB of data to products outside Alibaba Cloud, the read traffic over public network is charged USD 0.4.

Billing examples

Example 1: Free quotas

You have three servers. Each server generates 5 MB of log data every day. You want to use Log Service to process logs as follows:

  1. Query logs in real time and create a dashboard for online O&M.
  2. Use a Java program to subscribe to log processing events and track log processing in real time.
  3. Ship logs to OSS.

Billing details:

  • Resources: A Logstore and a shard are created for 31 days in a month. This billing item is within the free quota.
  • Read/Write traffic: Raw logs are 15 MB in size and both read and written every day. Assume that the compression ratio is 20%. The daily read/write traffic is 6 MB after compression, that is, 15 MB × 20% × 2 = 6 MB. The monthly cumulative read/write traffic is 186 MB, that is, 6 MB/day × 31 days = 186 MB. This billing item is within the free quota.
  • Indexing traffic: Indexing is enabled for all raw log data. The indexing traffic is 465 MB, that is, 15 MB/day × 31 days = 465 MB. This billing item is within the free quota.
  • Read/Write operations: The number of monthly read/write operations is less than 1 million. This billing item is within the free quota.

You can use Log Service to analyze and process logs online free of charge every month.

Example 2: Real-time computing + Offline computing

A website receives 100 million API requests per day. Each request generates a 200-byte log. The size of logs generated per day is 20 GB. The peak traffic is 1.16 MB/s, which is less than 5 MB/s and five times the average traffic. These logs are stored in Log Service for two days. They are read once every day for real-time computing, and shipped to OSS for offline computing by using Hive or Spark.

Billing details:

  • Active shards: A shard is reserved, which is charged USD 0.01 per day.
  • Read/Write operations: Logtail is used to collect multiple logs at a time. It performs 1 million write operations per day. The daily fee is USD 0.03.
  • Read/Write traffic:
    • Raw logs to be written every day are 20 GB in size. Assume that the compression ratio is 10%. The daily write traffic is 2 GB and charged USD 0.09, that is, USD 0.045/GB × 2 GB = USD 0.09.
    • The same amount of log data is pulled for real-time computing. The daily read traffic is also charged USD 0.09.
  • Storage space: The storage space occupied by the compressed log data is 4 GB, that is, 2 GB/day × 2 days = 4 GB. The storage fee is USD 0.0115, that is, USD 0.002875/GB × 4 GB = USD 0.0115.
  • Logs are shipped to OSS free of charge.

The maximum fee per day is USD 0.2315, that is, USD 0.01 + USD 0.03 + USD 0.09 × 2 + USD 0.0115 =USD 0.2315.

Example 3: Online log query and analysis

A service receives 1 million API requests per day. Each request generates a 200-byte log. The size of logs generated per day is 200 MB. These logs are stored in Log Service for 30 days so that users can query data in the last 30 days.

Billing details:

  • Active shards: A shard is reserved, which is charged USD 0.01 per day.
  • Read/Write operations: Logtail is used to collect multiple logs at a time. It performs 1 million write operations per day. The daily fee is USD 0.03.
  • Read/Write traffic: Raw logs to be written every day are 200 MB in size. Assume that the compression ratio is 25%. The daily read/write traffic is 0.05 GB and charged about USD 0.00225, that is, USD 0.045/GB × 0.05 GB = USD 0.00225.
  • Indexing traffic: Indexing is enabled for all raw log data. The daily indexing fee is USD 0.0175, that is, USD 0.0875/GB × 0.2 GB = USD 0.0175.
  • Storage space: The daily storage space is 250 MB, which is the total size of indexes and compressed log data, that is, 200 MB + 50 MB = 250 MB. The maximum storage space is 7.5 GB, that is, 250 MB/day × 30 days = 7.5 GB. The maximum daily storage fee is USD 0.022, that is, USD 0.002875/GB × 7.5 GB = USD 0.022.

The maximum fee per day is USD 0.08175, that is, USD 0.01 + USD 0.03 + USD 0.00225 + USD 0.0175 + USD 0.022 = USD 0.08175.