Commit graph

57 commits

Author SHA1 Message Date
Patrik Nordwall
a323936299 Disable cluster stats by default, see #3348
* Add VectorClockStats
2013-05-28 16:15:57 +02:00
Patrik Nordwall
18a3b3facf Config of cluster info logging, see #3225 2013-05-23 13:36:35 +02:00
Patrik Nordwall
ad1eaa6d4a Remove auto-join config, derive from seed-nodes, see #3359 2013-05-17 13:54:51 +02:00
Patrik Nordwall
9e56ab6fe5 Disallow re-joining, see #2873
* Disallow join requests when already part of a cluster
* Remove wipe state when joining, since join can only be
  performed from empty state
* When trying to join, only accept gossip from that member
* Ignore gossips from unknown (and unreachable) members
* Make sure received gossip contains selfAddress
* Test join of fresh node with same host:port
* Remove JoinTwoClustersSpec
* Welcome message as reply to Join
* Retry unsucessful join request
* AddressUidExtension
* Uid in cluster Member identifier
  To be able to distinguish nodes with same host:port
  after restart.
* Ignore gossip with wrong uid
* Renamed Remove command to Shutdown
* Use uid in vclock identifier
* Update sample, Member apply is private
* Disabled config duration syntax and cleanup of io settings
* Update documentation
2013-04-17 16:48:18 +02:00
Patrik Nordwall
7eac88f372 Cluster node roles, see #3049
* Config of node roles cluster.role
* Cluster router configurable with use-role
* RoleLeaderChanged event
* Cluster singleton per role
* Cluster only starts once all required per-role node
  counts are reached,
  role.<role-name>.min-nr-of-members config
*  Update documentation and make use of the roles in the examples
2013-03-18 11:56:11 +01:00
Björn Antonsson
7ed6b3d4ee Fixes according review. See #3076 2013-03-11 12:27:29 +01:00
Patrik Nordwall
157a25bcde Failure detector refactoring, see #2690
* Failure detector was previously copied with refactoring to
  akka-remote and this refactoring makes use of that and removes
  the failure detector in akka-cluster
* Adjustments to reference.conf
* Refactoring of FailureDetectorPuppet
2013-02-01 10:08:39 +01:00
Patrik Nordwall
9dc124dacd Remove work-around for sending to broken connections, see #2909
* Previous work-around was introduced because Netty blocks when sending
to broken connections. This is supposed to be solved by the non-blocking
new remoting.
* Removed HeartbeatSender and CoreSender in cluster
* Added tests to verify that broken connections don't disturb live connection
2013-01-31 13:41:02 +01:00
Patrik Nordwall
8b4e903e7d Detect failure when no heartbeats sent, see #2907
* Subscribe to InstantMemberEvent and start heartbeating when
  InstantMemberUp. Same for metrics.
* HeartbeatNodeRing data structure for bidirectional mapping of
  heartbeat sender and receiver. Not using ConsistentHash anymore.
  Node addresses are hashed to ensure that neighbors are spread out.
* HeartbeatRequest when receiver detects that it has not received
  expected heartbeats.
* New test InitialHeartbeatSpec that simulates the problem
* Add/remove some related conf properties
* Add some more logging to be able to diagnose eventual problems
* Explicit config of nr-of-end-heartbeats
2013-01-18 12:54:09 +01:00
Viktor Klang
adfeb2c1f0 #2879 - updating copyright info 2013-01-09 11:38:00 +01:00
Patrik Nordwall
44ab9f116f min-nr-of-members and registerOnMemberUp, see #2306
* Leader moves joining members to up when min-nr-of-members reached
* Tested by MinMembersBeforeUpSpec
* Used in factorial sample
* Docs
2012-12-12 14:00:06 +01:00
Patrik Nordwall
5eec693fd0 Incorparate review feedback, see #2547
* case object and case class for MixMetricsSelector
* Rename decay-half-life-duration to moving-average-half-life
* Clarification of decay-half-life-duration and collect-interval
* Removed Fields, Java compatibility issue
* Adapt for-yield variables
* Comment metrics collector constructor that takes system param
* Don't copy EWMA if not needed
* LogOf2 constant 0.69315
* Don't use mapValues
* Remove RichInt conversion
* sigar version replace tag in docs
* createDeployer factory method to make it possible to override
  deployer in subclass
