{"id":19839327,"url":"https://github.com/redislabs/sentinel_tunnel","last_synced_at":"2025-05-01T18:31:57.056Z","repository":{"id":57506465,"uuid":"90146545","full_name":"RedisLabs/sentinel_tunnel","owner":"RedisLabs","description":"A local proxy server for discovering and to Redis via Sentinel","archived":false,"fork":false,"pushed_at":"2023-12-28T16:52:30.000Z","size":10,"stargazers_count":46,"open_issues_count":5,"forks_count":22,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-06T16:54:21.570Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RedisLabs.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-05-03T12:29:18.000Z","updated_at":"2025-03-26T20:35:07.000Z","dependencies_parsed_at":"2024-11-12T12:33:03.144Z","dependency_job_id":null,"html_url":"https://github.com/RedisLabs/sentinel_tunnel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisLabs%2Fsentinel_tunnel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisLabs%2Fsentinel_tunnel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisLabs%2Fsentinel_tunnel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisLabs%2Fsentinel_tunnel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedisLabs","download_url":"https://codeload.github.com/RedisLabs/sentinel_tunnel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251924835,"owners_count":21666043,"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":[],"created_at":"2024-11-12T12:21:49.846Z","updated_at":"2025-05-01T18:31:56.697Z","avatar_url":"https://github.com/RedisLabs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sentinel Tunnel\nSentinel Tunnel is a tool that allows you using the Redis Sentinel capabilities, without any code modifications to your application.\n\nRedis Sentinel provides high availability (HA) for Redis. In practical terms this means that using Sentinel you can create a Redis deployment that tolerates certain kinds of failures without human intervention. For more information about Redis Sentinel refer to: https://redis.io/topics/sentinel.\n\n## Overview\n\nConnecting an application to a Sentinel-managed Redis deployment is usually done with a Sentinel-aware Redis client. While most Redis clients do support Sentinel, the application needs to call a specialized connection management interface of the client to use it. When one wishes to migrate to a Sentinel-enabled Redis deployment, she/he must modify the application to use Sentinel-based connection management. Moreover, when the application uses a Redis client that does not provide support for Sentinel, the migration becomes that much more complex because it also requires replacing the entire client library.\n\nSentinel Tunnel (ST) discovers the current Redis master via Sentinel, and creates a TCP tunnel between a local port on the client computer to the master. When the master fails, ST disconnects your client's connection. When the client reconnects, ST rediscovers the current master via Sentinel and provides the new address.\nThe following diagram illustrates that:\n\n```                                                                                                          _\n+----------------------------------------------------------+                                          _,-'*'-,_\n| +---------------------------------------+                |                              _,-._      (_ o v # _)\n| |                           +--------+  |  +----------+  |    +----------+          _,-'  *  `-._  (_'-,_,-'_)\n| |Application code           | Redis  |  |  | Sentinel |  |    |  Redis   | +       (_  O     #  _) (_'|,_,|'_)\n| |(uses regular connections) | client +\u003c---\u003e+  Tunnel  +\u003c-----\u003e+ Sentinel +\u003c--+----\u003e(_`-._ ^ _,-'_)   '-,_,-'\n| |                           +--------+  |  +----------+  |    +----------+ | |     (_`|._`|'_,|'_)\n| +---------------------------------------+                |      +----------+ |     (_`|._`|'_,|'_)\n| Application node                                         |        +----------+       `-._`|'_,-'\n+----------------------------------------------------------+                               `-'\n```\n## Install\n\nMake sure you have a working Go environment - [see the installation instructions here](http://golang.org/doc/install.html).\n\nTo install `sentinel_tunnel`, run:\n```bash\n$ go get github.com/RedisLabs/sentinel_tunnel\n```\nMake sure your `PATH` includes the `$GOPATH/bin` directory so your commands can be easily used:\n\n```bash\n$ export PATH=$PATH:$GOPATH/bin\n```\n\n## Configure\nThe code contains an example configuration file named `sentinel_tunnel_configuration_example.json`. The configuration file is a json file that contains the following information:\n\n* The Sentinels addresses list\n* The list of databases and their corresponding local port\n\nFor example, the following config file contains two Sentinel addresses and two databases. When the client connects to the local port `12345` it actually connect to `db1`.\n\n```json\n{\n\t\"Sentinels_addresses_list\":[\n\t\t\"node1.local:8001\",\n\t\t\"node2.local:8001\"\n\t],\n\t\"Databases\":[\n\t\t{\n\t\t\t\"Name\":\"db1\",\n\t\t\t\"Local_port\":\"12345\"\n\t\t},\n\t\t{\n\t\t\t\"Name\":\"db2\",\n\t\t\t\"Local_port\":\"12346\"\t\n\t\t}\n\t]\n}\n```\n\n## Run\nIn order to run `sentinel_tunnel`:\n\n```bash\n$ ./sentinel_tunnel \u003cconfig_file_path\u003e \u003clog_file_path\u003e\n```\nSet `log_file_path` to `/dev/null` for no logs.\n\n## License\n\n[2-Clause BSD](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredislabs%2Fsentinel_tunnel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredislabs%2Fsentinel_tunnel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredislabs%2Fsentinel_tunnel/lists"}