Commit Graph

1905 Commits

Author SHA1 Message Date
Waldemar Quevedo
c625970909 Merge pull request #919 from nats-io/travis-updates
Add Go 1.12 to Travis
2019-03-06 20:37:46 -08:00
Waldemar Quevedo
7da8861e49 Add Go 1.12 to the build
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-03-06 16:05:49 -08:00
Ivan Kozlovic
0255390f80 Merge pull request #918 from nats-io/gw_updates
Gateways: some optimizations
2019-02-28 14:14:09 -07:00
Ivan Kozlovic
3e24d70ea4 Revert moving e.Lock()/e.Unlock()
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-02-28 14:01:53 -07:00
Ivan Kozlovic
ba748302c4 Gateways: some optimizations
Check sublist only when required.
Send the subs list in place instead of go routine (gateways have
different outbound/inbound connections so they don't suffer same
issue than routes)
Bump the default array size when collecting gateway connections

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-02-28 11:16:05 -07:00
Ivan Kozlovic
02d6d9f512 Merge pull request #916 from nats-io/gw_acc_sub_unsub
Gateways: Rework Account Sub/Unsub
2019-02-26 19:09:49 -07:00
Ivan Kozlovic
18399a3808 Gateways: Rework Account Sub/Unsub
We now send A- if an account does not exists, or if there is no
interest on a given subject and no existing subscription.
An A+ is sent if an A- was previously sent and a subscription
for this account is registered.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-02-26 18:34:30 -07:00
Derek Collison
f68f9b1060 Merge pull request #915 from huynq0911/fix_some_typos
Fix some typos
2019-02-24 22:20:07 -08:00
Derek Collison
c783d56c48 Merge pull request #914 from huynq0911/fix_http_https
Change http to https for security links
2019-02-24 22:19:23 -08:00
Nguyen Quang Huy
566d29d01e Fix some typos
Correct some words spelling for reading more easily.
2019-02-25 12:56:38 +07:00
Nguyen Quang Huy
d26323cb0f Change http to https for security links
For security, we should change http into https links.
Co-Authored-By: Nguyen Van Trung [trungnv@vn.fujitsu.com](mailto:trungnv@vn.fujitsu.com)
Signed-off-by: Nguyen Quang Huy [huynq@vn.fujitsu.com](mailto:huynq@vn.fujitsu.com)
2019-02-25 12:50:03 +07:00
Derek Collison
8362bda0bd Bump version [ci skip]
Signed-off-by: Derek Collison <derek@nats.io>
2019-02-20 18:04:07 -08:00
Derek Collison
28f14e5c97 Merge pull request #912 from nats-io/test_for_route_send_subs
Routes sending large subs and fan-in slow consumer fixes.
2019-02-20 13:27:16 -08:00
Derek Collison
69cdc02ebb Const for maxFlushPending
Signed-off-by: Derek Collison <derek@nats.io>
2019-02-20 13:13:29 -08:00
Derek Collison
0696d5a431 New fan-in logic
Reworked fan in logic. We do not hold locks during IO, either read or write.
On scenarios where we can get behind mostly due to fan-in from fast producers
we detect and create a stall channel. Once we catch up we close the stall channel
to release all blocked producers. Producers have an upper bound on how long
they will be stalled.

Signed-off-by: Derek Collison <derek@nats.io>
2019-02-20 12:09:26 -08:00
Ivan Kozlovic
04d824c4d4 [FIXED] Possible slow consumers when routes exchange sub list
If each server has a long list of subscriptions, when the route
is established, sending this list could result in each server
treating the peer as a slow consumer, resulting in a reconnect,
etc..
Also bumping the fan-in threshold for route connections.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-02-20 12:09:26 -08:00
Waldemar Quevedo
cf3f51f859 Merge pull request #909 from nats-io/verify-and-map-routes
Support for TLS certs based auth for routes/gateways
2019-02-19 14:34:20 -08:00
Waldemar Quevedo
4846b5ad6c Support for TLS certs based auth for gateways
When enabling verify and map as part of its TLS config
a the subject from TLS cert can now be used to confirm
the identity of a gateway.

```
gateway {
  tls {
    cert_file = "./configs/certs/tlsauth/server.pem"
    key_file = "./configs/certs/tlsauth/server-key.pem"
    ca_file = "./configs/certs/tlsauth/ca.pem"
    verify_and_map = true
    timeout = 2
  }

  authorization {
    user = "CN=localhost,OU=NATS.io Operators"
  }
}
```

Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-02-18 21:48:06 -08:00
Waldemar Quevedo
01057467cf Support TLS based auth for routes
Similar as with clients, this makes it possible to
use the subject from a TLS certificate to validate
the permissions from a cluster member.

Currently only a single configured user is supported:

