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

RFC-0075: Faster Failover and Configuration Push #123

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Coding happens all the time and is encouraged. We just recognize there is a poin
| 61 | [SDK3 Diagnostics](rfc/0061-sdk3-diagnostics.md) | Michael N. | ACCEPTED |
| 64 | [SDK3 Field-Level Encryption](rfc/0064-sdk3-field-level-encryption.md) | David N. | ACCEPTED |
| 69 | [KV Error Map V2](rfc/0069-kv-error-map-v2.md) | Brett L. | ACCEPTED |
| 75 | [Faster Failover and Configuration Push](rfc/0075-faster-failover-and-configuration-push.md) | Sergey | ACCEPTED |

### Draft & Review RFCs

Expand All @@ -65,7 +66,6 @@ Coding happens all the time and is encouraged. We just recognize there is a poin
| 72 | Queues And Topics [\[doc\]](https://docs.google.com/document/d/1x-wn--F1Qg6y342pBerLLfpWnAGud2HQRA0YpEVMkqU) | Michael N. | DRAFT
| 73 | KV Range Scan [\[doc\]](https://docs.google.com/document/d/1ir4E9XRvVOncReuR_QgohyompgoIvnZ0De1ik0WkrYs) | David N. & Michael N. | DRAFT
| 74 | Configuration Profiles [\[doc\]](https://docs.google.com/document/d/1LNCYgV2Eqymp3pGmA8WKPQOLSpcRyv0P7NpMYHVcUM0/) | Mike R. | DRAFT
| 75 | [Faster Failover and Configuration Push](https://github.com/couchbaselabs/sdk-rfcs/pull/123) | Sergey | DRAFT |

### Identified RFCs

Expand Down
7 changes: 7 additions & 0 deletions rfc/0048-sdk3-bootstrapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ Once a cluster-level configuration has been successfully retrieved from the clus

In addition to establishing further connections to the cluster, the client should begin refreshing the configuration periodically (typically 2.5s) from the cluster in round-robin fashion using any connected memcached connections as per [SDK-RFC#24 Fast Failover][sdk-rfc-0024] until the cluster is closed or a bucket is opened (cluster configuration switches to being derived from bucket configurations at that point, as described in the section named 'Bucket Connection Sequence' in this document).

[SDK-RFC#75 Faster Failover and Configuration Push][sdk-rfc-0075] describes new method of configuration delivery, when
the KV engine announces updates using `CLUSTERMAP_CHANGE_NOTIFICATION` (`0x01`) operation. This method should be
preferred if the HELLO feature `ClustermapChangeNotificationBrief` (`0x1f`) is acknowledged by the server. Such nodes
should not be used for configuration polling. Although the SDK still might use polling mechanism for older nodes, that
do not support push mechanism.

### HTTP Fallback

During the CCCP phase of connecting, it is possible for the client to fall back to HTTP bootstrapping if the server or bucket type does not support CCCP.  In this case, the client should open a streaming bucket configuration connection to the server at `/pools/default/bs/$BUCKET_NAME`.  This will provide the client with a normal bucket configuration that can be used to perform bucket operations as well as infer the cluster configuration, as is done with a CCCP configuration.  In the case of a memcached bucket, the CCCP operation will fail and an HTTP fallback is expected to occur.  The client must destroy and refresh the HTTP streaming connection periodically in accordance with the configuration option, this is to ensure that dead connections are identified as soon as reasonable.
Expand Down Expand Up @@ -243,3 +249,4 @@ class PasswordAuthenticator {
[sdk-rfc-0024]: /rfc/0024-fast-failover.md
[sdk-rfc-0035]: /rfc/0035-rto.md
[sdk-rfc-0047]: https://docs.google.com/document/d/1B4QM9UO6kz2yjLrBqLjSgArUeM1DvzKnakC_e8KfrmY/edit
[sdk-rfc-0075]: /rfc/0075-faster-failover-and-configuration-push.md