Skip to content

Instantly share code, notes, and snippets.

View hanshasselberg's full-sized avatar

Hans Hasselberg hanshasselberg

View GitHub Profile
The initial observed cluster behavior:
1) Constant churn of nodes between Failed and Alive
2) Message bus saturated (~150 updates/sec)
3) Subset of cluster affected
4) Some nodes that are flapping don't exist! (Node dead, or agent down)
One immediate question is how the cluster remained in an unstable
state. We expect that the cluster should converge and return to
a quiet state after some time. However, there was a bug in the
low level SWIM implementation (memberlist library).
e = Typhoeus::Easy.new
e.auth = {
:username => 'username',
:password => 'password',
:method => Typhoeus::Easy::AUTH_TYPES[:CURLAUTH_NTLM]
}
e.url = "http://example.com/auth_ntlm"
e.method = :get
e.perform
hydra = Typhoeus::Hydra.new
hydra.cache_setter do |request|
@cache.set(request.cache_key, request.response, request.cache_timeout)
end
hydra.cache_getter do |request|
@cache.get(request.cache_key) rescue nil
end
@hanshasselberg
hanshasselberg / hack.sh
Created March 31, 2012 20:42 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#