@@ -329,6 +329,57 @@ createClient({
329329});
330330```
331331
332+ ## Connect using Seamless client experience (SCE)
333+
334+ * Seamless client experience (SCE)* is a feature of Redis Cloud and
335+ Redis Enterprise servers that lets them actively notify clients
336+ about planned server maintenance shortly before it happens. This
337+ lets a client take action to avoid disruptions in service.
338+ See [ Seamless client experience] ({{< relref "/develop/clients/sce" >}})
339+ for more information about SCE.
340+
341+ Use the configuration options shown in the example below to enable SCE
342+ during the connection:
343+
344+ ``` js
345+ const client = createClient ({
346+ RESP : 3 ,
347+ maintPushNotifications: ' auto' ,
348+ maintMovingEndpointType: ' auto' ,
349+ maintRelaxedCommandTimeout: 10000 ,
350+ maintRelaxedSocketTimeout: 10000 ,
351+ ...
352+ });
353+ ```
354+
355+ {{< note >}}SCE requires the [ RESP3] ({{< relref "/develop/reference/protocol-spec#resp-versions" >}})
356+ protocol, so you must set the ` RESP:3 ` option explicitly when you connect.
357+ {{< /note >}}
358+
359+ The available options are:
360+
361+ - ` maintPushNotifications ` : (` string ` ) Whether or not to enable SCE. The options are
362+ - ` 'disabled' ` : don't use SCE
363+ - ` 'enabled' ` : attempt to activate SCE on the server and abort the connection if it isn't supported
364+ - ` 'auto' ` : attempt to activate SCE on the server and fall back to a non-SCE
365+ connection if it isn't supported. This is the default.
366+ - ` maintRelaxedCommandTimeout ` : (` number ` ) The command timeout to use when the server is
367+ in maintenance mode. The default is 10000 (10 seconds). If a timeout happens during the
368+ maintenance period, the client receives a ` CommandTimeoutDuringMaintenance ` error.
369+ - ` maintRelaxedSocketTimeout ` : (` number ` ) The socket timeout to use when the server is in
370+ maintenance mode. The default is 10000 (10 seconds). If a timeout happens during the
371+ maintenance period, the client receives a ` SocketTimeoutDuringMaintenance ` error.
372+ - ` maintMovingEndpointType ` : (` MovingEndpointType ` ) Controls how the client requests the
373+ endpoint to reconnect to. The options are:
374+ - ` internal-ip ` : Enforce requesting the internal IP.
375+ - ` internal-fqdn ` : Enforce requesting the internal FQDN.
376+ - ` external-ip ` : Enforce requesting the external IP address.
377+ - ` external-fqdn ` : Enforce requesting the external FQDN.
378+ - ` none ` : Used to request a null endpoint, which tells the client to reconnect
379+ based on its current config.
380+ - ` auto ` : Let the client decide based on its current config. This is the default.
381+
382+
332383## Connection events
333384
334385The client object emits the following
0 commit comments