rust-vmm / community

rust-vmm community content
501 stars 28 forks source link

Crate Addition Request - Token bucket based rate limiter #107

Open acatangiu opened 3 years ago

acatangiu commented 3 years ago

Crate Name

io-rate-limiter

Short Description

A token bucket based rate limiter to enable inline rate limiting of device IO. As an example see Firecracker implementation [1].

Why is this crate relevant to the rust-vmm project?

VMMs can make use of this crate to implement IO rate limiting for their emulated devices.

[1] https://github.com/firecracker-microvm/firecracker/tree/main/src/rate_limiter

rbradford commented 3 years ago

:+1: We use this in CH. CC @likebreath

acatangiu commented 3 years ago

Actually, I've updated the proposed name rate-limiter -> io-rate-limiter since we target a simple IO-specific implementation limiting on bandwidth and iops, and not a generic rate-limiter crate.

acatangiu commented 3 years ago

I have an initial design proposal (very similar to what Firecracker and Cloud-Hypervisor currently use): https://github.com/acatangiu/ratelimit-asyncio#readme

@andreeaflorescu can you help with a new repository so we can have the design discussion on a issue there?