* Improve readability of MetricsListener (in sample)
* Better startup of factorial sample (no sleep)
* Many minor enhancements and cleanups
2012-11-16 11:03:20 +01:00
Patrik Nordwall
dcde7d3594 AdaptiveLoadBalancingRouter and more refactoring of metrics, see #2547
* Refactoring of standard metrics extractors and data structures
* Removed optional value in Metric, simplified a lot
* Configuration of EWMA by using half-life duration
* Renamed DataStream to EWMA
* Incorporate review feedback
* Use binarySearch for selecting weighted routees
* More metrics selectors for the router
* Removed network metrics, since not supported on linux
* Configuration of router
* Rename to AdaptiveLoadBalancingRouter
* Remove total cores metrics, since it's the same as jmx getAvailableProcessors,
  tested on intel 24 core server and amd 48 core server, and MBP
* API cleanup
* Java API additions
* Documentation of metrics and AdaptiveLoadBalancingRouter
* New cluster sample to illustrate metrics in the documentation,
  and play around with (factorial)
2012-11-14 15:08:30 +01:00
Patrik Nordwall
c9d206764a ClusterLoadBalancingRouter and refactoring of metrics, see #2547
* MetricsSelector, calculate capacity, weights and allocate weighted
  routee refs
* ClusterLoadBalancingRouterSpec
* Optional heap max
* Constants for the metric fields
* Refactoring of Metric and decay
* Rewrite of DataStreamSpec
* Correction of EWMA and removal of BigInt, BigDecimal
* Separation of MetricsCollector into trait and two classes,
  SigarMetricsCollector and JmxMetricsCollector
* This will reduce cost when sigar is not installed, such as
  avoiding throwing and catching exc for every call
* Improved error handling for loading sigar
* Made MetricsCollector implementation configurable
* Tested with sigar
2012-11-07 20:36:24 +01:00
Roland
bff79c2f94 Merge remote-tracking branch 'origin/master' into wip-2.10.0-RC1-∂π
- currently cheating: uses zeroMQ artifacts for scala 2.10M7
- fixed a bunch of more wrong references to scala.concurrent.util
2012-10-15 16:18:52 +02:00
Roland
0f04239f67 move Duration classes according to scala 2.10 nightly and remove casts to FiniteDuration, see #2504 2012-10-11 15:18:10 -07:00
Patrik Nordwall
3f73705abc Use consistent hash to heartbeat to a few nodes instead of all, see #2284
* Previously heartbeat messages was sent to all other members, i.e.
  each member was monitored by all other members in the cluster.
* This was the number one know scalability bottleneck, due to the
  number of interconnections.
* Limit sending of heartbeats to a few (5) members. Select and
  re-balance with consistent hashing algorithm when new members
  are added or removed.
* Send a few EndHeartbeat when ending send of Heartbeat messages.
2012-10-08 08:41:28 +02:00
Helena Edelson
dbce1c8b85 Cluster metrics internal API and cluster-wide transport of metrics data.
* Create Cluster Metrics API
* Create transport of relevant metrics data
Does not include load-balancing routers.
2012-09-24 13:07:11 -06:00
Patrik Nordwall
068335789c Cluster config setting to disable jmx, see #2531 2012-09-20 08:09:01 +02:00
Patrik Nordwall
06f81f4373 Improve publish of domain events, see #2202
* Gossip is not exposed in user api
* Better and more events
* Snapshot event sent to new subscriber
* Updated tests
* Periodic publish only for internal stats
2012-08-15 16:47:34 +02:00
Viktor Klang
ac5b5de90a Merging in master, huge work trying to get things to compile, tests not green at this stage 2012-07-06 17:04:04 +02:00
Viktor Klang
3911b18069 Merging in master 2012-07-04 15:24:23 +02:00
Patrik Nordwall
c708d2ad8a First step in refactoring of cluster internals to actors, see #2311
* Move clustering code to ClusterCore actor
* More will be done, comitting this for early review
2012-07-04 13:52:14 +02:00
Patrik Nordwall
9bf5a74f92 Merge branch 'master' into wip-2290-leader-merge-patriknw
Conflicts:
	akka-cluster/src/test/scala/akka/cluster/ClusterConfigSpec.scala
2012-07-04 11:46:28 +02:00
Patrik Nordwall
63d6ac2a7e Change auto-down default to off, see #2304 2012-07-03 16:36:11 +02:00
Patrik Nordwall
e5979bc31c Gossip merge in large cluster, #2290
* Trying to simultaneously resolving conflicts at several nodes creates new conflicts.
  Therefore the leader resolves conflicts to limit divergence. To avoid overload there
  is also a configurable rate limit of how many conflicts that are handled by second.
* Netty blocks when sending to broken connections. ClusterHeartbeatSender actor
  isolates sending to different nodes by using child workers for each target
  address and thereby reduce the risk of irregular heartbeats to healty
  nodes due to broken connections to other nodes.
2012-07-02 23:00:41 +02:00
Patrik Nordwall
c09caebe8a Small refactoring of cluster actors
* Separate actor for heartbeats, so they are more isolated from gossip
  messages
* Configuration property for dispatcher to use for the cluster actors
2012-07-02 23:00:41 +02:00
Viktor Klang
e62a0eee1c Merge with master 2012-06-29 16:07:36 +02:00
Viktor Klang
54a3a44bf8 #2292 - Removing akka.util.Duration etc and replace it with scala.concurrent.util.Duration 2012-06-29 13:33:20 +02:00
Patrik Nordwall
d47ff04c03 Moved GossipDifferentViewProbability to config, see #2253 2012-06-29 08:56:58 +02:00
Viktor Klang
4ae26230b3 Merge branch 'master' into wip-scala210M4-√ 2012-06-26 12:15:46 +02:00
Patrik Nordwall
20fc0c42a2 Merge branch 'master' into wip-2219-seed-nodes-patriknw
Conflicts:
	akka-cluster/src/main/scala/akka/cluster/AccrualFailureDetector.scala
	akka-cluster/src/main/scala/akka/cluster/ClusterSettings.scala
2012-06-25 20:40:06 +02:00
Patrik Nordwall
738565883b Add join-seed-node-timeout config, see #2219 2012-06-25 20:20:11 +02:00
Viktor Klang
c37b97452b Making akka-cluster compile and tests green 2012-06-25 17:21:06 +02:00
patriknw
555998b2c1 Merge pull request #553 from akka/wip-2249-heartbeats-after-join-patriknw
Start sending heartbeats immediately when joining, see #2249
2012-06-25 01:26:18 -07:00
Patrik Nordwall
42078e7083 Reintroduce 'seed' nodes, see #2219
* Implement the join to seed nodes process
  When a new node is started started it sends a message to all
  seed nodes and then sends join command to the one that answers
  first.
* Configuration of seed-nodes and auto-join
* New JoinSeedNodeSpec that verifies the auto join to seed nodes
* In tests seed nodes are configured by overriding seedNodes
  function, since addresses are not known before start
