A very simple rate limiter in go, made as a learning project to learn go and rate limiting patterns!

Overview

rate-limiter-go

A very simple rate limiter in go, made as a learning project to learn go and rate limiting patterns!

Demo:

Demo

Running the project:

To execute the binary, specify an algorithm:

.\rate-limiter-go.exe noRateLimiting
.\rate-limiter-go.exe tokenBucket
.\rate-limiter-go.exe leakingBucket
.\rate-limiter-go.exe fixedWindowCounter
.\rate-limiter-go.exe slidingWindowLog

To run from source:

go run . noRateLimiting
go run . tokenBucket
go run . leakingBucket
go run . fixedWindowCounter
go run . slidingWindowLog
You might also like...
Go rate limiter used to ensure a minimum duration between executions.

Ratelimiter Rate limiter used to ensure a minimum duration between executions. Additionally supports the optional limit of max queue size. This can be

Pacemaker - Rate limit library. Currently implemented rate limits are

PaceMaker Rate limit library. Currently implemented rate limits are Fixed window

Go forward proxy with bandwidth limiting.
Go forward proxy with bandwidth limiting.

Goforward Go forward proxy with rate limiting. The code is based on Michał Łowicki's 100 LOC forward proxy. Download Releases can be downloaded from h

A webservice made while learning Go following the Pluralsight course "Go: Getting Started"

go-webservice A webservice made while learning Go following the Pluralsight course "Go: Getting Started" Steps to get the webservice up and running (s

Reflections on a first-run of a very simple Go project.

Go-Example Working example of the write-up posted on my blog. Installation Set GOPATH to this (root) folder. On Unix-like systems: export GOPATH=. In

Kick dropper is a very simple and leightweight demonstration of SQL querying, and injection by parsing URl's

__ __ __ __ _____ ______ | |/ |__|.----.| |--.______| \.----.| |.-----.-----.-----.----.

Watch for interesting patterns in Caddy logs and send a Telegram notification.

Watch for interesting patterns in Caddy logs and send a Telegram notification.

llb - It's a very simple but quick backend for proxy servers. Can be useful for fast redirection to predefined domain with zero memory allocation and fast response.

llb What the f--k it is? It's a very simple but quick backend for proxy servers. You can setup redirect to your main domain or just show HTTP/1.1 404

C-ping is a very simple and small ping tool that sends ICMP Echo datagram to a host.

C-ping is a very simple and small ping tool that sends ICMP Echo datagram to a host.

Releases(1.0.2)
Owner
Jean-Raphaël Poulin Arguin
software engineer @clinia
Jean-Raphaël Poulin Arguin
Redis-rate-limiter - An abstraction over redist rate/v9 package

RATE_LIMIT_POC Notes This POC is based on github.com/go-redis/redis_rate/v9 pack

Deepak Pathak 0 Feb 14, 2022
Simple-request-limiter - Example of limiting API requests using standard Go library

Route: http://localhost:8080/urls example of body in POST request that was used:

null 0 Feb 2, 2022
Golang implementation of Sliding Window Algorithm for distributed rate limiting.

slidingwindow Golang implementation of Sliding Window Algorithm for distributed rate limiting. Installation $ go get -u github.com/RussellLuo/slidingw

Luo Peng 323 Jul 31, 2022
HTTP rate limiting module for Caddy 2

This module implements both internal and distributed HTTP rate limiting. Requests can be rejected after a specified rate limit is hit.

Matt Holt 87 Sep 10, 2022
Light weight http rate limiting proxy

Introduction Light weight http rate limiting proxy. The proxy will perform rate limiting based on the rules defined in the configuration file. If no r

DHIS2 Platform Engineering 12 Aug 23, 2022
A little ping pong service that implements rate limiting with golang

Fred the Guardian Introduction Writing a little ping pong service that implements rate limiting with the programming language golang. Requirements Web

null 0 Jan 2, 2022
A Caddy v2 extension to apply rate-limiting for HTTP requests

ratelimit A Caddy v2 extension to apply rate-limiting for HTTP requests. Installation $ xcaddy build --with github.com/owlwang/caddy-ratelimit Caddyfi

owlwang 0 Jan 28, 2022
A rate limiter for the gin framework

GinRateLimit GinRateLimit is a rate limiter for the gin framework. By default, it can only store rate limit info in memory. If you want to store it so

null 1 Dec 22, 2021
Common rate-limiter implementations

Overview An example Rate Limiter library used to control the rate that events occur, but these can also be used as thresholds that should replenish ov

Chris Wojno 0 Dec 1, 2021
A rate limiter for Golang, with ETCD data bindings

Go Rate limiter This package allows us to have a distributed rate limiter, using Redis as a central counter. The limits that are set are only "soft" l

Nadir Hamid 0 Dec 9, 2021