High Connection Count Workloads

  • concept
Each SDK application instance opens multiple connections to every node in the cluster.

Connection Concentration Model

As you scale your app, the total connection count grows fast. Cloud Native Gateway cuts this overhead thanks to how gRPC works:

  • Multiplexing - gRPC sends hundreds of request streams over 1 TCP link. Cloud Native Gateway sets the max stream limit to 512.

  • Sticky connections - gRPC connections stay open for a long time. The TCP/TLS handshake happens far less often.

Cloud Native Gateway also keeps a pool of connections to the cluster and reuses them across client requests.

Clustered Deployments

You can take this model further by scaling Cloud Native Gateway across more nodes. With the Couchbase Kubernetes Operator, Cloud Native Gateway runs as a sidecar and scales with the cluster. Adding a data node also adds a Cloud Native Gateway instance. As a standalone service, you can scale Cloud Native Gateway on its own as needed. Place a load balancer in front of the Cloud Native Gateway fleet to spread traffic. Each application instance then holds just 1 connection to the load balancer. The load balancer splits this traffic across all Cloud Native Gateway nodes.