This topic describes how to reduce index traffic fees by optimizing index configurations.

You can use the following optimization methods to reduce index traffic fees when you use Log Service. For more information, see Configure indexes.
  • Disable the full-text indexing feature and configure field indexes.
    Log Service supports both full-text indexes and field indexes.
    • If you configure full-text indexes, all field names and field values of logs are stored as text. The field names and field values are both included in the index traffic. Field names and field values form key-value pairs.
    • If you configure field indexes of the long or double type, the field names are not included in the index traffic. Each field value is counted 8 bytes in the index traffic. You can use field indexes to reduce index traffic fees. Examples:
      • If you configure an index of the text type for the request_uri field and the field value is /request/path-2/file-7, the string request_uri and the value /request/path-2/file-7 are both included in the index traffic.
      • If you configure an index of the long type for the status field and the field value is400, the string status is not included in the index traffic, and the value 400 is counted 8 bytes in the index traffic.
  • Configure indexes only for important fields.

    If raw logs contain a large number of fields and only some of the fields are used for query and analysis, you can configure indexes only for these fields.

  • Disable LogReduce.
    After you enable the LogReduce feature, the total size of index traffic increases by 10%. The following table provides some examples.
    Size of raw logs Index percentage Size of index traffic generated by LogReduce Total index traffic
    100 GB 20% (20 GB) 100 GB×10% 30 GB
    100 GB 40% (40 GB) 100 GB×10% 50 GB
    100 GB 100% (100 GB) 100 GB×10% 110 GB

    If you no longer need the LogReduce feature, disable the feature at the earliest opportunity. For more information, see LogReduce.