libcluster_ec2 v0.1.1 ClusterEC2.Strategy.Tags View Source
This clustering strategy works by loading all instances that have the given tag associated with them.
All instances must be started with the same app name and have security groups configured to allow inter-node communication.
config :libcluster,
topologies: [
tags_example: [
strategy: Elixir.ClusterEC2.Strategy.Tags,
config: [
ec2_tagname: "mytag",
ec2_tagvalue: "tagvalue"
ip_type: :private
polling_interval: 10_000]]]
Configuration Options
Key | Required | Description |
---|---|---|
:ec2_tagname | yes | Name of the EC2 instance tag to look for. |
:ec2_tagvalue | yes | Can be passed a static value (string), a 0-arity function, or a 1-arity function (which will be passed the value of :ec2_tagname at invocation). |
app_prefix | yes | Will be appended to the node’s private IP address to create the node name. |
:ip_type | no | One of :private or :public, defaults to :private |
:polling_interval | no | Number of milliseconds to wait between polls to the EC2 api. Defaults to 5_000 |
Link to this section Summary
Functions
Callback implementation for Cluster.Strategy.start_link/1
Link to this section Functions
Callback implementation for Cluster.Strategy.start_link/1
.