Derek Collison
522d4bc591
Merge pull request #833 from nats-io/preload
...
Allow accounts to be preloaded via config if using MemAccResolver.
2018-12-04 14:37:29 -08:00
Derek Collison
fa3df0c9af
Allow accounts to be preloaded via config if using MemAccResolver.
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-12-04 14:23:19 -08:00
Derek Collison
5de80b0f48
Merge pull request #831 from nats-io/statsz
...
Added statsz support
2018-12-04 09:14:16 -08:00
Derek Collison
53c70e6ce1
Use atomic.Load
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-12-04 09:09:27 -08:00
Derek Collison
f9912700c8
Rebase from master
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-12-04 08:48:40 -08:00
Derek Collison
760507222a
Added statsz support
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-12-04 08:23:33 -08:00
Ivan Kozlovic
bb738ef8ce
Merge pull request #830 from nats-io/sys_account_with_gateways
...
Allow system messages to cross gateways.
2018-12-04 09:02:11 -07:00
Ivan Kozlovic
2618d39a36
Allow system messages to cross gateways.
...
Removed the code getting matching subscriptions and trying
to exclude non internal interest since as soon as there is
routing and/or gateway, it is likely that server would end-up
generating the payload and sending. May need to revisit.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2018-12-03 20:59:32 -07:00
Ivan Kozlovic
2c5ca43192
Merge pull request #829 from nats-io/gw_fix_setting_default_tls_timeout
...
Fixing setting of default gateway TLS Timeout
2018-12-03 19:06:27 -07:00
Ivan Kozlovic
0ba587249a
Fixing setting of default gateway TLS Timeout
...
Moved setting to the default value in setBaselineOptions()
so that config reload does not fail.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2018-12-03 18:20:15 -07:00
Ivan Kozlovic
1011339375
Merge pull request #827 from nats-io/gw_send_all_subs
...
Switch to send-all-subs when number of RS- gets too big
2018-12-03 17:35:18 -07:00
Derek Collison
e9c106e6f6
Merge pull request #828 from nats-io/event_stable
...
Make tests a bit more stable
2018-12-03 16:28:49 -08:00
Ivan Kozlovic
e7b6c5731e
Update based on comments
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2018-12-03 17:17:55 -07:00
Derek Collison
b2d8421e21
Make tests a bit more stable
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-12-03 15:45:06 -08:00
Derek Collison
69d89f75e7
Merge pull request #825 from nats-io/operator
...
Updates for operator based configurations.
2018-12-03 14:19:23 -08:00
Derek Collison
e8aec2d712
PR comment fixes
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-12-03 14:13:07 -08:00
Ivan Kozlovic
a23ef5b740
Switch to send-all-subs when number of RS- gets too big
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2018-12-03 13:15:11 -07:00
Derek Collison
31c5bc8a97
Merge pull request #826 from dvrkps/patch-1
...
Fix ErrAuthentication comment
2018-12-03 10:33:21 -08:00
Davor Kapsa
05f9a49f25
Fix ErrAuthentication comment
2018-12-03 19:25:45 +01:00
Derek Collison
a2ec546850
Remove newest only
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-12-03 06:32:32 -08:00
Derek Collison
4b6982dbcd
Add timeout test for URL account resolver
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-12-03 05:40:34 -08:00
Derek Collison
f4f3d3baf1
Updates for operator based configurations.
...
Added update to parse and load operator JWTs.
Changed to add in signing keys from operator JWT to list of trusted keys.
Added URL account resolver.
Added account claim updates by system messages.
Signed-off-by: Derek Collison <derek@nats.io >
2018-12-02 20:34:33 -08:00
Derek Collison
54d505201f
Merge pull request #823 from nats-io/events
...
Allow servers to send system events.
2018-12-01 18:01:25 -08:00
Derek Collison
222814609d
Add in server shutdowns
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-12-01 17:30:22 -08:00
Derek Collison
46707a2c01
Return on bad number of tokens
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-12-01 16:53:23 -08:00
Derek Collison
4b1e5358bc
Don't hold server lock when placing outbound items on sendq
...
Needed to change some things around but think this is close.
Signed-off-by: Derek Collison <derek@nats.io >
2018-12-01 16:48:57 -08:00
Derek Collison
744795ead5
Allow servers to send system events.
...
Specifically this is to support distributed tracking of number of account connections across clusters.
Gateways may not work yet based on attempts to only generate payloads when we know there is outside interest.
Signed-off-by: Derek Collison <derek@nats.io >
2018-12-01 13:54:25 -08:00
Ivan Kozlovic
36345ee167
Merge pull request #822 from nats-io/init_bench_sublist_only_when_needed
...
Initialized the sublist for benchmark tests only when needed
2018-12-01 12:20:10 -07:00
Ivan Kozlovic
dba4cfa791
Initialized the sublist for benchmark tests only when needed
...
This saves a lot of memory and init time when running non benchmark
tests in race mode.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2018-12-01 12:12:45 -07:00
Derek Collison
2a61f28806
Merge pull request #821 from nats-io/raw
...
Change to RawURLEncoding
2018-11-29 17:17:57 -08:00
Derek Collison
e2ce2c0cff
Change to RawURLEncoding
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-11-29 17:04:58 -08:00
Derek Collison
2a19de7963
Merge pull request #819 from nats-io/sys
...
Allow servers to send and receive messages directly
2018-11-29 15:40:21 -08:00
Derek Collison
10eb491898
Better serializing of server info
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-11-29 15:22:04 -08:00
Derek Collison
4172e9b962
Serialize outbound messages
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-11-29 13:59:45 -08:00
Ivan Kozlovic
deb4d96623
Merge pull request #820 from nats-io/gw_fix_race_issue
...
Fixed race issue with lookup/update of the sent no-interest map
2018-11-29 14:36:57 -07:00
Ivan Kozlovic
f011db47c7
Fixed race issue with lookup/update of the sent no-interest map
...
We can't use a simple sync.Map here because the noInterest map
for inbound gateway connections are used concurrently. Indeed,
whenever an account would have been registered or a new sub created
this could trigger an update of that map in order to clear the
fact that we had sent an A-/RS- and now are sending an A+/RS+.
So changed to simple map but protected by gw connection's lock.
Without this change, server would panic if there are messages
published to cluster A that are sent to server B while a sub
is then created on matching subject on B.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2018-11-29 14:22:56 -07:00
Derek Collison
16e9bbaf4c
Fixes for PR comments
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-11-29 12:54:07 -08:00
Derek Collison
8d05ed82ff
Make sure sub is processed
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-11-29 12:29:50 -08:00
Derek Collison
574fd62e01
Allow servers to send and receive messages directly
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-11-29 12:15:08 -08:00
Ivan Kozlovic
8a662a5760
Merge pull request #818 from nats-io/fix_flapper
...
Fixed gateway flapper
2018-11-29 08:22:48 -07:00
Ivan Kozlovic
60462b2a44
Fixed gateway flapper
...
Need to make sure message is received before unsub'ing because
otherwise it would be possible that the unsub happens before
message is delivered, which would have resulted in an RS- while
we were expecting the message to not cause one.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2018-11-28 19:16:35 -07:00
Ivan Kozlovic
04c952854b
Merge pull request #817 from nats-io/fix_ld_mode
...
Update to LameDuck mode
2018-11-28 18:34:50 -07:00
Ivan Kozlovic
cfc5ec4d44
Fixed test and remove grace period from total duration.
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2018-11-28 18:25:15 -07:00
Ivan Kozlovic
e1a4cbaf70
Update to LameDuck mode
...
- Increase grace period to 10sec
- Make default 2min
- Reject config with value less than 30sec
- Don't wait more than 1sec between clients if there are much
less than alloted time
- Stop after last one (was still sleeping after last client was
closed)
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2018-11-28 18:04:26 -07:00
Ivan Kozlovic
7ef7fdfc23
Merge pull request #816 from nats-io/gw_detect_itself
...
Gateways: Ignore reference to self
2018-11-28 16:01:06 -07:00
Ivan Kozlovic
086b26f14a
Gateways: Ignore reference to self
...
Allows the use of a global include for all gateways and each
gateway will ignore its own reference.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2018-11-28 14:24:28 -07:00
Ivan Kozlovic
74f789c985
Merge pull request #815 from nats-io/fix_gw_issues
...
Fixed issue with gateways
2018-11-28 13:39:52 -07:00
Ivan Kozlovic
d78b1ae464
Fixed issue with gateways
...
- If/when splitting buffer to pass to queueOutbound(), it has to
be include full protocol.
- Fix counting of total queue subs
- Fix tests
- Send RS- if no plain sub interest even if there is queue sub
interest.
- Removed a one-liner function
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2018-11-28 13:15:47 -07:00
Ivan Kozlovic
111a821dc1
Merge pull request #808 from nats-io/gateways
...
Gateways [WIP]
2018-11-27 20:31:52 -07:00
Ivan Kozlovic
bbacc58f7a
Updates based on comments
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2018-11-27 20:19:02 -07:00