Commit Graph

141 Commits

Author SHA1 Message Date
Ivan Kozlovic
6b1918efb4 LeafNode: support for advertise
A server that creates a LeafNode connection to a remote cluster
will now be notified of all possible LeafNode URLs in that cluster.
The list is updated when nodes in the cluster come and go.

Also support for advertise address, similar to cluster, gateway, etc..

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-04-08 10:54:39 -06:00
Derek Collison
19c4ccecb8 Better handling of inline info, bug fix for gw and leafnode interest ref count
Signed-off-by: Derek Collison <derek@nats.io>
2019-03-25 15:15:11 -07:00
Derek Collison
bacb73a403 First pass at leaf nodes. Basic functionality working, including gateways.
What is not completed:
1. TLS
2. config to bind local account.
3. Info updates for solicitor to track topology changes like a client.
4. CONNECT sent after INFO for nonce authroization.
5. Authorization
6. Services and Streams tests.
7. config file parsing.

Signed-off-by: Derek Collison <derek@nats.io>
2019-03-25 08:54:47 -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
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
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
Ivan Kozlovic
714b75d688 Bump version to 2.0.0-RC2
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-01-14 19:56:49 -07:00
Derek Collison
7d6b9144de Fix race, bump version to RC1
Signed-off-by: Derek Collison <derek@nats.io>
2019-01-11 10:58:26 -08:00
Derek Collison
e3d19ef698 Changes to prevent fan in scenarios from slow consumer state
Signed-off-by: Derek Collison <derek@nats.io>
2019-01-10 15:56:04 -08:00
Ivan Kozlovic
7ad4498a09 Gateways: Remove unused permissions options
Permissions were configured but not implemented. Removing for now.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-01-10 09:49:36 -07:00
Waldemar Quevedo
502d861466 Bump version
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-12-19 08:42:35 -08:00
Derek Collison
0953016abe Bumped version
Signed-off-by: Derek Collison <derek@nats.io>
2018-12-13 20:39:23 -08:00
Derek Collison
c87702fd7c jwt lib update, bumped version
Signed-off-by: Derek Collison <derek@nats.io>
2018-12-12 20:43:07 -08:00
Ivan Kozlovic
1daa7d58ab Bump version
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-12-11 07:50:31 -08:00
Derek Collison
7fb2886098 Add total to account conn updates
Signed-off-by: Derek Collison <derek@nats.io>
2018-12-08 18:52:04 -08:00
Ivan Kozlovic
efd891d2ae Fix performance degradation introduced by GW code
This impacted even non gateway traffic

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-12-08 17:44:32 -07:00
Ivan Kozlovic
dd1b598121 Add more tracing for Gateway connect/ip
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-12-08 11:13:54 -07:00
Ivan Kozlovic
6eaa1dc351 Resolve IP if gateway listen is 0.0.0.0 or ::
Otherwise, this may be sent to servers in the cluster and to other
gateways which may result in attempt to connect to self which
in case of TLS would produce error.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-12-07 17:28:21 -07:00
Derek Collison
c83d7f8851 Support server ping for statusz
Signed-off-by: Derek Collison <derek@nats.io>
2018-12-07 08:42:01 -08:00
Derek Collison
7b0f2426fa Internal clients aren't weighed against limits
Signed-off-by: Derek Collison <derek@nats.io>
2018-12-06 14:23:59 -08:00
Derek Collison
ef5764eea0 Bump version, add RTT to StatsZ
Signed-off-by: Derek Collison <derek@nats.io>
2018-12-06 11:46:14 -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
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
Derek Collison
43bd71cd10 fixes for PR comments, MaxControlLine update for tests
Signed-off-by: Derek Collison <derek@nats.io>
2018-11-21 20:08:19 -08:00
Derek Collison
0ee714ce28 Add JWT support for users, accounts and import activations.
Add in trusted keys options and binary stamp
User JWT and Account fetch with AccountResolver
Account and User expiration
Account Imports/Exports w/ updates
Import activation expiration

