Commit Graph

42 Commits

Author SHA1 Message Date
Ivan Kozlovic
82dbb3a5ab [ADDED] Option to not advertise to clients cluster's IPs
By default, a server is now sending to its clients the client URLs
of all servers in the cluster. This allows clients to be able
to reconnect to any server in the cluster even if those clients
were not configured with the list of servers in the cluster.

However, there may be cases where it would make sense to disable
this feature. This now can be done with this option/command line
parameter.

Resolves #322
2016-08-12 19:24:12 -06:00
Ivan Kozlovic
61b0fec200 Updated test for corner cases
Test when client has not yet sent its CONNECT proto or the first
PING when route is added.
2016-07-26 11:57:16 -06:00
Ivan Kozlovic
fda5bd7ac7 [ADDED] Server sends INFO with cluster URLs to clients with support
Clients that will be at the ClientProtoInfo protocol level (or above)
will now receive an asynchronous INFO protocol when the server
they connect to adds a *new* route. This means that when the cluster
adds a new server, all clients in the cluster should now be notified
of this new addition.
2016-07-26 10:55:55 -06:00
Ivan Kozlovic
3691d14426 Fix missing capture of remoteID in removeClient
This needed to be captured under the client lock. Adding a test
that captured the races (when running enough times).
2016-04-22 18:06:38 -06:00
Derek Collison
4f333416bb Revert race on interest graph since it could cause dropped interest propogation, fix test instead 2016-04-15 15:46:29 -07:00
Derek Collison
3dd490a449 Go Report Card fixes 2016-03-20 16:06:28 -10:00
Colin Sullivan
2baac47820 Address issues found by golint.
* No functional changes
* Did not address the ALL_CAPS issues
* Did not modify public APIs and field names.
2016-03-15 15:21:13 -06:00
Ivan Kozlovic
6263c66a40 Fixed code and tests to run on Windows
Mainly tests, but also a fix in route.go to reject a route when the
server is being shutdown.
2016-03-07 18:47:20 -07:00
Ivan Kozlovic
7c0a3b49a6 Fix cluster formation when servers connect quickly
Both seed and chained cases are now handled properly when servers
connect quickly and concurrently to one another.
When accepting a route, the server will forward the new route INFO
protocol to its known routes. In turn those routes will connect
to the new server (if not already connected).
A retry for implicit route was introduced to mitigate the issue
with two servers connecting to each other and electing the opposite
connection as the winner, resulting in both connections being dropped.
The server with smaller ID will try once to reconnect.
Some tests were fixed to handle possible extra INFO protocol.
New tests added.

Fix issue: https://github.com/nats-io/gnatsd/issues/206
2016-02-24 19:44:25 -07:00
Ivan Kozlovic
112413a466 Fix infinite server attempt to connect route to itself
Attempt to address issue #175.
Instead of trying to detect if route URL will point to route listen address, detects that the route remoteID is server's ID.
If so, closes the connection and stop trying.
2016-02-10 14:19:54 -07:00
Derek Collison
853b4d720b Randomize distribution to subscribers
Better performance for queue subscriber distribution.
2016-02-05 09:06:17 -08:00
Derek Collison
809f88a03a subs could be random 2016-02-05 08:32:11 -08:00
Ivan Kozlovic
0a4da78f38 Fix code that checks that server is started + route test
- The raw connection used to check that the server is started now consumes the INFO and sends PING and consumes PONG before returning.
- The route test needs to make sure that the client connection has client id 2. Using PING/PONG before creating route connection to make sure of that.
2016-02-03 15:01:00 -07:00
Larry McQueary
7b5baa97d1 Corrected spelling of 'propagated' and 'propagation' 2016-02-02 12:22:49 -07:00
Derek Collison
8393c3c994 Basic INFO for cluster auto-discovery, Addresses #126 2015-12-16 12:36:24 -08:00
Derek Collison
34eeadfb76 Should be QSRIDs 2015-11-30 19:47:16 -08:00
Derek Collison
96bab33075 fixed import paths 2015-06-19 12:08:11 -07:00
Derek Collison
d9c7392c4d race fixes, tests 2015-06-16 12:48:50 -07:00
Derek Collison
3d4a965193 Make sure to wait long enough 2014-09-18 21:52:41 -07:00
Derek Collison
9dc875b88e pedantic about over zealous GC for sockets 2014-09-18 21:25:13 -07:00
Derek Collison
bfe88c335c test fixups for 1.3, add in test for leaked route Go routines 2014-07-24 16:01:28 -07:00
Derek Collison
e172f4bdf9 Fixed issue #29 with subscriptions leaking across routes on auto-unsubscribe 2014-04-30 14:18:42 -07:00
Derek Collison
edc49b7924 Fixes issues #21 and #22 2014-02-06 19:24:11 -08:00
Derek Collison
71c0c28ced copyright hygiene 2013-10-16 13:40:15 -07:00
Derek Collison
bd0bb5d52c Properly process INFO messages from routes. 2013-10-16 08:44:59 -07:00
Derek Collison
4e1502cc4c README license, copyright cleanup, etc 2013-09-30 10:16:43 -07:00
Derek Collison
cf0f30200f log file support, data race fixes 2013-08-02 16:52:54 -07:00
Derek Collison
32ff571f3e Flush SUB to route 2013-07-30 15:39:53 -07:00
Derek Collison
bca2ccd7d3 Release route connect Go routines on shutdown 2013-07-30 11:19:33 -07:00
Derek Collison
4e2ee9425d Send local subs, tests cleanups 2013-07-30 09:52:46 -07:00
Derek Collison
b136f41fdb Queue Subscriber rework 2013-07-29 22:33:16 -07:00
Derek Collison
d099467d2a Multiple routes w/ same Id 2013-07-29 20:15:55 -07:00
Derek Collison
de469cada6 Reconnect logic 2013-07-29 20:02:47 -07:00
Derek Collison
0adb1f443b Route queue subscriber test 2013-07-29 18:42:16 -07:00
Derek Collison
c61412a862 Only send over route once 2013-07-29 18:13:32 -07:00
Derek Collison
025b63300b 1-hop semantics for messages from routes 2013-07-29 17:09:41 -07:00
Derek Collison
ec4a46c959 MSG proto processing 2013-07-29 15:48:07 -07:00
Derek Collison
5ab044e2c8 Removed debug stuff 2013-07-28 09:36:30 -07:00
Derek Collison
dd99fd12ab First pass soliciting routes with auth 2013-07-28 09:33:13 -07:00
Derek Collison
4193d6e120 fixes, auth checks 2013-07-27 23:50:07 -07:00
Derek Collison
1efeaa83e7 suppress log 2013-07-27 22:57:21 -07:00
Derek Collison
72b68bf363 Added sub and unsub broadcast to routes 2013-07-27 22:05:15 -07:00