Yes, in Apache Druid, you can specify priorities for the paths in the druid.segmentCache.locations array by using the priority field. This allows you to prioritize certain storage paths over others, which is useful when you have a mix of local SSD and network storage.
Here's an example configuration:
druid.segmentCache.locations=[ {"path": "var/druid/segment-cache-ssd", "maxSize": "300g", "priority": 1}, {"path": "var/druid/segment-cache-network", "maxSize": "600g", "priority": 2} ]In this example, segments will be stored in the var/druid/segment-cache-ssd path first (priority 1) until it reaches its maximum size, and then in the var/druid/segment-cache-network path (priority 2).
This setup ensures that the faster local SSD storage is utilized before falling back to the network storage[1][2].
Would you like more details on configuring other aspects of Apache Druid?
--
You received this message because you are subscribed to the Google Groups "Druid User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to druid-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/druid-user/d73ad4c0-8bcb-4d07-9b73-044666f63673n%40googlegroups.com.
As already noted, based on the Druid documentation, neither AI response is correct.
There's no built-in priority system for segment cache locations. Here's what you can do instead:
For your use case of mixing local SSD and network storage, you'll want to use Druid's tiering feature instead of trying to prioritize paths within a single Historical, but them you will need to pay double RAM/CPU for that.
For segment distribution between cache locations within a single Historical, Druid only supports these strategies via druid.segmentCache.locationSelector.strategy: leastBytesUsed (default), roundRobin, random, or mostAvailableSize, none will be sufficient to be used the way you wanted, as usually the NAS will be larger han local disk
Also important to note: regardless of storage type, query performance heavily depends on how much RAM is available for page caching and heap memory to keep frequently accessed segments unpacked in memory. Make sure to properly size your system memory for optimal performance.
To view this discussion visit https://groups.google.com/d/msgid/druid-user/4b7b4b8e-fdd9-4428-b878-919d49d16235n%40googlegroups.com.