zkcatalog

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 6 Imported by: 4

README

The FireCamp ZooKeeper container is based on the official ZooKeeper image. The data volume will be mounted to the /data directory inside container. All ZooKeeper data will be stored under it.

Topology

The ZooKeeper cluster should have at least 3 nodes across 3 availability zones. This could tolerate 1 node or 1 availability zone failure. It is suggested to have 5 nodes across 3 or more availability zones, to tolerate 2 nodes or 1 (or more if the cluster has more availability zones) availability zone failure.

Security

By default, ZooKeeper could control access using ACLs.

The simple example steps:

  1. Login with zkCli.sh: zkCli.sh -server host

  2. Create a znode: create /zk_test mydata

  3. Add a new user: addauth digest user1:password1

  4. Set acl for the znode: setAcl /zk_test auth:user1:password1:crdwa

In the future, SASL and SSL will be supported.

JVM Configs

By default, the Java heap size is set to 4GB. If your ZooKeeper wants other memory, you could specify the "reserve-memory" when creating the ZooKeeper service by the firecamp-service-cli.

Set JVM TTL for ZooKeeper Java client

By default, JVM caches a successful DNS lookup forever. ZooKeeper Java client should set JVM TTL to a reasonable value such as 60 seconds. So when ZooKeeper container moves to another node, JVM could lookup the new address.

Logging

The ZooKeeper logs are sent to the Cloud Logs, such as AWS CloudWatch logs.

Documentation

Index

Constants

View Source
const (
	// ContainerImage is the main ZooKeeper running container.
	ContainerImage = common.ContainerNamePrefix + "zookeeper:" + common.Version

	// ClientPort is the port at which the clients will connect
	ClientPort = 2181

	// DefaultHeapMB is the default zookeeper java heap size
	DefaultHeapMB = 4096
)

Variables

This section is empty.

Functions

func GenDefaultCreateServiceRequest

func GenDefaultCreateServiceRequest(platform string, region string, azs []string,
	cluster string, service string, replicas int64, volSizeGB int64, res *common.Resources) *manage.CreateServiceRequest

GenDefaultCreateServiceRequest returns the default service creation request.

func GenReplicaConfigs

func GenReplicaConfigs(platform string, region string, cluster string, service string, azs []string, replicas int64, reserveMemMB int64) []*manage.ReplicaConfig

GenReplicaConfigs generates the replica configs.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL