{"id":19866475,"url":"https://github.com/devopsmakers/go-sakila-remora","last_synced_at":"2026-05-13T12:32:17.997Z","repository":{"id":95879384,"uuid":"82929060","full_name":"devopsmakers/go-sakila-remora","owner":"devopsmakers","description":"A sidecar process written in Go to monitor MySQL slaves / masters for replication errors or lag. Inspired by:  https://githubengineering.com/context-aware-mysql-pools-via-haproxy/","archived":false,"fork":false,"pushed_at":"2017-12-13T23:05:23.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-11T15:48:04.807Z","etag":null,"topics":["devops","golang","haproxy","healthcheck","mysql","percona","slave","wip"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devopsmakers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-23T13:19:03.000Z","updated_at":"2018-02-01T23:05:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"fdddc45e-51f2-4c86-be78-737ccfc6987f","html_url":"https://github.com/devopsmakers/go-sakila-remora","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsmakers%2Fgo-sakila-remora","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsmakers%2Fgo-sakila-remora/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsmakers%2Fgo-sakila-remora/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsmakers%2Fgo-sakila-remora/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devopsmakers","download_url":"https://codeload.github.com/devopsmakers/go-sakila-remora/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241275588,"owners_count":19937376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops","golang","haproxy","healthcheck","mysql","percona","slave","wip"],"created_at":"2024-11-12T15:25:59.801Z","updated_at":"2025-09-25T20:56:15.390Z","avatar_url":"https://github.com/devopsmakers.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![sakila-remora](https://cloud.githubusercontent.com/assets/1253072/23737727/a1f993bc-04e0-11e7-9812-c581e8e61b2f.jpg)\n# go-sakila-remora\n[![Build Status](https://travis-ci.org/devopsmakers/go-sakila-remora.svg?branch=master)](https://travis-ci.org/devopsmakers/go-sakila-remora)\n[![Go Report Card](https://goreportcard.com/badge/github.com/devopsmakers/go-sakila-remora)](https://goreportcard.com/report/github.com/devopsmakers/go-sakila-remora)\n[![codecov](https://codecov.io/gh/devopsmakers/go-sakila-remora/branch/master/graph/badge.svg)](https://codecov.io/gh/devopsmakers/go-sakila-remora)\n\nA sidecar process written in Go to monitor MySQL slaves / masters for replication errors or lag.\n\n## Welcome!\nHi! and thanks for stopping by this project in it's early days.\n\nInspired by GitHub's interesting article:\nhttps://githubengineering.com/context-aware-mysql-pools-via-haproxy/\n\nIt's similar to methods I've used previously to manage traffic being sent\nto Asterisk VoIP servers based on various metrics.\n\n## Project goals\n\nUltimately, I'm pretty new to Go and thought this would be an interesting\nchallenge and an awesome product if everything turns out well.\n\n### Phase 1:\n\nThe initial iteration will handle reading YAML configuration, executing some\nbasic checks against MySQL and presenting a JSON based endpoint for health\nchecking against. After this iteration I should have a decent BVP - Barely\nViable Product.\n\n### Phase 2:\n\nLet's not get ahead of ourselves.\n\n## Percona master / slave for testing\n\nI needed a really quick way to be able to:\n* Spin up a master and slave with replication configured\n* Create lag on the slave\n* Stop lag on the slave\n\nTo do this I've thrown together a really dirty `docker-compose` file and a Makefile\nwith the following targets:\n\n| Target         | Description                                               |\n| -------------- | :-------------------------------------------------------: |\n|`make up`       | Brings up the master, slave and sets up replication       |\n|`make down`     | Runs `docker-compose down` cleaning everything up         |\n|`make start-lag`| Uses `MASTER_DELAY=300` to start the slave lagging        |\n|`make stop-lag` | Stops slave lag by setting `MASTER_DELAY=0`               |\n|`make slave-lag`| Shows the current value of `Seconds_Behind_Master`        |\n|`make stuff`    | Does some SQL stuff - a `CREATE` and `DROP` of a database |\n\n### MySQL Ports\nWhen running the containers you can access MySQL on host: `127.0.0.1` with:\n* User: `root`\n* Pass: `secret`\n* Master Port: `3306`\n* Slave Port: `3307`\n\n\u003e Obviously: Please! Please! Please! Don't ever use these settings or config\n\u003e In production (or any other application environment). This is for quick and\n\u003e dirty testing and development of `go-sakila-remora`.\n\n### Simulating slave lag\n\nTo simulate slave lag for testing is super easy:\n\n1. `make up` to bring up a master / slave and configure replication\n2. `make start-lag` to start the slave lagging (up to 300s)\n3. `make stuff` to do some SQL stuff and things\n4. `make slave-lag` a few times to see the lag increasing\n5. `make stop-lag` stops the slave lagging\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevopsmakers%2Fgo-sakila-remora","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevopsmakers%2Fgo-sakila-remora","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevopsmakers%2Fgo-sakila-remora/lists"}