Pivotal Cloud Foundry p2p communication between same application instances
Running spring boot app with hazelcast as member. When running several instances of app on local machine, hazelcast members are able to discover each other. I wonder how I can achieve same behavior between my app instances deploying on pcf. Just pushing app with 2 instances configured did not worked out. Have read doc on Container-to-container communication, but it seems to work for different apps communicating with each other, not for same app different instances.
spring-boot hazelcast p2p pivotal-cloud-foundry
add a comment |
Running spring boot app with hazelcast as member. When running several instances of app on local machine, hazelcast members are able to discover each other. I wonder how I can achieve same behavior between my app instances deploying on pcf. Just pushing app with 2 instances configured did not worked out. Have read doc on Container-to-container communication, but it seems to work for different apps communicating with each other, not for same app different instances.
spring-boot hazelcast p2p pivotal-cloud-foundry
add a comment |
Running spring boot app with hazelcast as member. When running several instances of app on local machine, hazelcast members are able to discover each other. I wonder how I can achieve same behavior between my app instances deploying on pcf. Just pushing app with 2 instances configured did not worked out. Have read doc on Container-to-container communication, but it seems to work for different apps communicating with each other, not for same app different instances.
spring-boot hazelcast p2p pivotal-cloud-foundry
Running spring boot app with hazelcast as member. When running several instances of app on local machine, hazelcast members are able to discover each other. I wonder how I can achieve same behavior between my app instances deploying on pcf. Just pushing app with 2 instances configured did not worked out. Have read doc on Container-to-container communication, but it seems to work for different apps communicating with each other, not for same app different instances.
spring-boot hazelcast p2p pivotal-cloud-foundry
spring-boot hazelcast p2p pivotal-cloud-foundry
asked Jan 2 at 18:42


