The following forum(s) have migrated to Microsoft Q&A (Preview): Azure Service Fabric!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
ServiceProxy.Create Partition RRS feed

  • Question

  • When use ServiceProxy.Create to located the service instance without specifying the ServicePartitionKey,how which partition will be decided to serve the request?

    It seems System.Fabric.FabricException","Message":"Invalid partition key/ID '{0}'  for selector {1}"," will be thrown if not passing in ServicePartitionKey.

    do we also have an example about how the targetReplicaSelector and listenerName parameters are used? Thanks

    • Edited by Stratford Wednesday, November 23, 2016 5:00 PM
    Wednesday, November 23, 2016 4:58 PM

Answers

  • "Instead of configuring individual service's ports in the azure load balancer, just the SF Reverse proxy port can be configured in the Azure Load Balancer. This allows clients outside the cluster to reach services inside the cluster via the reverse proxy without an additional configurations."

    Check out this link:

    https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reverseproxy


    Frank

    Monday, November 28, 2016 4:47 PM
  • If no key is specified then the service being addressed must -not- be partitioned or you get the error you describe. So there's nothing to decide (there are no partitions to pick from) - Service Fabric just use the one service that exists by name.

    Regarding the usage of targetreplicaselector and listener name, no I don't think there are samples. Most of the time you don't need and in fact shouldn't need to set TargetReplicaSelector, and listener name is just for selecting the listener by name that the service returns (when the service has multiple listeners).

    Monday, November 28, 2016 8:27 PM

All replies

  • "Instead of configuring individual service's ports in the azure load balancer, just the SF Reverse proxy port can be configured in the Azure Load Balancer. This allows clients outside the cluster to reach services inside the cluster via the reverse proxy without an additional configurations."

    Check out this link:

    https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reverseproxy


    Frank

    Monday, November 28, 2016 4:47 PM
  • If no key is specified then the service being addressed must -not- be partitioned or you get the error you describe. So there's nothing to decide (there are no partitions to pick from) - Service Fabric just use the one service that exists by name.

    Regarding the usage of targetreplicaselector and listener name, no I don't think there are samples. Most of the time you don't need and in fact shouldn't need to set TargetReplicaSelector, and listener name is just for selecting the listener by name that the service returns (when the service has multiple listeners).

    Monday, November 28, 2016 8:27 PM
  • actually, I think there is nothing related with this question.  the document is so confuse people.  much question there:

    1. how to mapping to root path access, like "/"?

    2. how to pass application parameter by query string? 

    etc.

    Thursday, July 26, 2018 9:30 AM