darko

command module
v0.0.0-...-4cfca81 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

README

darko

Why?

Adding a rate limiter into your application may cost a huge amount of memory increase. To avoid this, you may choose to drop the requests. This is also known as leak bucket rate limiter.

If your application is allowed to drop the requests, then you don't need darko or any other external rate limiter.

darko is a scalable token bucket rate limiter that gives you:

  • Guaranteed order on the requests
  • No data loss
  • Vertical scale
  • Horizontal scale on HA mode

Standalone Mode

darko standalone mode

High Availability Mode

darko high availability mode

Master

  • Act as writer
  • Accept writes and creates new jobs

Followers

  • Act as reader
  • Read the new jobs for its partition key

Guarantees

Order

No Data Loss

To avoid the loss of data, set the redis db persistence to AOF.

See more about redis persistence here.

TODO

  • Improve logging
  • Dynamic scale of followers
  • Monitoring (maybe Prometheus)
  • Fix standalone image

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL