Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ihsandemir
Copy link
Collaborator

@ihsandemir ihsandemir commented Aug 6, 2021

Initial implementation of external public address usage support for the C++ client. This feature is needed for external Kubernetes client to be able to connect to the Hazelcast cluster.

related to https://hazelcast.atlassian.net/browse/API-597

Verification: Sample kubernetes test run

fixes #899

@ihsandemir ihsandemir added this to the 4.1.2 milestone Aug 6, 2021
@ihsandemir ihsandemir requested review from sancar, yemreinci and yuce August 6, 2021 15:40
@ihsandemir ihsandemir self-assigned this Aug 6, 2021
@devOpsHazelcast
Copy link
Contributor

Linux test FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows test FAILed.

@devOpsHazelcast
Copy link
Contributor

Linux test FAILed.

1 similar comment
@devOpsHazelcast
Copy link
Contributor

Linux test FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows test FAILed.

2 similar comments
@devOpsHazelcast
Copy link
Contributor

Windows test FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows test FAILed.

@devOpsHazelcast
Copy link
Contributor

Linux test FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows test PASSed.

@devOpsHazelcast
Copy link
Contributor

Linux test PASSed.

1 similar comment
@devOpsHazelcast
Copy link
Contributor

Linux test PASSed.

@ihsandemir ihsandemir marked this pull request as ready for review August 10, 2021 08:18
@devOpsHazelcast
Copy link
Contributor

Windows test FAILed.

@ihsandemir
Copy link
Collaborator Author

verify-windows

@devOpsHazelcast
Copy link
Contributor

Windows test PASSed.

@devOpsHazelcast
Copy link
Contributor

Windows test FAILed.

1 similar comment
@devOpsHazelcast
Copy link
Contributor

Windows test FAILed.

@devOpsHazelcast
Copy link
Contributor

Linux test PASSed.

…lient. This feature is needed for external Kubernetes client to be able to connect to the Hazelcast cluster.
@ihsandemir ihsandemir force-pushed the external_public_address branch from 8e09a65 to 576f48e Compare August 10, 2021 14:09
@devOpsHazelcast
Copy link
Contributor

Linux test PASSed.

1 similar comment
@devOpsHazelcast
Copy link
Contributor

Linux test PASSed.

@devOpsHazelcast
Copy link
Contributor

Windows test PASSed.

@devOpsHazelcast
Copy link
Contributor

Linux test PASSed.

@ihsandemir ihsandemir requested a review from yemreinci August 16, 2021 13:29
@devOpsHazelcast
Copy link
Contributor

Windows test FAILed.

1 similar comment
@devOpsHazelcast
Copy link
Contributor

Windows test FAILed.

@devOpsHazelcast
Copy link
Contributor

Linux test FAILed.

@devOpsHazelcast
Copy link
Contributor

Windows test FAILed.

@devOpsHazelcast
Copy link
Contributor

Linux test PASSed.

@devOpsHazelcast
Copy link
Contributor

Linux test FAILed.

Removed the check for specific error code when can not connect since it is different for Linux(operation cancelled (125)) and Mac OS(101 network_unreachable).
@devOpsHazelcast
Copy link
Contributor

Windows test PASSed.

@devOpsHazelcast
Copy link
Contributor

Linux test PASSed.

@devOpsHazelcast
Copy link
Contributor

Linux test PASSed.

@devOpsHazelcast
Copy link
Contributor

Windows test PASSed.

Copy link
Contributor

@Serdaro Serdaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny edits.

The client sends requests directly to cluster members in the smart client mode (default) in order to reduce hops to accomplish operations. Because of that, the client should know the addresses of members in the cluster.
In cloud-like environments, or Kubernetes, there are usually two network interfaces, the private and the public network. When the client is in the same network as the members, it uses their private network addresses. Otherwise, if the client and the Hazelcast cluster are on different networks, the client cannot connect to members using their private network addresses. Hazelcast 4.2 introduced External Smart Client Discovery to solve that issue. The client needs to communicate with all cluster members via their public IP addresses in this case. Whenever Hazelcast cluster members are able to resolve their own public external IP addresses, they pass this information to the client. As a result, the client can use public addresses for communication.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... network interfaces: private and public...

hazelcast::client::address{server_public_address, server_port});
```

This solution works everywhere without further configuration: Kubernetes, AWS, GCP, Azure, etc. as long as the corresponding plugin is enabled in Hazelcast server configuration.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... configuration (Kubernetes, AWS, GCP, Azure, etc.) as long as ...

@yemreinci yemreinci self-requested a review August 17, 2021 11:18
yemreinci
yemreinci previously approved these changes Aug 17, 2021
@devOpsHazelcast
Copy link
Contributor

Windows test PASSed.

@devOpsHazelcast
Copy link
Contributor

Linux test PASSed.

1 similar comment
@devOpsHazelcast
Copy link
Contributor

Linux test PASSed.

@devOpsHazelcast
Copy link
Contributor

Windows test PASSed.

@ihsandemir ihsandemir merged commit 00448db into hazelcast:master Aug 17, 2021
@ihsandemir ihsandemir deleted the external_public_address branch August 17, 2021 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

std::hash<member> should hash uuid + address

4 participants