hazelcast-aws | AWS EC2 discovery plugin for hazelcast | Web Services library
kandi X-RAY | hazelcast-aws Summary
kandi X-RAY | hazelcast-aws Summary
This repository contains a plugin which provides the automatic Hazelcast member discovery in the Amazon Web Services Platform.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Gets all the public addresses of all tasks
- Generate the HTTP headers for the given endpoint
- Fetches the public IP addresses associated with ECS
- Creates the body of the request
- Creates an AWS client
- Logs AWS environment
- Logs information about AWS ECS environment
- Resolve the cluster
- Discover the member metadata
- Resolves the placement group of the resource
- Get the availability zone
- Parses the EcsMetadata response
- Creates tag values
- Validate configuration
- Compares two credentials
- Retrieves all configuration properties
- Resolves EC2 IAM role
- Returns a list of available nodes
hazelcast-aws Key Features
hazelcast-aws Examples and Code Snippets
my-access-key
my-secret-key
us-west-1
my-ec2-instance-tag-key
my-ec2-instance-tag-value
true
hazelcast-client:
network:
aws:
enabled: true
access-key: my-access-key
secret
my-access-key
my-secret-key
eu-central-1
my-cluster
true
hazelcast-client:
network:
aws:
enabled: true
access-key: my-access-key
secret-key: my-secret-key
region: eu-centr
10.0.*.*
hazelcast:
network:
join:
multicast:
enabled: false
aws:
enabled: true
interfaces:
enabled: true
interfaces:
- 10.0.*.*
config.getNet
Community Discussions
Trending Discussions on hazelcast-aws
QUESTION
The vertx application runs in Docker containers, on two EC2 instances and is clustered.
Clustering is achieved with the hazelcast-aws
plugin and the application is started like this:
ANSWER
Answered 2021-Apr-02 at 18:40Since vertx does round robin by default when clustered and there are two instances, this means any instance gets every other message (from 1., above) and makes the client, which connects to one instance only, receive exactly half of all expected responses.
This assumption is only partially correct. Vert.x does round-robin, yes, but this means each instance will get half of the connections, not half of the messages.
Once connection is established, all its messages will arrive to a single instance.
So this:
Would that be correct and is there a way to get 100% of messages to the client, connected to just one node, without introducing things like RabbitMQ?
Already happens.
QUESTION
We have an ECS-service (EC2 ECS) with several tasks forming a Hazelcast cluster group (hazelcast:3.10.6, hazelcast-aws:2.2, we use Hazelcast for storing some shared data and locks in distributed objects). It uses rolling service update with minimum healthy percent set to 100, and maximum at 200.
Updating this service with new Task Definition is not very reliable - often Hazelcast can't preserve existing cluster due to the nature of ECS's service updating process. It sometimes removes tasks with old task definitions very quickly, often several at a time, breaking Hazelcast cluster group.
Yes, we can refactor the service to use client-server model to store memory grid in a separate service or use alternatives, such as storing locks in Redis, but it would be interesting to listen someone who already faced similar difficulties and found a way to gracefully update Hazelcast-enabled services in ECS.
...ANSWER
Answered 2020-Jan-29 at 08:13To make Hazelcast reliable on basically any containerized environment, you need to define graceful shutdown. That would prevent any data loss or multiple Hazelcast instances killed at the same time.
In order to do it, you can check ECS doc about StopTask and Hazelcast documentation on Graceful Shutdown. In short, you need to:
- Add
hazelcast.shutdownhook.policy=GRACEFUL
toJAVA_OPTS
- Add
hazelcast.graceful.shutdown.max.wait=
toJAVA_OPTS
- Change
ECS_CONTAINER_STOP_TIMEOUT
env variable to
If you store a lot of data in the Hazelcast cluster, you can set the value max-waiting-time-for-data-migration
to a high number, like even a few hours.
QUESTION
I setup a Hazelcast-jet cluster on aws ec2 following instructions here. I made use of the hazelcast-aws model so that nodes can automatically discover each other. The cluster is up and running:
...ANSWER
Answered 2019-Sep-27 at 23:52Marko was right (look at comments of the question). This looks like some AWS network constrains. I setup netcat server with port 5701 on one of my ec2 box. I was not able to connect to the port from my laptop using nc but able to connect to it from another ec2 in the same VPC. I then did the same experiment with port 80. I can connect to the port from both my laptop and ec2 instances from the same VPC. Looks like something only allows instances outside of AWS to connect to a couple of well-known ports of ec2 instances.
Anyways, I unblocked myself by running the hazelcast server on port 80. This is not ideal but much more convenient for me to try out some hazelcast-jet features from my IDE comparing to deploy testing code to ec2.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install hazelcast-aws
You can use hazelcast-aws like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the hazelcast-aws component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page