8000 GitHub - jerily/tratelimit: Rate limiting middleware for twebserver.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jerily/tratelimit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tratelimit

Rate limiting middleware for twebserver.

Prerequisites

Installation

# It installs to /usr/local/lib
# To install elsewhere, change the prefix
# e.g. make install PREFIX=/path/to/install
make install

Usage

The following are supported configuration options:

  • global_limits - Global rate limits.
  • route_limits - Route rate limits. Makes use of named routes in twebserver.
  • store - The store to use together with its config. Default is "valkeystore".

Example Configuration

    store {
        valkeystore {
            host "localhost"
            port 6379
        }
    }
    global_limits {
        by_ip {
            window_millis 10000
            limit 10
        }
        by_session {
            window_millis 60000
            limit 5
        }
    }
    route_limits {
        get_index {
            by_ip {
                window_millis 10000
                limit 10
            }
        }
        get_stats {
            by_ip {
                window_millis 10000
                limit 5
            }
        }
        get_catchall {
            by_ip {
                window_millis 10000
                limit 15
            }
        }
    }

About

Rate limiting middleware for twebserver.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0