You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, lychee faces challenges with rate limiting and cache effectiveness when checking links, particularly when dealing with multiple requests to the same hosts. This leads to several issues that need to be addressed:
We should implement a smart per-host rate limiting and caching system that would:
Track rate limits per host using a concurrent HashMap:
use std::collections::HashMap;use time::OffsetDateTime;structHostConfig{rate_limit_reset:Option<OffsetDateTime>,request_delay:Option<Duration>,max_concurrent_requests:Option<u32>,}
Currently, lychee faces challenges with rate limiting and cache effectiveness when checking links, particularly when dealing with multiple requests to the same hosts. This leads to several issues that need to be addressed:
Current Problems
Proposed Solution
We should implement a smart per-host rate limiting and caching system that would:
The idea would be to maintain a
HeaderMap
.See #1297 for details.
Implementation Notes
Benefits
Examples
CLI usage example:
And when adding headers:
lychee \ --max-concurrency-per-host github.com=10 \ --delay-per-host github.com=100ms \ --headers-per-host 'github.com=Authorization:token ghp_xxxx,User-Agent:my-bot'
This is just a proposal. I'm not 100% certain about the naming yet.
Related issues: #989, #1593
The text was updated successfully, but these errors were encountered: