Feature Description
Similar to #7168, I'd like to have per-operation concurrent limit.
Problem and Solution
opendal natively supports ConcurrentLimitLayer, if I don't read it wrongly, all operations (whether it's IO like read/write, or metadata only like stats/list), they all acquire permit on the same semaphore. Code reference below:
|
let _permit = self.semaphore.acquire().await; |
|
let permit = self.semaphore.acquire().await; |
- and many others
Different operations usually hit different storage backends (i.e., filesystem vs TP database), and showing different workload characteristics (i.e., IOPS-oriented vs throughput-oriented), I think it's better to provide a per-operation concurrent limit.
For me specifically, I met severe read and write server overload issue, so client-side need to have our own gating for in-flight requests for RW only, but not for metadata operations.
Additional Context
I could implement my own layer to achieve per-operation config, but I think it should be a useful feature to support in opendal core.
Are you willing to contribute to the development of this feature?
Feature Description
Similar to #7168, I'd like to have per-operation concurrent limit.
Problem and Solution
opendal natively supports
ConcurrentLimitLayer, if I don't read it wrongly, all operations (whether it's IO like read/write, or metadata only like stats/list), they all acquire permit on the same semaphore. Code reference below:opendal/core/layers/concurrent-limit/src/lib.rs
Line 258 in 6100a69
opendal/core/layers/concurrent-limit/src/lib.rs
Line 264 in 6100a69
Different operations usually hit different storage backends (i.e., filesystem vs TP database), and showing different workload characteristics (i.e., IOPS-oriented vs throughput-oriented), I think it's better to provide a per-operation concurrent limit.
For me specifically, I met severe read and write server overload issue, so client-side need to have our own gating for in-flight requests for RW only, but not for metadata operations.
Additional Context
I could implement my own layer to achieve per-operation config, but I think it should be a useful feature to support in opendal core.
Are you willing to contribute to the development of this feature?