Resolve terminator from identity

I have an HTTP service bound to the network with multiple terminators (multiple processes using the same identity and multiple hosts, each with its own identity).

I need to either connect to the service or to one of the terminators of a given identity.

How can I do that ?

I’m using the ziti python sdk, if I bind with ctx.bind(service, terminator=identity)
I can connect with ctx.connect(service, terminator=identity) but not with ctx.connect(service) (I get the error: “service 4vROTZOwpSgetz7cQUTlVa has no terminators for instanceId”)

Thanks!

What is the reason for binding with identity in your use case?

if you're trying to model the same service with a different flavor then clients need to specify the exact flavor they need. connecting to a random flavor is not supported.

if your service terminators provide a truly same service they should use the same identity, and clients should use that. The default is blank("") and is treated like any other identity value.

I hope it makes sense.

Yes, my service’s terminators are running the same web application (one per VM, for example). I want to be able to send a call to each of those instances (for example, POST /reload)

So in general, it’s fine that the service balances between all the terminators for normal traffic, but for such a reload, I need to be sure that each instance of my webapp (I identify an instance with an identity) receives the call.

According to your explanation, I should, in this case, have two services, one for normal traffic (group of VMs) and one for a given VM, is it true ?

Thanks!

it feels to me that /reload should be a part Operator/Administrator functionality (as opposed to normal web application traffic)

It may be worth considering creating another service for op/admin stuff. it would use named terminators. as an additional benefit you can limit access to it to specific identities.

Yes, after reading your first response, we decided that this is exactly the solution we will implement.

Thanks, Eugene!

1 Like