How to Use the Connection Manager

Let's look at an example to illustrate how the Connection Manager works.

Consider the following scenario:
  • The cluster consists of the following nodes:
    • node1: External IP address 1.2.3.4

    • node2: External IP address 1.2.3.5

    • node3: External IP address 1.2.3.6

  • An active/standby TimesTenClassic object called sample in the payroll namespace exists. The following Pods also exist for this object:
    • sample-0:
      • Running on node1

      • Contains the active database

      • Internal IP address: 9.0.0.1

      • Associated NodePort Service sample-np-0: Is assigned external port number 32444

    • sample-1:
      • Running on node3

      • Contains the standby database

      • Internal IP address: 9.0.0.77

      • Associated NodePort Service sample-np-1: Is assigned external port number 32445

If you issue a GET to /connstr/v1/payroll/sample/readable/external, you receive the following connection string:
TTC_SERVER1=1.2.3.4/32444;TTC_SERVER2=1.2.3.6/32445;TTC_SERVER_DSN=sample
If you issue a GET to /connstr/1/payroll/sample/writable/external, you receive the following connection string:
TTC_SERVER1=1.2.3.4/32444;TTC_SERVER_DSN=sample
If you issue a GET to /connstr/v1/payroll/sample/readable/internal, you receive the following connection string:
TTC_SERVER1=9.0.0.1/6625;TTC_SERVER2=9.0.0.77/6625;TTC_SERVER_DSN=sample
If you issues a GET to /connstr/v1/payroll/sample/writable/internal, you receive the following connection string:
TTC_SERVER1=9.0.0.77/6625;TTC_SERVER_DSN=sample