client.close
the connection to the server is closed and all downlinks will stop getting the data from the server.
Hi @ajay-gov
I am a two day old swimer, so the workings of swim are not yet very clear to me. I'm exploring the possibility of using a webagent as single writer per stream in an eventstore.
How does one co-ordinate planes in such a manner that only one instance of a webagent can exist in a "cluster" of servers, and ensure that requests are routed/re-routed to the node that has that instance running? this would be kind of like what you can achieve with Akka Cluster Sharding. Is this possible with swim?
Using the transit as a concrete example, say you have the following set up in your k8s yaml file
Service (ns/name): swimos/transit
StatefulSet (ns/name): default/transit
then the DNS and Hostnames will be
StatefulSet Domain: transit.swimos.svc.cluster.local
Pod DNS: transit-{0..N-1}.transit.swimos.svc.cluster.local
Pod Hostname: transit-{0..N-1}
For the 2 pod example with server-a as index 0 and server-b as index 1
POD DNS for server-a will be: transit-0.transit.swimos.svc.cluster.local
POD DNS for server-b will be: transit-1.transit.swimos.svc.cluster.local
@web
section of the recon file. If you'd like to@web
section of the recon file to be: @web(port: 9002) {
With the apps running on port 9002, the next thing to fix is the the mesh part for the server recon.
For server-a.recon this will be:
@mesh {
@part {
key: partA
predicate: @hash(0x00000000, 0x7fffffff)
@host {
primary: true
}
}
@part {
key: partB
predicate: @hash(0x80000000, 0xffffffff)
@host {
uri: "warp://transit-1.transit.swimos.svc.cluster.local:9002"
primary: true
}
}
}
For server-b.recon this will be:
@mesh {
@part {
key: partA
predicate: @hash(0x00000000, 0x7fffffff)
@host {
uri: "warp://transit-0.transit.swimos.svc.cluster.local:9002"
primary: true
}
}
@part {
key: partB
predicate: @hash(0x80000000, 0xffffffff)
@host {
primary: true
}
}
}