code: private static void locateForCouchbaseBucket(final BinaryRequest request, final List<Node> nodes,
          final CouchbaseBucketConfig config, CoreEnvironment env, RingBuffer<ResponseEvent> responseBuffer) {
  
          if (!keyIsValid(request)) {
              return;
          }
  
          int partitionId = partitionForKey(request.keyBytes(), config.numberOfPartitions());
          request.partition((short) partitionId);
  
          int nodeId = calculateNodeId(partitionId, request, config);
          if (nodeId < 0) {
              errorObservables(nodeId, request, config.name(), env, responseBuffer);
              return;
          }
  
          NodeInfo nodeInfo = config.nodeAtIndex(nodeId);
  
          for (Node node : nodes) {
              if (node.hostname().equals(nodeInfo.hostname())) {
                  node.send(request);
                  return;
              }
          }
  
          if(handleNotEqualNodeSizes(config.nodes().size(), nodes.size())) {
              RetryHelper.retryOrCancel(env, request, responseBuffer);
              return;
          }
  
          throw new IllegalStateException("Node not found for request" + request);
      }
docs: Locates the proper {@link Node}s for a Couchbase bucket.
  
  @param request the request.
  @param nodes the managed nodes.
  @param config the bucket configuration.