Signed-off-by: Derek Collison <derek@nats.io>
2018-11-21 10:36:32 -08:00
Derek Collison
ea5a6d9589 Updates for comments, some golint fixes
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-31 20:28:44 -07:00
Derek Collison
47963303f8 First pass at new cluster design
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-24 21:29:29 -07:00
Ivan Kozlovic
0067c3bb04 Added support for lame duck mode
When receiving SIGUSR2 signal (or -sl ldm) the server stops
accepting new clients, closes routes connections and spread the
closing of client connections based on a config lame duck duration
(default is 30sec). This will help preventing a storm of client
reconnect when a server needs to be shutdown.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-10-19 19:07:37 -06:00
Derek Collison
364f3fe388 use time.Minute
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-02 14:39:47 -07:00
Derek Collison
069732c768 Add max and ttl for reponse maps
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-02 14:14:10 -07:00
Derek Collison
2ee868ba18 Propogate route imports and exports to other connected servers
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-05 16:15:31 -07:00
Ivan Kozlovic
2ce3aba434 Bump version and fix megacheck report
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-05 09:33:01 -06:00
Ivan Kozlovic
2153a45050 Update service and syslog code to use variable instead of constant
for the process name and service name. This allows the reuse of this
code in NATS Streaming Server by invoking the new setters to
change the service and process names.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-08-16 10:21:01 -06:00
Ivan Kozlovic
cd28d58a90 Prepare for release 1.2.0
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-07-05 10:12:06 -06:00
Derek Collison
a7dd092136 Add in proto to INFO
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-29 10:43:08 -07:00
Derek Collison
ec8e2636de Track closed connections and reason for closing
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-25 17:56:07 -07:00
Derek Collison
844f376140 Performance optimizations, beta3, fixes to various tests.
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-11 15:11:03 -07:00
Derek Collison
50bb4b9a1b delivery last activity update 2018-06-04 17:45:05 -07:00
Derek Collison
049db6e854 Support for queue subscriber retries over routes
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
e9178f1f42 Performance tweaks
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
50a99241ea Slow consumer updates and latency improvements.
Use pending bytes as slow consumer trigger, so reintroduce max_pending.
Improve latency with inplace flush calls when appropriate. Utilize simple
time budget for readLoop routine.

Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
481697ef67 New outbound data architecture
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Ivan Kozlovic
c2a095581e Bump version for dev [ci skip] 2018-03-23 17:17:13 -06:00
Ivan Kozlovic
8cb7c18204 Prepare for release 1.1.0 2018-03-23 11:53:04 -06:00
Derek Collison
00901acc78 Update license to Apache 2 2018-03-15 22:31:07 -07:00
Ivan Kozlovic
3b5826455d Bump version to 1.0.7 [ci skip] 2018-03-04 14:50:47 -07:00
Ivan Kozlovic
17f27ab90f Prepare for release v1.0.6
-Update Dockerfile Go version to 1.9.4
-Add ARM32v6 build of Docker image
2018-02-28 14:49:18 -07:00
Alberto Ricart
ce6a5e6c8c Merge remote-tracking branch 'origin/injected-version' into injected-version
- Renamed GitHash to gitCommit as per discussions with Ivan
- Set gitHash to 'not set' if not set (as in the case of a local build)

# Conflicts:
#	server/server.go
2018-02-21 19:24:40 -06:00
Alberto Ricart
68b7aa0155 [ADD] Added github.com/nats-io/gnatsd/server.GITHASH compile variable which allows for linker to inject the githash that gnatsd was built from. See https://husobee.github.io/golang/compile/time/variables/2015/12/03/compile-time-const.html. The githash is exposed on server startup (debug) and on /varz.
[FIX] Docker images were injecting the compile time variable `github.com/nats-io/gnatsd/version.GITCOMMIT`, however this is not referenced nor exposed anywhere.
2018-02-21 17:29:21 -06:00
Alberto Ricart
0bcc360de1 [ADD] Added github.com/nats-io/gnatsd/server.GITHASH compile variable which allows for linker to inject the githash that gnatsd was built from. See https://husobee.github.io/golang/compile/time/variables/2015/12/03/compile-time-const.html. The githash is exposed on server startup (debug) and on /varz.
[FIX] Docker images were injecting the compile time variable `github.com/nats-io/gnatsd/version.GITCOMMIT`, however this is not referenced nor exposed anywhere.
2018-02-21 17:26:41 -06:00