{
  "id": "discovery-service",
  "title": "Discovery service",
  "url": "https://redis.io/docs/latest/operate/rs/7.8/databases/durability-ha/discovery-service/",
  "summary": "",
  "content": "The Discovery Service provides an IP-based connection management service\nused when connecting to Redis Enterprise Software databases. When used\nin conjunction with Redis Enterprise Software's other high availability\nfeatures, the Discovery Service assists an application scope with\ntopology changes such as adding, removing of nodes, node failovers and\nso on. It does this by providing your application with the ability to\neasily discover which node hosts the database endpoint. The API used for\ndiscovery service is compliant with the Redis Sentinel API.\n\nDiscovery Service is an alternative for applications that do not want to\ndepend on DNS name resolution for their connectivity. Discovery Service\nand DNS based connectivity are not mutually exclusive. They can be used\nside by side in a given cluster where some clients can use Discovery\nService based connection while others can use DNS name resolution when\nconnecting to databases.\n\n## How discovery service works\n\nThe Discovery Service is available for querying on each node of the\ncluster, listening on port 8001. To employ it, your application utilizes\na [Redis Sentinel enabled client\nlibrary]()\nto connect to the Discovery Service and request the endpoint for the\ngiven database. The Discovery Service replies with the database's\nendpoint for that database. In case of a node failure, the Discovery\nService is updated by the cluster manager with the new endpoint and\nclients unable to connect to the database endpoint due to the failover,\ncan re-query the discovery service for the new endpoint for the\ndatabase.\n\nThe Discovery Service can return either the internal or external\nendpoint for a database. If you query the discovery service for the\nendpoint of a database named \"db1\", the Discovery Service returns\nthe external endpoint information by default. If only an internal\nendpoint exists with no external endpoint the default behavior is to\nreturn the internal endpoint. The \"\\@internal\" is added to the end of\nthe database name to explicitly ask for the internal endpoint. to query\nthe internal endpoint explicitly with database name \"db1\", you can pass\nin the database name as \"db1\\@internal\".\n\nIf you'd like to examine the metadata returned from Redis Enterprise\nSoftware Discovery Service you can connect to port 8001 with redis-cli\nutility and execute \"SENTINEL masters\". Following is a sample output\nfrom one of the nodes of a Redis Enterprise Software cluster:\n\n```sh\n$ ./redis-cli -p 8001\n127.0.0.1:8001\u003e SENTINEL masters\n1) 1) \"name\"\n2) \"db1@internal\"\n3) \"ip\"\n4) \"10.0.0.45\"\n5) \"port\"\n6) \"12000\"\n7) \"flags\"\n8) \"master,disconnected\"\n9) \"num-other-sentinels\"\n10) \"0\"\n2) 1) \"name\"\n2) \"db1\"\n3) \"ip\"\n4) \"10.0.0.45\"\n5) \"port\"\n6) \"12000\"\n7) \"flags\"\n8) \"master,disconnected\"\n9) \"num-other-sentinels\"\n10) \"0\"\n```\n\nIt is important to note that, the Discovery Service is not a full\nimplementation of the [Redis Sentinel\nprotocol](). There are aspects of the\nprotocol that are not applicable or would be duplication with existing\ntechnology in Redis Enterprise Software. The Discovery Service\nimplements only the parts required to provide applications with easy\nHigh Availability, be compatible with the protocol, and not rely on DNS\nto derive which node in the cluster to communicate with.\n\n\nTo use Redis Sentinel, every database name must be unique across the cluster.\n\n\n## Redis client support\n\nWe recommend these clients that are tested for use with the [Discovery Service]() that uses the Redis Sentinel API:\n\n\n\n\nRedis Sentinel API can return endpoints for both master and replica\nendpoints.\nDiscovery Service only supports master endpoints and does not\nsupport returning replica endpoints for a database.\n\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-04-01T08:10:08-05:00"
}

