Clusters

Cluster allows you group (or clustering) the nodes in an isolated group.

Basic

Cluster represents a local cluster context.

You can create a cluster context with Cluster class. And you can also connect the nodes in a cluster to other nodes outside a cluster.

dns = Route53("domainNameService")
web = awsECS("service")

Bundle("DB Cluster"):
    db_primary = awsRDS("primary")
    db_primary - [awsRDS("replica1"),
                 awsRDS("replica2")]

dns >> web >> db_primary

Diagram1

Nested Clusters

Nested clustering is also possible.

source = EKS("k8s source")

Bundle("Event Flows"):
    Bundle("Event Workers"):
        workers = [awsECS("worker1"),
                   awsECS("worker2"),
                   awsECS("worker3")]

queue = SQS("event queue")

Bundle("Processing"):
    handlers = [Lambda("process1"),
                Lambda("process2"),
                Lambda("process3")]

store = S3("events store")
dw = awsRedshift("analytics")

source >> workers >> queue >> handlers
handlers >> store
handlers >> dw

Diagram2

There is no depth limit of nesting. Feel free to create nested clusters as deep as you want.