Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shredx/golang-redis-rate-limiter
The Golang microservice for usage calculations for a subscriber
https://github.com/shredx/golang-redis-rate-limiter
collaboration golang meetup microservice pubsub rate-limiter redis
Last synced: 3 days ago
JSON representation
The Golang microservice for usage calculations for a subscriber
- Host: GitHub
- URL: https://github.com/shredx/golang-redis-rate-limiter
- Owner: shredx
- License: mit
- Created: 2019-03-23T08:34:13.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-27T07:10:37.000Z (almost 6 years ago)
- Last Synced: 2024-11-18T01:11:56.618Z (2 months ago)
- Topics: collaboration, golang, meetup, microservice, pubsub, rate-limiter, redis
- Language: Go
- Size: 265 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Golang Redis Rate Limiter [![Go Report Card](https://goreportcard.com/badge/github.com/shredx/golang-redis-rate-limiter)](https://goreportcard.com/report/github.com/shredx/golang-redis-rate-limiter)
It's API limiter built in Go while we were trying out Redis.
It has got dependency on a node app that mock like the API to be limited [node-redis-rate-limiter](https://github.com/shredx/node-redis-rate-limiter)
and [API gateway](https://github.com/shredx/golang-api-gateway).## Getting Started
### Prerequisite
#### Local Setup
* [Go](https://golang.org/doc/install) -- Development environment
* [dep](https://golang.github.io/dep/docs/installation.html) -- Dependency management
* [Revel](https://revel.github.io/tutorial/index.html) -- Golang web framework
* [Redis](https://redis.io/download) -- Cache storage#### Docker
* [Docker](https://www.docker.com/products/docker-desktop)
* [Docker Compose](https://docs.docker.com/compose/install/)### Installation
#### Local Setup
```sh
go get -u github.com/shredx/golang-redis-rate-limiter
cd $GOPATH/github.com/shredx/golang-redis-rate-limiter
dep ensure
```
#### Docker
```sh
git clone https://github.com/shredx/golang-redis-rate-limiter
cd golang-redis-rate-limiter
docker-compose up
```## Architecture
The architecture might not be perfect as it was just a weekend project to explore Redis.![Architecture](.github/architecture.png)