wu-sheng commented on issue #5251:
URL: https://github.com/apache/skywalking/issues/5251#issuecomment-669726512


   So basically, this is caused by the size of the metrics set is much smaller 
than the size of the trace dataset. Right? If so, I would like to ask you, 
consider to enhance `StorageModuleElasticsearchConfig#dayStep`.
   
   ```java
       /**
        * Since 6.4.0, the index of metrics and traces data in 
minute/hour/month precision are organized in days. ES
        * storage creates new indexes in every day.
        *
        * @since 7.0.0 dayStep represents how many days a single one index 
represents. Default is 1, meaning no difference
        * with previous versions. But if there isn't much traffic for single 
one day, user could set the step larger to
        * reduce the number of indexes, and keep the TTL longer.
        */
       @Getter
       private int dayStep = 1;
   ```
   
   According to your case, we should add a new config for `dayStepForRecord`, 
which default is `-1`, meaning disabled. Then the codes still use `dayStep = 1`.
   But to resolve your issue, you could set `dayStep = 7`(or more) and 
`dayStepForRecord = 1`, then the number of index(es) and shards decrease 
clearly. Then the ElasticSearch LB mechanism should be back to work again.
   
   @EvanLjp If you like this, we should forward this change to the mail list 
before we change the codes(PR).
   
   FYI @apache/skywalking-committers WDYT?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to