```
cluster {
  tls {
    cert_file = "./configs/certs/tlsauth/server.pem"
    key_file = "./configs/certs/tlsauth/server-key.pem"
    ca_file = "./configs/certs/tlsauth/ca.pem"
    verify_and_map = true
    timeout = 2
  }

  permissions {
    publish {
  	allow = ["public.>"]
    }
    subscribe {
  	allow = ["public.>"]
    }
  }

  authorization {
    user = "CN=localhost,OU=NATS.io Operators"
  }
}
```

Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-02-18 17:12:09 -08:00
Waldemar Quevedo
fcf691c2dc Merge pull request #899 from wallyqs/verify-and-map-readme
Verify and map readme update
2019-02-18 12:44:09 -08:00
Derek Collison
36aa4a964e Merge pull request #908 from nmiculinic/introduceParserTypeSafety
Added type safety to Parser state
2019-02-18 09:06:51 -08:00
Neven Miculinic
5344e1384e Added parser type safety 2019-02-18 17:36:54 +01:00
Derek Collison
01016a2105 Merge pull request #906 from wallyqs/travis-go-import-path
Add go import path for Travis
2019-02-14 14:25:14 -08:00
Derek Collison
c329da72fc Merge pull request #905 from nats-io/statsz
Remove delay for global statsz ping, bumped 2.0 RC version
2019-02-12 16:04:02 -08:00
Derek Collison
c5510d616e Remove delay for global statsz, bump RC version
Signed-off-by: Derek Collison <derek@nats.io>
2019-02-12 15:17:29 -08:00
Derek Collison
4d932baa26 Update some comments [ci skip]
Signed-off-by: Derek Collison <derek@nats.io>
2019-02-11 19:32:22 -08:00
Waldemar Quevedo
2936e1b92a Add go import path to Travis
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-02-11 02:08:05 -08:00
Derek Collison
28ea0e5ed9 Merge pull request #903 from nats-io/cleanup
Some cleanup on outbound and flush
2019-02-08 19:13:42 -08:00
Derek Collison
c385834f96 Some cleanup on outbound and flush
Signed-off-by: Derek Collison <derek@nats.io>
2019-02-08 19:12:51 -08:00
Ivan Kozlovic
931af2fe71 Update README link to latest release [ci skip]
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-02-07 16:47:37 -07:00
Ivan Kozlovic
fe3289b1d6 Merge pull request #900 from nats-io/fix_budget_flush
Fixed use of flush budget for connections other than ROUTER
2019-02-07 16:07:22 -07:00
Ivan Kozlovic
235e7f99dd Fixed use of flush budget for connections other than ROUTER
Need to be explicit about the connection type to apply the budget to.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-02-07 15:01:08 -07:00
Waldemar Quevedo
d632297862 Verify and map readme update
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-02-07 10:01:55 -08:00
Waldemar Quevedo
a733e6781a Merge pull request #896 from nats-io/tls-map-user-cn
Support using TLS cert subject to auth user
2019-02-06 20:57:31 -08:00
Derek Collison
ce538b5421 Merge pull request #898 from nats-io/reload_mcl
Support reload of max_control_line by updating connected clients
2019-02-06 14:50:36 -08:00
Derek Collison
007c98dc03 Support reload of max_control_line by updating connected clients
Signed-off-by: Derek Collison <derek@nats.io>
2019-02-06 14:33:34 -08:00
Waldemar Quevedo
7645d95c18 Support using TLS cert subject to auth user
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-02-06 12:36:03 -08:00
Derek Collison
46a2661114 Merge pull request #891 from wallyqs/include-parsing-fixes
Allow using quotes around include
2019-02-06 11:57:40 -08:00
Derek Collison
09a4b05017 Merge pull request #892 from wallyqs/lookup-env-errors
Show parse errors from looked up env vars
2019-02-06 11:57:22 -08:00
Derek Collison
5a79df11dd Merge pull request #893 from wallyqs/config-string-num-val
Support for unquoted config strings that start with number
2019-02-06 11:57:05 -08:00
Waldemar Quevedo
47055eddef Add support for unquoted config strings that start with number
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-02-06 08:57:09 -08:00
Waldemar Quevedo
457c442198 Show parse errors from looked up env vars
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-02-06 08:57:08 -08:00
Derek Collison
36b902675f Merge pull request #897 from nats-io/speed
Some Optimizations
2019-02-05 15:34:52 -08:00
Derek Collison
af78552549 Move ints to proper sizes for all
Signed-off-by: Derek Collison <derek@nats.io>
2019-02-05 15:19:59 -08:00
Derek Collison
b8e7b9b68e Some Optimizations
1. Change outbound client structure to be smaller and more cache friendly.
2. Snapshot MaxControlLine into client structure (mcl) to avoid server opts lookup.

Signed-off-by: Derek Collison <derek@nats.io>
2019-02-04 17:07:49 -08:00
Derek Collison
cfa0685beb Merge pull request #895 from nats-io/fix_possible_writeloop_stall
[FIXED] Possible delays in delivering messages
2019-02-03 00:13:09 -08:00
Ivan Kozlovic
42f45ce5b6 [FIXED] Possible delays in delivering messages
There is a possibility that a partial write results in data
not being sent in a timely fashion to a subscription.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-02-02 18:42:50 -07:00
Derek Collison
ae80c4e98b Merge pull request #894 from wallyqs/nkeys-log-user
Fix logging public nkey on auth violation
2019-02-02 08:54:55 -08:00
Waldemar Quevedo
e4a4c98ad0 Fix logging public nkey on auth violation
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-02-01 17:20:04 -08:00
Waldemar Quevedo
d0d05256f9 Show parse errors from looked up env vars
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-01-31 12:21:07 -08:00