mirror of https://github.com/go-gitea/gitea.git
This adds a middleware for overload protection that is intended to help protect against malicious scrapers. It does this via [`codel`](https://github.com/bohde/codel), which will perform the following: 1. Limit the number of in-flight requests to some user-defined max 2. When in-flight requests have reached their begin queuing requests. Logged-in requests having priority above logged-out requests 3. Once a request has been queued for too long, it has a probabilistic chance to be rejected based on how overloaded the entire system is. When a server experiences more traffic than it can handle, this keeps latency low for logged-in users and rejects just enough requests from logged-out users to not overload the service. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io> |
||
|---|---|---|
| .. | ||
| config | ||
| actions.go | ||
| actions_test.go | ||
| admin.go | ||
| api.go | ||
| asset_dynamic.go | ||
| asset_static.go | ||
| attachment.go | ||
| attachment_test.go | ||
| cache.go | ||
| camo.go | ||
| config.go | ||
| config_env.go | ||
| config_env_test.go | ||
| config_provider.go | ||
| config_provider_test.go | ||
| cors.go | ||
| cron.go | ||
| cron_test.go | ||
| database.go | ||
| database_sqlite.go | ||
| database_test.go | ||
| federation.go | ||
| git.go | ||
| git_test.go | ||
| gloabl_lock.go | ||
| glob.go | ||
| global.go | ||
| global_lock_test.go | ||
| highlight.go | ||
| i18n.go | ||
| incoming_email.go | ||
| indexer.go | ||
| indexer_test.go | ||
| lfs.go | ||
| lfs_test.go | ||
| log.go | ||
| log_test.go | ||
| mailer.go | ||
| mailer_test.go | ||
| markup.go | ||
| markup_test.go | ||
| metrics.go | ||
| migrations.go | ||
| mime_type_map.go | ||
| mirror.go | ||
| oauth2.go | ||
| oauth2_test.go | ||
| other.go | ||
| packages.go | ||
| packages_test.go | ||
| path.go | ||
| path_test.go | ||
| picture.go | ||
| project.go | ||
| proxy.go | ||
| queue.go | ||
| repository.go | ||
| repository_archive.go | ||
| repository_archive_test.go | ||
| security.go | ||
| server.go | ||
| service.go | ||
| service_test.go | ||
| session.go | ||
| setting.go | ||
| setting_test.go | ||
| ssh.go | ||
| storage.go | ||
| storage_test.go | ||
| task.go | ||
| time.go | ||
| ui.go | ||
| webhook.go | ||