#rate-limiting #web-server #web-framework #server-framework #web #server

salvo-rate-limiter

Rate limiter middleware for salvo web server framework

86 releases (36 breaking)

new 0.74.1 Nov 5, 2024
0.73.0 Oct 1, 2024
0.68.5 Jul 9, 2024
0.66.2 Mar 6, 2024
0.37.6 Nov 29, 2022

#38 in #rate-limiting

Download history 759/week @ 2024-07-16 842/week @ 2024-07-23 866/week @ 2024-07-30 824/week @ 2024-08-06 1087/week @ 2024-08-13 763/week @ 2024-08-20 708/week @ 2024-08-27 663/week @ 2024-09-03 912/week @ 2024-09-10 1091/week @ 2024-09-17 959/week @ 2024-09-24 823/week @ 2024-10-01 530/week @ 2024-10-08 1775/week @ 2024-10-15 12341/week @ 2024-10-22 17037/week @ 2024-10-29

31,760 downloads per month
Used in salvo

MIT/Apache

710KB
16K SLoC

salvo-rate-limiter

Rate limit for Salvo.

This is an official crate, so you can enable it in Cargo.toml like this:

salvo = { version = "*", features = ["rate-limiter"] }

Documentation & Resources


lib.rs:

Rate limiter middleware for Salvo.

Rate Limiter middleware is used to limiting the amount of requests to the server from a particular IP or id within a time period.

RateIssuer is used to issue a key to request, your can define your custom RateIssuer. If you want just identify user by IP address, you can use RemoteIpIssuer.

QuotaGetter is used to get quota for every key.

RateGuard is strategy to verify is the request exceeded quota.

Read more: https://salvo.rs

Dependencies

~18–33MB
~588K SLoC