haproxy-cluster 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +3 -1
- data/lib/haproxy_cluster/version.rb +1 -1
- metadata +7 -40
data/README.md
CHANGED
@@ -3,7 +3,9 @@ haproxy-cluster
|
|
3
3
|
|
4
4
|
> "Can we survive a rolling restart?"
|
5
5
|
>
|
6
|
-
> "How many
|
6
|
+
> "How many transactions per second am I seeing?"
|
7
|
+
>
|
8
|
+
> "What's my session backlog?"
|
7
9
|
|
8
10
|
While there are already a handfull of [HA Proxy](http://haproxy.1wt.edu) abstraction layers on RubyGems, I wanted to be able to answer questions like those above and more, quickly, accurately, and easily. So here's one more for the pile.
|
9
11
|
|
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.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-07-23 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|
16
|
-
requirement: &
|
16
|
+
requirement: &70189121153160 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,44 +21,11 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
-
description: ! "
|
26
|
-
\"
|
27
|
-
|
28
|
-
|
29
|
-
quickly, accurately, and easily. So here's one more for the pile.\n\n`HAProxyCluster::Member`
|
30
|
-
provides an ORM for HA Proxy's status page.\n\n`HAProxyCluster` provides a simple
|
31
|
-
map/reduce-inspired framework on top of `HAProxyCluster::Member`.\n\n`haproxy_cluster`
|
32
|
-
provides a shell scripting interface for `HAProxyCluster`. Exit codes are meaningful
|
33
|
-
and intended to be useful from Nagios.\n\nDo you deploy new code using a sequential
|
34
|
-
restart of application servers? Using this common pattern carelessly can result
|
35
|
-
in too many servers being down at the same time, and cutomers seeing errors. `haproxy_cluster`
|
36
|
-
can prevent this by ensuring that every load balancer agrees that the application
|
37
|
-
is up at each stage in the deployment. In the example below, we will deploy a new
|
38
|
-
WAR to three Tomcat instances which are fronted by two HA Proxy instances. HA Proxy
|
39
|
-
has been configured with `option httpchk /check`, a path which only returns an affirmative
|
40
|
-
status code when the application is ready to serve requests.\n\n```bash\n#!bin/bash\nset
|
41
|
-
-o errexit\nservers=\"server1.example.com server2.example.com server3.example.com\"\nload_balancers=\"https://lb1.example.com:8888
|
42
|
-
http://lb2.example.com:8888\"\n\nfor server in $servers ; do\n haproxy_cluster
|
43
|
-
--timeout=300 --eval \"wait_until(true){ myapp.rolling_restartable? }\" $load_balancers\n
|
44
|
-
\ scp myapp.war $server:/opt/tomcat/webapps\ndone\n```\n\nThe code block passed
|
45
|
-
to `--eval` will not return until every load balancer reports that at least 80%
|
46
|
-
of the backend servers defined for \"myapp\" are ready to serve requests. If this
|
47
|
-
takes more than 5 minutes (300 seconds), the whole deployment is halted.\n\nMaybe
|
48
|
-
you'd like to know how many transactions per second your whole cluster is processing.\n\n
|
49
|
-
\ $ haproxy_cluster --eval 'poll{ puts members.map{|m|m.myapp.rate}.inject(:+)
|
50
|
-
}' $load_balancers\n\nInstallation\n------------\n\n`gem install haproxy-cluster`\n\nRequires
|
51
|
-
Ruby 1.9.2 and depends on RestClient.\n\nNon-Features\n------------\n\n* Doesn't
|
52
|
-
try to modify configuration files. Use [haproxy-tools](https://github.com/subakva/haproxy-tools),
|
53
|
-
[rhaproxy](https://github.com/jjuliano/rhaproxy), [haproxy_join](https://github.com/joewilliams/haproxy_join),
|
54
|
-
or better yet, [Chef](http://www.opscode.com/chef) for that.\n* Doesn't talk to
|
55
|
-
sockets, yet. Use [haproxy-ruby](https://github.com/inkel/haproxy-ruby) for now
|
56
|
-
if you need this. I intend to add support for this using `Net::SSH` and `socat(1)`
|
57
|
-
but for now HTTP is enough for my needs.\n\nProTip\n------\n\nHA Proxy's awesome
|
58
|
-
creator Willy Tarrreau loves [big text files](http://haproxy.1wt.eu/download/1.5/doc/configuration.txt)
|
59
|
-
and [big, flat web pages](http://haproxy.1wt.eu/). If smaller, hyperlinked documents
|
60
|
-
are more your style, you should know about the two alternative documentation sources:\n\n*
|
61
|
-
http://code.google.com/p/haproxy-docs/\n* http://cbonte.github.com/haproxy-dconv/configuration-1.5.html\n\n"
|
24
|
+
version_requirements: *70189121153160
|
25
|
+
description: ! " Ruby Gem and command line tool for quickly answering questions like,
|
26
|
+
\"Can we\n survive a rolling restart?\", \"How many transactions per second am
|
27
|
+
I seeing?\",\n \"What's my session backlog?\". Inteded for use within continuous
|
28
|
+
deployment\n and monitoring solutions.\n"
|
62
29
|
email:
|
63
30
|
- jacob.elder@gmail.com
|
64
31
|
executables:
|