Commit Graph

26 Commits

Author SHA1 Message Date
Matthias Hanel
3fbf8cac2e parse ping_interval as duration, else assume seconds and warn
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-02-17 12:59:34 -05:00
R.I.Pienaar
bcf96fa1de Allows a descriptive server_name to be set
This adds a new config option server_name that
when set will be exposed in varz, events and more
as a descriptive name for the server.

If unset though the server_name will default to the pk

Signed-off-by: R.I.Pienaar <rip@devco.net>
2019-10-17 18:51:19 +02:00
Ivan Kozlovic
d2578f9e05 Update to connect/reconnect error reports logic
Changed the introduced new option and added a new one. The idea
is to be able to differentiate between never connected and reconnected
event. The never connected situation will be logged at first attempt
and every hour (by default, configurable).
However, once connected and if trying to reconnect, will report every
attempts by default, but this is configurable too.

These two options are supported for config reload.

Related to #1000
Related to #1001
Resolves #969

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-05-26 17:51:01 -06:00
Ivan Kozlovic
7272e4e317 Make the error report attempts configurable
This is a continuation of #1000. Added a configuration to specify
the number of attempts at which the repeated error is reported.
The algo is now to print only the 1st attempt and when current
attempt % <this config param> == 0.

Resolves #969

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-05-20 16:28:48 -06:00
Derek Collison
acfe372d63 Changes for rename from gnatsd -> nats-server
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-06 15:04:24 -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
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
e78d587083 Added support for maximum subscriptions per connection
Signed-off-by: Derek Collison <derek@nats.io>
2018-07-01 15:13:59 -07:00
Derek Collison
3b953ce838 Allow localhost to not be defined, only need 127.0.0.1
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-28 16:10:19 -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
00901acc78 Update license to Apache 2 2018-03-15 22:31:07 -07:00
Tyler Treat
ca1b3485cb Fix "error opening file" errors in tests for Windows
This sort of just punts on the problem by not creating log files in the
tests, but it seemed like the simplest solution.
2017-07-10 12:21:01 -05:00
Tyler Treat
6e3f58f48c Fix tests and cleanup log output 2017-06-14 10:38:21 -05:00
Ivan Kozlovic
3b6dc5eb2f Changed write_deadline configuration type
Changing from being the number of seconds to a time.Duration.
For backward compatibility, the configuration with the number
of seconds is still accepted but an error message is printed
asking the user to convert to duration.

Resolves #487
2017-05-06 14:20:01 -06:00
Ivan Kozlovic
95d0152449 [ADDED] Make Write deadline configurable
We use a hardcoded value of 2 seconds for Write deadline when
writing data to client's socket.
This PR makes that value configurable.

Question is should we push the setting down to the client's object
to avoid indirection such as client.srv.opts.WriteDeadline?
2017-01-18 20:33:44 -07:00
Ivan Kozlovic
f1c513d7bf Removed last references to max_pending_size [ci skip] 2017-01-18 14:38:34 -07:00
Volodymyr Khoroz
a98b51a5ca [#370] Ability to configure ping_interval and ping_max (with tests) 2016-11-16 00:31:38 +02:00
Derek Collison
4bbd2231a6 update server configs and README to new listen style 2016-05-12 17:34:14 -07:00
Derek Collison
433d62ec0a Parse IPs and raw strings in arrays properly 2016-04-07 08:36:57 -07:00
Derek Collison
b61da04ef7 Enable HTTPS for monitoring 2015-12-01 19:01:56 -08:00
Derek Collison
075529e2fe Properly handle and enforce max payload 2015-08-05 22:05:58 -07:00
Máximo Cuadros Ortiz
d99c6aeead remote syslog support 2014-10-16 00:45:44 +02:00
Eric Malm
89452213bf Make profiling port configurable via file
- Port can be specified with 'prof_port' value in file
- CLI flag overrides config file setting
2014-04-24 18:01:09 -07:00
Derek Collison
0b8718a67d flag/config parsing of log and pid files 2013-08-01 12:36:20 -07:00
Derek Collison
c07bca3144 Config file support for monitor http port 2013-07-30 18:04:33 -07:00
Derek Collison
1bb5daca0b Test config file 2013-04-22 00:10:46 -04:00