[ADDED] Multiple routes and ability to have per-account routes

New configuration fields:
```
cluster {
   ...
   pool_size: 5
   accounts: ["A", "B"]
}
```

The configuration `pool_size` in the example above means that this
server will create 5 routes to a remote server, assuming that that
server has the same `pool_size` setting.

Accounts (which are not part of the `accounts[]` configuration)
are assigned a specific route in this pool, and this will be the
same route on all servers in the cluster.

Accounts that are defined in the `accounts` field will each have
a dedicated route connection. This will allow suppression of the
account name in some of the route protocols, reducing bytes transmitted
which may increase performance.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2023-03-20 16:48:39 -06:00
parent 70f6caa060
commit 105237cba8
34 changed files with 4590 additions and 722 deletions

View File

@@ -341,6 +341,7 @@ func TestReloadDoesNotWipeAccountsWithOperatorMode(t *testing.T) {
cluster {
name: "A"
listen: 127.0.0.1:-1
pool_size: -1
authorization {
timeout: 2.2
} %s
@@ -463,6 +464,7 @@ func TestReloadDoesUpdateAccountsWithMemoryResolver(t *testing.T) {
cluster {
name: "A"
listen: 127.0.0.1:-1
pool_size: -1
authorization {
timeout: 2.2
} %s
@@ -554,6 +556,7 @@ func TestReloadFailsWithBadAccountsWithMemoryResolver(t *testing.T) {
cluster {
name: "A"
listen: 127.0.0.1:-1
pool_size: -1
authorization {
timeout: 2.2
} %s