Skip to content

Commit 617deff

Browse files
authored
Documentation for Redis Cluster Support (#6831)
1 parent e81cea8 commit 617deff

File tree

1 file changed

+26
-0
lines changed
  • packages/web/docs/src/content/gateway/other-features/performance

1 file changed

+26
-0
lines changed

packages/web/docs/src/content/gateway/other-features/performance/index.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,32 @@ export const gatewayConfig = defineConfig({
104104
})
105105
```
106106

107+
#### Redis Cluster
108+
109+
If you are using [Redis Cluster](http://redis.io/topics/cluster-tutorial), You can use the
110+
`startupNodes` option to connect to the Redis Cluster.
111+
112+
```ts filename="gateway.config.ts"
113+
import { defineConfig } from '@graphql-hive/gateway'
114+
115+
export const gatewayConfig = defineConfig({
116+
cache: {
117+
type: 'redis',
118+
startupNodes: [
119+
{ host: 'localhost', port: 7000 },
120+
{ host: 'localhost', port: 7001 },
121+
{ host: 'localhost', port: 7002 }
122+
],
123+
// If you are using AWS ElastiCache with TLS, you need to use the following options
124+
tls: true,
125+
dnsLookupAsIs: true
126+
},
127+
responseCaching: {
128+
session: () => null
129+
}
130+
})
131+
```
132+
107133
### Cloudflare Workers KV
108134

109135
Cloudflare Workers KV is a distributed, eventually consistent key-value store available in the

0 commit comments

Comments
 (0)