Oleg KutsOleg Kuts
369721
369721
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Container to container networking is your best bet. It allows you to talk between two different apps or between instances of the same app.
If you are trying to use multicast, I don't believe that works. You can open TCP & UDP connections between your apps and app instances though. By default, all ports and protocols are blocked, so make sure that you're opening the correct protocol/port combinations with cf add-network-policy
.
https://docs.pivotal.io/pivotalcf/2-4/devguide/deploy-apps/cf-networking.html#add-policy
To access the different instances of your application, you can use the polyglot service discovery functionality. It basically provides DNS for X.<app-name>.apps.internal
. Where X
is the instance number.
See the Clustering example here for details.
https://www.cloudfoundry.org/blog/polyglot-service-discovery-container-networking-cloud-foundry/
Hope that helps!
thanks for info on polyglot service, looks to be the way to go.
– Oleg Kuts
Jan 9 at 11:15
adding network policy for my application and using eureka server for member doscovery worked for me. Some info here community.pivotal.io/s/question/0D50e0000529t0SCAQ/… Also I have run is some issues using internal routes for that purpose, since hazelcast could not resolve member addresses through internal routes. Though I found internal routes be very useful for other pursues.
– Oleg Kuts
Jan 31 at 12:14
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54011543%2fpivotal-cloud-foundry-p2p-communication-between-same-application-instances%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Container to container networking is your best bet. It allows you to talk between two different apps or between instances of the same app.
If you are trying to use multicast, I don't believe that works. You can open TCP & UDP connections between your apps and app instances though. By default, all ports and protocols are blocked, so make sure that you're opening the correct protocol/port combinations with cf add-network-policy
.
https://docs.pivotal.io/pivotalcf/2-4/devguide/deploy-apps/cf-networking.html#add-policy
To access the different instances of your application, you can use the polyglot service discovery functionality. It basically provides DNS for X.<app-name>.apps.internal
. Where X
is the instance number.
See the Clustering example here for details.
https://www.cloudfoundry.org/blog/polyglot-service-discovery-container-networking-cloud-foundry/
Hope that helps!
thanks for info on polyglot service, looks to be the way to go.
– Oleg Kuts
Jan 9 at 11:15
adding network policy for my application and using eureka server for member doscovery worked for me. Some info here community.pivotal.io/s/question/0D50e0000529t0SCAQ/… Also I have run is some issues using internal routes for that purpose, since hazelcast could not resolve member addresses through internal routes. Though I found internal routes be very useful for other pursues.
– Oleg Kuts
Jan 31 at 12:14
add a comment |
Container to container networking is your best bet. It allows you to talk between two different apps or between instances of the same app.
If you are trying to use multicast, I don't believe that works. You can open TCP & UDP connections between your apps and app instances though. By default, all ports and protocols are blocked, so make sure that you're opening the correct protocol/port combinations with cf add-network-policy
.
https://docs.pivotal.io/pivotalcf/2-4/devguide/deploy-apps/cf-networking.html#add-policy
To access the different instances of your application, you can use the polyglot service discovery functionality. It basically provides DNS for X.<app-name>.apps.internal
. Where X
is the instance number.
See the Clustering example here for details.
https://www.cloudfoundry.org/blog/polyglot-service-discovery-container-networking-cloud-foundry/
Hope that helps!
thanks for info on polyglot service, looks to be the way to go.
– Oleg Kuts
Jan 9 at 11:15
adding network policy for my application and using eureka server for member doscovery worked for me. Some info here community.pivotal.io/s/question/0D50e0000529t0SCAQ/… Also I have run is some issues using internal routes for that purpose, since hazelcast could not resolve member addresses through internal routes. Though I found internal routes be very useful for other pursues.
– Oleg Kuts
Jan 31 at 12:14
add a comment |
Container to container networking is your best bet. It allows you to talk between two different apps or between instances of the same app.
If you are trying to use multicast, I don't believe that works. You can open TCP & UDP connections between your apps and app instances though. By default, all ports and protocols are blocked, so make sure that you're opening the correct protocol/port combinations with cf add-network-policy
.
https://docs.pivotal.io/pivotalcf/2-4/devguide/deploy-apps/cf-networking.html#add-policy
To access the different instances of your application, you can use the polyglot service discovery functionality. It basically provides DNS for X.<app-name>.apps.internal
. Where X
is the instance number.
See the Clustering example here for details.
https://www.cloudfoundry.org/blog/polyglot-service-discovery-container-networking-cloud-foundry/
Hope that helps!
Container to container networking is your best bet. It allows you to talk between two different apps or between instances of the same app.
If you are trying to use multicast, I don't believe that works. You can open TCP & UDP connections between your apps and app instances though. By default, all ports and protocols are blocked, so make sure that you're opening the correct protocol/port combinations with cf add-network-policy
.
https://docs.pivotal.io/pivotalcf/2-4/devguide/deploy-apps/cf-networking.html#add-policy
To access the different instances of your application, you can use the polyglot service discovery functionality. It basically provides DNS for X.<app-name>.apps.internal
. Where X
is the instance number.
See the Clustering example here for details.
https://www.cloudfoundry.org/blog/polyglot-service-discovery-container-networking-cloud-foundry/
Hope that helps!
answered Jan 6 at 20:12
Daniel MikusaDaniel Mikusa
6,19511015
6,19511015
thanks for info on polyglot service, looks to be the way to go.
– Oleg Kuts
Jan 9 at 11:15
adding network policy for my application and using eureka server for member doscovery worked for me. Some info here community.pivotal.io/s/question/0D50e0000529t0SCAQ/… Also I have run is some issues using internal routes for that purpose, since hazelcast could not resolve member addresses through internal routes. Though I found internal routes be very useful for other pursues.
– Oleg Kuts
Jan 31 at 12:14
add a comment |
thanks for info on polyglot service, looks to be the way to go.
– Oleg Kuts
Jan 9 at 11:15
adding network policy for my application and using eureka server for member doscovery worked for me. Some info here community.pivotal.io/s/question/0D50e0000529t0SCAQ/… Also I have run is some issues using internal routes for that purpose, since hazelcast could not resolve member addresses through internal routes. Though I found internal routes be very useful for other pursues.
– Oleg Kuts
Jan 31 at 12:14
thanks for info on polyglot service, looks to be the way to go.
– Oleg Kuts
Jan 9 at 11:15
thanks for info on polyglot service, looks to be the way to go.
– Oleg Kuts
Jan 9 at 11:15
adding network policy for my application and using eureka server for member doscovery worked for me. Some info here community.pivotal.io/s/question/0D50e0000529t0SCAQ/… Also I have run is some issues using internal routes for that purpose, since hazelcast could not resolve member addresses through internal routes. Though I found internal routes be very useful for other pursues.
– Oleg Kuts
Jan 31 at 12:14
adding network policy for my application and using eureka server for member doscovery worked for me. Some info here community.pivotal.io/s/question/0D50e0000529t0SCAQ/… Also I have run is some issues using internal routes for that purpose, since hazelcast could not resolve member addresses through internal routes. Though I found internal routes be very useful for other pursues.
– Oleg Kuts
Jan 31 at 12:14
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54011543%2fpivotal-cloud-foundry-p2p-communication-between-same-application-instances%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown