┌────────────────────────────────────────────────────────────────────┐ │ Cloud Provider / Bare Metal │ │ │ │ │ │ │┌────────┐ │ ┌──────────────────────────────────────────────────┐ ││ REST ├───┐ │ │ Kubernetes Cluster │ ││ Client │ │ │ │ │ │└────────┘ │ │ ┌──────────┐ │ ┌─────────────┐ ┌─────────┐ ┌────────┐ │ │ └──┼─▶ external │ │ │sync-gateway │ │couchbase│ │ etcd │ │ │ │ │ load ──┼──┼─▶│ service ├────▶│ service ├─────▶│service │ │ │┌────────┐ ┌──┼─▶ balancer │ │ │ │ │ │ │ │ │ ││ REST │ │ │ └──────────┘ │ └─────────────┘ └─────────┘ └────────┘ │ ││ Client ├───┘ │ │ │ │└────────┘ │ └──────────────────────────────────────────────────┘ │ │ │ └────────────────────────────────────────────────────────────────────┘
- Only the Sync Gateway (application tier) service is exposed to the outside world.
- Sync Gateway uses the Couchbase Server service as it’s data storage tier
- The Couchbase Server service is only accessible from within the Kubernetes cluster, and is not exposed to the outside world.
- The etcd service is used by “sidekicks” that run in the Couchbase Server pod to bootstrap the cluster. Likewise, it is only accessible within the cluster.
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│ Kubernetes Cluster ││ ││ ┌──────────────────────────────────────────────────────────────────────┐ ┌──────────────────────────────────────────────────┐ ││ │ Kubernetes Node 1 │ │ Kubernetes Node 2 │ ││ │ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┌ ─ ─ ─ ─ ─ ─ ─ ─ │ │ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ ││ │ Couchbase ReplicaSet (count=2) │ CB etcd service │ │ │ Couchbase ReplicaSet (count=2) │ │ ││ │ │ ┌──────────────────────────────────────────┐ │ │ │ │ ┌──────────────────────────────────────────┐ │ ││ │ │ couchbase-replicaset-pod-1 │ │ ┌────────────┐ │ │ │ │ couchbase-replicaset-pod-2 │ │ │ ││ │ │ │ ┌─────────────────┐ ┌───────────────────┐│ │ │etcd pod │ │ │ │ │ ┌─────────────────┐ ┌───────────────────┐│ │ ││ │ │ │couchbase-server │ │couchbase-sidekick ││ │ │ │ │ │ │ │ │couchbase-server │ │couchbase-sidekick ││ │ │ ││ │ │ │ │ container │ │ container ││ │ │ ┌────────┐ │ │ │ │ │ │ container │ │ container ││ │ ││ │ │ └─────────────────┘ └───────────────────┘│ │ │ │etcd │ │ │ │ │ │ └─────────────────┘ └───────────────────┘│ │ │ ││ │ │ └──────────────────────────────────────────┘ │ │ │containe│ │ │ │ │ └──────────────────────────────────────────┘ │ ││ │ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ │r │ │ │ │ │ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ ││ │ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ │ └────────┘ │ │ │ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ ││ │ Sync Gateway ReplicaSet (count=2) │ └────────────┘ │ │ │ Sync Gateway ReplicaSet (count=2) │ │ ││ │ │ ┌──────────────────────────────────────────┐ └ ─ ─ ─ ─ ─ ─ ─ ─ │ │ │ ┌──────────────────────────────────────────┐ │ ││ │ │ sync-gw-replicaset-pod-1 │ │ │ │ │ sync-gw-replicaset-pod-2 │ │ │ ││ │ │ │ ┌──────────────────────────────────────┐ │ │ │ │ │ ┌──────────────────────────────────────┐ │ │ ││ │ │ │ sync gateway │ │ │ │ │ │ │ sync gateway │ │ │ │ ││ │ │ │ │ container │ │ │ │ │ │ │ container │ │ │ ││ │ │ └──────────────────────────────────────┘ │ │ │ │ │ └──────────────────────────────────────┘ │ │ │ ││ │ │ └──────────────────────────────────────────┘ │ │ │ └──────────────────────────────────────────┘ │ ││ │ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ │ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ ││ └──────────────────────────────────────────────────────────────────────┘ └──────────────────────────────────────────────────┘ ││ │└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Videos
1. Fundamentals of Software Architecture — Neal Ford and Mark Richards
2. 10 Architecture Patterns Used In Enterprise Software Development Today
3. Lesson 55 – Architecture Decision Records
4. Couchbase as a Cloud-Native Database Platform
5. Apache Kafka in 5 minutes