{"id":17617772,"url":"https://github.com/ullaakut/gonvey","last_synced_at":"2025-04-30T18:22:21.683Z","repository":{"id":54371352,"uuid":"149316377","full_name":"Ullaakut/gonvey","owner":"Ullaakut","description":"Gonvey is a simple Go reverse-proxy (don't use it, this was just a coding challenge)","archived":false,"fork":false,"pushed_at":"2018-10-02T04:29:06.000Z","size":4513,"stargazers_count":8,"open_issues_count":8,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T18:43:56.778Z","etag":null,"topics":["go","http","metrics","reverse-proxy","simple"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ullaakut.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}},"created_at":"2018-09-18T16:06:31.000Z","updated_at":"2023-08-19T06:53:48.000Z","dependencies_parsed_at":"2022-08-13T13:40:40.795Z","dependency_job_id":null,"html_url":"https://github.com/Ullaakut/gonvey","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ullaakut%2Fgonvey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ullaakut%2Fgonvey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ullaakut%2Fgonvey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ullaakut%2Fgonvey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ullaakut","download_url":"https://codeload.github.com/Ullaakut/gonvey/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251758415,"owners_count":21639032,"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":["go","http","metrics","reverse-proxy","simple"],"created_at":"2024-10-22T19:15:41.537Z","updated_at":"2025-04-30T18:22:21.655Z","avatar_url":"https://github.com/Ullaakut.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gonvey\n\nGonvey is a simple reverse proxy. It has a very basic load balancing that consists of randomly forwarding requests to one of the endpoints that matches the requests' path, and is configurable. It also comes with a stack of docker containers providing metrics and metrics visualization out of the box.\n\nSee the [part on proxy map configuration](#gonvey_proxy_map) for more information on how to use it to proxy to your services.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/logo.png\" width=\"350\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"#license\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/license-Apache-blue.svg?style=flat\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/Ullaakut/gonvey\"\u003e\n        \u003cimg src=\"https://goreportcard.com/badge/github.com/Ullaakut/gonvey\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/Ullaakut/gonvey/releases/latest\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/release/Ullaakut/gonvey.svg?style=flat\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://travis-ci.org/Ullaakut/gonvey\"\u003e\n        \u003cimg src=\"https://travis-ci.org/Ullaakut/gonvey.svg?branch=master\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://golangci.com/r/github.com/Ullaakut/gonvey\"\u003e\n        \u003cimg src=\"https://golangci.com/badges/github.com/Ullaakut/gonvey.svg\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## Table of content\n\n* [Dependencies](#dependencies)\n* [How to run it](#how-to-run-it)\n* [Services](#Services)\n* [Configuration](#Configuration)\n* [Screenshots](#Screenshots)\n* [License](#license)\n\n## Dependencies\n\n* `docker` [Download](https://www.docker.com/community-edition)\n* `docker-compose` [Download](https://docs.docker.com/compose/install/)\n\n## How to run it\n\n* `docker-compose up`\n\n## Services\n\nIn the `docker-compose.yml` file, other services are specified to be running alongside `Gonvey`.\n\n### Metrics\n\nThe metrics service uses Prometheus to store the following metrics:\n\n* The basic `promhttp` metrics\n* `http_response_time`\n* `http_requests_count` (with labels:)\n  * `http_method`\n  * `http_request_uri`\n  * `endpoint`\n* `http_remote_addr`\n* `http_response_code`\n\n### Metrics Gateway\n\nThis service is used to allow for Gonvey to push its metrics to `Metrics` using custom labels.\n\n### Metrics Dashboard\n\nThis service uses Grafana to display a pre-configured dashboard that uses `Metrics` as its source.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg width=\"80%\" src=\"images/dashboard.png\"\u003e\n\u003c/p\u003e\n\nOnce you ran `docker-compose up`, you can find it by visiting `localhost:3000` in your favorite browser.\n\n### Apps\n\nThe `apps` (`app1`, `app2`, `app3` and `app4`) are dummy applications that are set as the default endpoints for Gonvey. They return `200 OK` on their `/posts` endpoint, and `400` on other routes.\n\n## Configuration\n\nGonvey is configured using the environment. The simplest way is to edit the environment variables in the `docker-compose.yml` file at the root of the repository.\n\nHere is an example with the default configuration values:\n\n\u003cp align=\"center\"\u003e\n    \u003cimg width=\"80%\" src=\"images/configuration.png\"\u003e\n\u003c/p\u003e\n\n------------------------\n\n### `GONVEY_LOG_LEVEL`\n\nSets the log level. Default value is `DEBUG`.\n\nExamples: `DEBUG`, `INFO`, `WARNING`, `ERROR`, `FATAL`.\n\n------------------------\n\n### `GONVEY_SERVER_PORT`\n\nSets the port used by the proxy. Default value is `8888`.\n\nCan be any value between `1` and `65535`.\n\n------------------------\n\n### `GONVEY_PROXY_MAP`\n\nSets the paths and endpoints that are bound within the proxy. For now, it's stored in a JSON-encoded string. Default value is `{\"/bloggo\":[\"http://app1\"],\"/test\":[\"http://app2\",\"http://app3\",\"http://app4\"]}`.\n\nNote that paths are matched in a random order, so if a proxy map is like such for example:\n\n`{\"/test/deep/bind\":[\"http://app2\"],\"/test\":[\"http://app1\"]}`\n\nAnd a request comes in for `/test/deep/bind`, it might go to either `app1` or `app2`. (This is because maps are unordered in go)\n\nExamples:\n\n* `{\"/test\":[\"http://app1\"]}`\n* `{\"/api/v1\":[\"http://app1\"],\"/api/v2\":[\"http://app2\"],\"/api/v3\":[\"http://app3\"],\"/api/v4\":[\"http://app4\"]}`\n\n------------------------\n\n## Screenshots\n\n\u003cp align=\"center\"\u003e\n    \u003cimg width=\"80%\" src=\"images/logs.png\"\u003e\n\u003c/p\u003e\n\n## License\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\nSee the License for the specific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fullaakut%2Fgonvey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fullaakut%2Fgonvey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fullaakut%2Fgonvey/lists"}