Connect
Connecting to the InfiniStream agent
InfiniStream works with standard NATS client libraries1
NATS client libraries can be used as is, hence connecting to a cluster follows the standard procedure as well. However, it is preferred to connect to an agent in the same Availability Zone as the client. Since PUT’s to S3 are free, this will make it a cost free operation. If all clients connect to the same agent, the writes will coalesce better, leading to fewer PUT’s but will incur inter zone networking charges. However, all clients connecting to an agent in their own Availability Zone will lead to more PUT’s which will lead to more GET’s till compaction happens.
Service discovery begins the moment the Agents are deployed. The Agents will use cloud-specific APIs to try to automatically discover which availability zone they’re running in (this currently works in AWS that we currently support) and then publish this information along with their internal IP address to InfiniStream service discovery system. Connecting to one agent or another is left to the client library.