diff --git a/docs/Configuration.md b/docs/Configuration.md index 4ad94935b..66eaa20ab 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -1,5 +1,4 @@ # Configuration -=== When connecting to Redis version 6 or above with an ACL configured, your ACL user needs to at least have permissions to run the ECHO command. We run this command to verify that we have a valid connection to the Redis service. Because there are lots of different ways to configure redis, StackExchange.Redis offers a rich configuration model, which is invoked when calling `Connect` (or `ConnectAsync`): @@ -16,7 +15,6 @@ The `configuration` here can be either: The latter is *basically* a tokenized form of the former. ## Basic Configuration Strings -- The *simplest* configuration example is just the host name: @@ -67,7 +65,6 @@ var conn = ConnectionMultiplexer.Connect("contoso5.redis.cache.windows.net,ssl=t ``` ## Configuration Options ---- The `ConfigurationOptions` object has a wide range of properties, all of which are fully documented in intellisense. Some of the more common options to use include: @@ -149,7 +146,6 @@ Tokens in the configuration string are comma-separated; any without an `=` sign Tokens starting with `$` are taken to represent command maps, for example: `$config=cfg`. ## Obsolete Configuration Options ---- These options are parsed in connection strings for backwards compatibility (meaning they do not error as invalid), but no longer have any effect. @@ -159,7 +155,6 @@ These options are parsed in connection strings for backwards compatibility (mean | writeBuffer={int} | `WriteBuffer` | `4096` | Size of the output buffer | ## Automatic and Manual Configuration ---- In many common scenarios, StackExchange.Redis will automatically configure a lot of settings, including the server type and version, connection timeouts, and primary/replica relationships. Sometimes, though, the commands for this have been disabled on the redis server. In this case, it is useful to provide more information: @@ -189,7 +184,6 @@ redis0:6379,redis1:6380,keepAlive=180,version=2.8.8,$CLIENT=,$CLUSTER=,$CONFIG=, ``` ## Renaming Commands ---- A slightly unusual feature of redis is that you can disable and/or rename individual commands. As per the previous example, this is done via the `CommandMap`, but instead of passing a `HashSet` to `Create()` (to indicate the available or unavailable commands), you pass a `Dictionary`. All commands not mentioned in the dictionary are assumed to be enabled and not renamed. A `null` or blank value records that the command is disabled. For example: @@ -212,7 +206,6 @@ $INFO=,$SELECT=use ``` ## Redis Server Permissions ---- If the user you're connecting to Redis with is limited, it still needs to have certain commands enabled for the StackExchange.Redis to succeed in connecting. The client uses: - `AUTH` to authenticate @@ -234,7 +227,6 @@ For example, a common _very_ minimal configuration ACL on the server (non-cluste Note that if you choose to disable access to the above commands, it needs to be done via the `CommandMap` and not only the ACL on the server (otherwise we'll attempt the command and fail the handshake). Also, if any of the these commands are disabled, some functionality may be diminished or broken. ## twemproxy ---- [twemproxy](https://github.com/twitter/twemproxy) is a tool that allows multiple redis instances to be used as though it were a single server, with inbuilt sharding and fault tolerance (much like redis cluster, but implemented separately). The feature-set available to Twemproxy is reduced. To avoid having to configure this manually, the `Proxy` option can be used: @@ -259,7 +251,6 @@ var options = new ConfigurationOptions+{ ## Tiebreakers and Configuration Change Announcements ---- Normally StackExchange.Redis will resolve primary/replica nodes automatically. However, if you are not using a management tool such as redis-sentinel or redis cluster, there is a chance that occasionally you will get multiple primary nodes (for example, while resetting a node for maintenance it may reappear on the network as a primary). To help with this, StackExchange.Redis can use the notion of a *tie-breaker* - which is only used when multiple primaries are detected (not including redis cluster, where multiple primaries are *expected*). For compatibility with BookSleeve, this defaults to the key named `"__Booksleeve_TieBreak"` (always in database 0). This is used as a crude voting mechanism to help determine the *preferred* primary, so that work is routed correctly. @@ -270,7 +261,6 @@ Both options can be customized or disabled (set to `""`), via the `.Configuratio These settings are also used by the `IServer.MakeMaster()` method, which can set the tie-breaker in the database and broadcast the configuration change message. The configuration message can also be used separately to primary/replica changes simply to request all nodes to refresh their configurations, via the `ConnectionMultiplexer.PublishReconfigure` method. ## ReconnectRetryPolicy ---- StackExchange.Redis automatically tries to reconnect in the background when the connection is lost for any reason. It keeps retrying until the connection has been restored. It would use ReconnectRetryPolicy to decide how long it should wait between the retries. ReconnectRetryPolicy can be exponential (default), linear or a custom retry policy. diff --git a/docs/_config.yml b/docs/_config.yml index e3bd6dbc8..999ec4850 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -12,6 +12,11 @@ theme: jekyll-theme-cayman # GitHub's default config turns it on; the package comes from NuGet, not a tarball. show_downloads: false +# Cayman renders the page title in its header banner, and the title comes from each page's +# first heading - so without this the heading reads twice, banner then body. +titles_from_headings: + strip_title: true + # Not in the always-on GitHub Pages plugin set, so it has to be asked for; generates # sitemap.xml and robots.txt, neither of which the site had. plugins: diff --git a/docs/_includes/head-custom.html b/docs/_includes/head-custom.html new file mode 100644 index 000000000..c74eabe03 --- /dev/null +++ b/docs/_includes/head-custom.html @@ -0,0 +1,3 @@ + + + diff --git a/docs/assets/seredis.svg b/docs/assets/seredis.svg new file mode 100644 index 000000000..26f41712b --- /dev/null +++ b/docs/assets/seredis.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/docs/favicon.ico b/docs/favicon.ico new file mode 100644 index 000000000..e9b001088 Binary files /dev/null and b/docs/favicon.ico differ