All Projects → github → Freno

github / Freno

Licence: mit
freno: cooperative, highly available throttler service

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Freno

Drc
MySQL active-active replication solution.
Stars: ✭ 92 (-80.09%)
Mutual labels:  mysql, replication, high-availability
Orchestrator
MySQL replication topology management and HA
Stars: ✭ 4,342 (+839.83%)
Mutual labels:  mysql, replication, high-availability
Symmetric Ds
SymmetricDS is a database and file synchronization solution that is platform-independent, web-enabled, and database agnostic. SymmetricDS was built to make data replication across two to tens of thousands of databases and file systems fast, easy and resilient. We specialize in near real time, bi-directional data replication across large node networks over the WAN or LAN.
Stars: ✭ 450 (-2.6%)
Mutual labels:  mysql, replication
Recon
HA LDAP based key/value solution for projects configuration storing with multi master replication support
Stars: ✭ 12 (-97.4%)
Mutual labels:  replication, high-availability
Replication Manager
Signal 18 repman - Replication Manager for MySQL / MariaDB / Percona Server
Stars: ✭ 461 (-0.22%)
Mutual labels:  mysql, replication
Mysql Sandbox
Quick and painless install of one or more MySQL servers in the same host.
Stars: ✭ 176 (-61.9%)
Mutual labels:  mysql, replication
Synch
Sync data from the other DB to ClickHouse(cluster)
Stars: ✭ 200 (-56.71%)
Mutual labels:  mysql, replication
pg keeper
Simplified clustering module for PostgreSQL
Stars: ✭ 32 (-93.07%)
Mutual labels:  replication, high-availability
Mysql redis replication
MySQL replication to Redis cache server via Ruby, Gearman, triggers, and MySQL UDF (Ubuntu version)
Stars: ✭ 10 (-97.84%)
Mutual labels:  mysql, replication
Postgresql cluster
PostgreSQL High-Availability Cluster (based on "Patroni" and "DCS(etcd)"). Automating deployment with Ansible.
Stars: ✭ 294 (-36.36%)
Mutual labels:  replication, high-availability
Glusterfs
Gluster Filesystem : Build your distributed storage in minutes
Stars: ✭ 3,437 (+643.94%)
Mutual labels:  replication, high-availability
Gopli
DB replication tool to synchronize data with multi environments written in Golang.
Stars: ✭ 327 (-29.22%)
Mutual labels:  mysql, replication
Lapidus
Stream your PostgreSQL, MySQL or MongoDB databases anywhere, fast.
Stars: ✭ 145 (-68.61%)
Mutual labels:  mysql, replication
Moha
MoHA(Mobike High Availability): A MySQL/Postgres high availability supervisor
Stars: ✭ 117 (-74.68%)
Mutual labels:  mysql, high-availability
Php Mysql Replication
Pure PHP Implementation of MySQL replication protocol. This allow you to receive event like insert, update, delete with their data and raw SQL queries.
Stars: ✭ 213 (-53.9%)
Mutual labels:  mysql, replication
awesome-storage
A curated list of storage open source tools. Backups, redundancy, sharing, distribution, encryption, etc.
Stars: ✭ 324 (-29.87%)
Mutual labels:  replication, high-availability
Gravity
A Data Replication Center
Stars: ✭ 635 (+37.45%)
Mutual labels:  mysql, replication
Reiner
萊納 - A MySQL wrapper which might be better than the ORMs and written in Golang
Stars: ✭ 19 (-95.89%)
Mutual labels:  mysql, replication
Pg chameleon
MySQL to PostgreSQL replica system
Stars: ✭ 274 (-40.69%)
Mutual labels:  mysql, replication
Dtle
Distributed Data Transfer Service for MySQL
Stars: ✭ 343 (-25.76%)
Mutual labels:  mysql, replication

freno

build status downloads release

Cooperative, highly available throttler service: clients use freno to throttle writes to a resource.

Current implementation can throttle writes to (multiple) MySQL clusters, based on replication status for those clusters. freno will throttle cooperative clients when replication lag exceeds a pre-defined threshold.

freno dynamically adapts to changes in server inventory; it can further be controlled by the user to force throttling of certain apps.

