Skip to content

[Docs] Include a code example for rack-awareness #394

@GeoffMontee

Description

@GeoffMontee

Starting with 1.8.0, our release of GoCQL supports rack-awareness.

We have some limited documentation about this feature here:

gocql/doc.go

Line 131 in b2d210a

// # Rack-level awareness

Perhaps we could include a more complete example in the documentation. For example:

cluster := gocql.NewCluster("192.168.1.1", "192.168.1.2", "192.168.1.3")
cluster.PoolConfig.HostSelectionPolicy = gocql.RackAwareRoundRobinPolicy("AWS_US_EAST_1", "us-east-1a")

We might also want to include a disclaimer about AWS specifically, where AZs do not have consistent names between different AWS accounts. Maybe the documentation can provide more detailed guidance about this or refer to the AWS documentation that mentions how to obtain the internal AZ IDs.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions