haproxy-cluster 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -0
- data/lib/haproxy_cluster/backend.rb +2 -2
- data/lib/haproxy_cluster/version.rb +1 -1
- metadata +24 -9
data/README.md
CHANGED
@@ -43,6 +43,7 @@ Perhaps there's a particular server which needs to be removed from the cluster q
|
|
43
43
|
haproxy_cluster --eval 'each_member{ myapp.servers.find("server3").disable! }' $load_balancers
|
44
44
|
```
|
45
45
|
|
46
|
+
Read the full [documentation](http://rubydoc.info/gems/haproxy-cluster/frames).
|
46
47
|
|
47
48
|
Installation
|
48
49
|
------------
|
@@ -20,14 +20,14 @@ class HAProxyCluster
|
|
20
20
|
|
21
21
|
def rolling_restartable? (enough = 80)
|
22
22
|
up_servers = @servers.select{ |name,server| server.ok? }
|
23
|
-
if up_servers == 0
|
23
|
+
if up_servers.count == 0
|
24
24
|
@member.log.warn { "All servers are down; can't hurt!" }
|
25
25
|
return true
|
26
26
|
elsif Rational(up_servers.count,@servers.count) >= Rational(enough,100)
|
27
27
|
@member.log.info { "#{up_servers.count}/#{@servers.count} is at least #{enough}%, so #{name} is rolling restartable." }
|
28
28
|
return true
|
29
29
|
else
|
30
|
-
@member.log.warn { "Insufficient capacity to handle a rolling restart at this time." }
|
30
|
+
@member.log.warn { "Insufficient capacity to handle a rolling restart at this time. (#{up_servers.count}/#{@servers.count})" }
|
31
31
|
return false
|
32
32
|
end
|
33
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haproxy-cluster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: test-unit
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
@@ -32,10 +37,15 @@ dependencies:
|
|
32
37
|
version: '0'
|
33
38
|
type: :development
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: webmock
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ! '>='
|
@@ -43,7 +53,12 @@ dependencies:
|
|
43
53
|
version: '0'
|
44
54
|
type: :development
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
47
62
|
description: ! " Gem and command line tool for quickly answering questions like,
|
48
63
|
\"Can we\n survive a rolling restart?\", \"How many transactions per second am
|
49
64
|
I seeing?\",\n \"What's my session backlog?\". Intended for use within continuous
|
@@ -84,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
99
|
version: '0'
|
85
100
|
requirements: []
|
86
101
|
rubyforge_project:
|
87
|
-
rubygems_version: 1.8.
|
102
|
+
rubygems_version: 1.8.23
|
88
103
|
signing_key:
|
89
104
|
specification_version: 3
|
90
105
|
summary: A DSL for inspecting and manipulating groups of HA Proxy instances.
|