couchbaselabs / sdk-doctor

Application-server-side cluster connection diagnostics.
https://couchbase.com/
Apache License 2.0
18 stars 12 forks source link

Support for reverse proxy bootstrapping #16

Closed brantburnett closed 6 years ago

brantburnett commented 6 years ago

Motivation

Some clusters are configured to bootstrap via a single reverse proxy (or load balancer) using HTTP. This configuration has the advantage of making it easy to configure disparate microservices to connect to the cluster, and also allows full cluster swaps using XDCR during cluster maintenance. The SDK Doctor currently throws errors and warnings connecting to a cluster using this configuration.

Modifications

Add a new flag --reverse-proxy which:

  1. Suppresses tests which are not applicable to this configuration
  2. Suppresses attempts to connect via CCCP
  3. Warns if there is more than 1 host in the connection string, rather than the default warning if there aren't at least 2 hosts.

Results

Clusters configured using the more advanced reverse proxy bootstrap will now test cleanly if the new flag is supplied. The default behavior is unchanged.

brantburnett commented 6 years ago

Based on feedback from @ingenthr this pull may be based on some incorrect or misunderstood information I was given. It seems that using a reverse proxy has some potential problems during failure situations, and DNS SRV is the recommended course. Though I still need to research options for DNS SRV forwarding in Kubernetes, I have found using the ExternalName service type to be useful there.