freno is highly available and uses raft consensus protocol to decide leadership and to pass user events between member nodes.

Cooperative

freno collects data from backend stores (at this time MySQL only) and has the logic to answer the question "may I write to the backend store?"

Clients (application, scripts, jobs) are expected to consult with freno. freno is not a proxy between the client and the backend store. It merely observes the store and states "you're good to write" or "you should stop writing". Clients are expected to consult with freno and respect its recommendation.

Stores and apps

freno collects data per data store. E.g. when probing MySQL clusters it will collect replication lag per cluster, independently. Backend store metrics are collected automatically and represent absolute truths.

freno serves clients, identified as apps. Since freno is cooperative, it trusts apps to identify themselves. Apps can be managed: freno can be instructed to forcibly throttle a certain app. This is so as to enable other, high priority apps to run to completion. freno merely accepts instructions on who to throttle, and does not have scheduling/prioritization logic of its own.

MySQL

freno is originally designed to provide a unified, self adapting solution to MySQL throttling: controlling writes while maintaining low replication lag.

freno is configured with a pre-defined list of MySQL clusters. This may includes credentials, lag (or other) inspection query, and expected thresholds. For each cluster, freno needs to know what servers to probe and collect data from. For each cluster, you may provide this list:

  • static, hard coded list of hostname[:port]
  • dynamic. Hosts may come and go, and throttling may adapt to these changes. Supported dynamic options:
    • via haproxy: provide freno with a haproxy URL and backend/pool name, and freno will periodically parse the list of enabled servers in that pool and dynamically adapt to probe it.

Read more about freno and MySQL throttling

Use cases

freno is useful for bulk operations: massive loading/archiving tasks, schema migrations, mass updates. Such operations typically walk through thousands to millions of rows and may cause undesired effects such as MySQL replication lags. By breaking these tasks to small subtasks (e.g. 100 rows at a time), and by consulting freno before applying each such subtask, we are able to achieve the same result without ill effect to the database and to the application that uses it.

freno can also be used to determine actual lag to infer validity of replicas. This can assist in mitigating write-then-read pains of master reads. See here.

HTTP

freno serves requests via HTTP. The most important request is the check request: "May this app write to this store?". freno appreciates HEAD requests (GET are also accepted, with more overhead) and responds with status codes:

  • 200 (OK): Application may write to data store
  • 404 (Not Found): Unknown metric name.
  • 417 (Expectation Failed): Requesting application is explicitly forbidden to write.
  • 429 (Too Many Requests): Do not write. A normal state indicating the store's state does not meet expected threshold.
  • 500 (Internal Server Error): Internal error. Do not write.

Read more on HTTP requests & responses

Clients

Clients will commonly issue /check/... requests via HEAD.

Clients can be expected to issue many requests per second. freno is lightweight in resources. It should be just fine to hit freno hundreds of times per second. It depends on your hardware and resources, of course.

It makes sense to hit freno in the whereabouts of the granularity one is looking at. If your client is to throttle on a 1000ms replication lag, checking freno 200 times per sec may be overdoing it. However if you wish to keep your clients naive and without caching this should be fine.

Read more on clients

Raft

freno uses raft to provide high availability. freno nodes will compete for leadership and only the leader will collect metrics and should serve clients.

Read more on raft and High Availability

Configuration

See sample config file. Also find:

Deployment

See deployment docs for suggestions on a recommended freno deployment setup.

Resources

You may find various resources for setting up freno in your environment.

freno-client is our Ruby client for freno, open sourced and available as a Ruby Gem.

What's in a name?

"Freno" is Spanish for "brake", as in car brake. Basically we just wanted to call it "throttler" or "throttled" but both these names are in use by multiple other repositories and we went looking for something else. When we looked up the word "freno" in a dictionary, we found the following sentence:

Echa el freno, magdaleno!

This reminded us of the 80's and that was it.

Project status

This project is under active development.

Contributing

This repository is open to contributions. Please also see code of conduct

License

This project is released under the MIT LICENSE. Please note it includes 3rd party dependencies release under their own licenses; these are found under vendor.

Authors

Authored by GitHub Engineering

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].