Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: README update to highlight how to disable sending client identification #2913

Merged
merged 6 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ACLs
autoload
autoloader
autoloading
analytics
Autoloading
backend
backends
Expand Down Expand Up @@ -43,6 +44,7 @@ RocksDB
runtime
SHA
sharding
SETNAME
SSL
struct
stunnel
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,30 @@ func ExampleClient() *redis.Client {

```


### Advanced Configuration

go-redis supports extending the CLIENT SETNAME command to allow for custom client identification. This feature enables community members to append their own suffixes to the client name, facilitating a deeper understanding of Redis usage patterns.
ofekshenawa marked this conversation as resolved.
Show resolved Hide resolved

#### Default Client Identification

By default, go-redis automatically sets the client library name and version during the connection process. This behavior ensures that the Redis server is aware of the client's identity, which is crucial for monitoring, debugging, and analytics.
ofekshenawa marked this conversation as resolved.
Show resolved Hide resolved

#### Disabling Identity Verification

For use cases where connection identity verification is not required or needs to be explicitly disabled, go-redis provides the `DisableIdentity` configuration option. This option can be particularly useful in environments where Redis servers do not support `client setinfo`.
ofekshenawa marked this conversation as resolved.
Show resolved Hide resolved

To disable verification, set the `DisableIdentity` option to `true` in the Redis client options:

```go
rdb := redis.NewClient(&redis.Options{
Addr: "localhost:6379",
Password: "",
DB: 0,
DisableIdentity: true, // Disable set-info on connect
})
```

## Contributing

Please see [out contributing guidelines](CONTRIBUTING.md) to help us improve this library!
Expand Down
Loading