* Deputy nodes are the live members of the seed nodes (not sure if
  that will be the final solution, see ticket 2252
* Updated cluster.rst with latest info about deputy and seed nodes
2012-06-21 11:05:02 +02:00
Viktor Klang
9b73d75c1b Removing the naught default in code of the failure detector and changed so that the AccrualFailureDetectors constructor matches what the instantiator expects 2012-06-20 14:14:10 +02:00
Patrik Nordwall
529c25f3dc Start sending heartbeats immediately when joining, see #2249
* Keep track of joins that are in progress in State.joinInProgress,
  with Deadline
* Add test that fails without this feature
2012-06-20 13:20:28 +02:00
Patrik Nordwall
e023108471 Incorporated feedback from review, see #2066 2012-06-20 10:18:15 +02:00
Patrik Nordwall
410fd6ca58 Improve phi in AccrualFailureDetector, see #2066
* Implementation of phi according to the paper
* Config properties and documentation, min-std-deviation,
* acceptable-lost-heartbeats
* Restructure code, HeartbeatHistory is responsible for
  stats from historical heartbeats
* Correct and efficient calculation of mean and standard
  deviation
* More tests
2012-06-19 12:32:56 +02:00
Patrik Nordwall
b27bae6554 Use dedicated cluster scheduler only when default scheduler resolution isn't good enough, see #2214
* Config properties for scheduler
* Commented shutdown considerations
2012-06-12 13:34:59 +02:00
Patrik Nordwall
a7d2be10eb Merge branch 'master' into wip-2214-heartbeats-patriknw
Conflicts:
	akka-cluster/src/main/scala/akka/cluster/AccrualFailureDetector.scala
	akka-cluster/src/main/scala/akka/cluster/Cluster.scala
2012-06-11 22:27:08 +02:00
Patrik Nordwall
e2551494c4 Use Use separate heartbeats for FailureDetector, see #2214
* Send Heartbeat message to all members at regular interval
* Removed the need to gossip to myself
2012-06-11 15:00:44 +02:00
Jonas Bonér
a4499b06bb Abstracted the FailureDetector into a interface trait and added controllable failure detector mock.
- Abstracted a FailureDetector trait.
- Added a FailureDetectorPuppet mock that can be user controllable
- Added option to define a custom failure detector
- Misc minor fixes

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-06-10 16:52:33 +02:00
Jonas Bonér
391fed6594 Misc changes, fixes and improvements after review.
- Renamed all 'frequency' to 'interval'
- Split up NodeJoinAndUpSpec and into NodeJoinSpec and NodeUpSpec.
- Split up MembershipChangeListenerJoinAndUpSpec and into MembershipChangeListenerJoinSpec and MembershipChangeListenerUpSpec.
- Added utility method 'startClusterNode()'
- Fixed race in register listener and telling node to leave
- Removed 'after' blocks
- Cleaned up unused code
- Improved comments

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-06-04 23:21:28 +02:00
Jonas Bonér
5adaa1a271 Added the concept of PortPrefix in the clustering tests to avoid clashes in binding of server port when running the tests in parallel.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-05-04 15:03:23 +02:00
Jonas Bonér
f7ca01a26b Merge branch 'master' of github.com:akka/akka
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-03-22 17:10:43 +01:00
Jonas Bonér
1ae2c68d2f Added config options for run frequency of the different periodic node tasks.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-03-15 23:00:20 +01:00
Jonas Bonér
50d11593c9 Added 'ClusterSpec' abstract class with 'awaitConvergence' method to get rid of most 'Thread.sleep()' calls. Updated all cluster specs. Now works more reliable.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-03-15 21:25:55 +01:00
Jonas Bonér
81b68e2fc0 Added DOWNING (user downing and auto-downing) and LEADER actions.
* Added possibility for user to 'down' a node
* Added possibility for the leader to 'auto-down' a node.
* Added leader role actions
  - Moving nodes from JOINING -> UP
  - Moving nodes from EXITING -> REMOVED
  - AUTO-DOWNING
* Added tests for user and leader downing
* Added 'auto-down' option to turn auto-downing on and off
* Fixed bug in semantic Member Ordering
* Removed FSM stuff from ClusterCommandDaemon (including the test) since the node status should only be in the converged gossip state

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-03-09 12:57:17 +01:00