Skip to content

Instantly share code, notes, and snippets.

🥑
🤔

Rhommel Lamas rhoml

🥑
🤔
Block or report user

Report or block rhoml

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rhoml
rhoml / 20130416-todo.md
Created Apr 28, 2017 — forked from mrflip/20130416-todo.md
Elasticsearch Tuning Plan
View 20130416-todo.md

Next Steps

  • Measure time spend on index, flush, refresh, merge, query, etc. (TD - done)
  • Take hot threads snapshots under read+write, read-only, write-only (TD - done)
  • Adjust refresh time to 10s (from 1s) and see how load changes (TD)
  • Measure time of a rolling restart doing disable_flush and disable_recovery (TD)
  • Specify routing on query -- make it choose same node for each shard each time (MD)
  • GC new generation size (TD)
  • Warmers
    • measure before/after of client query time with and without warmers (MD)
@rhoml
rhoml / mesos.conf
Created Sep 6, 2016 — forked from gtrummell/mesos.conf
Logstash configuration for Mesos
View mesos.conf
# Logstash Configuration for Mesos Masters and Slaves
input {
file {
path => "/var/log/mesos/mesos-master.[EIFW]*"
tags => [
"master"
]
}
file {
@rhoml
rhoml / ec2tags.rb
Created Apr 5, 2016 — forked from rafaelfelix/ec2tags.rb
Hack to get ec2 tags to facter. Depends on aws-cli (https://github.com/aws/aws-cli), jq (http://stedolan.github.io/jq/) and the JSON RubyGem (http://rubygems.org/gems/json)
View ec2tags.rb
require 'facter'
require 'json'
if Facter.value("ec2_instance_id") != nil
instance_id = Facter.value("ec2_instance_id")
region = Facter.value("ec2_placement_availability_zone")[0..-2]
tags = Facter::Util::Resolution.exec("aws ec2 describe-tags --filters \"name=resource-id,values=#{instance_id}\" --region #{region} | jq '[.Tags[] | {key: .Key, value: .Value}]'")
parsed_tags = JSON.parse(tags)
parsed_tags.each do |tag|
View keybase.md

Keybase proof

I hereby claim:

  • I am rhoml on github.
  • I am rhoml (https://keybase.io/rhoml) on keybase.
  • I have a public key whose fingerprint is 4289 50B6 1986 2303 5CE5 65EF 4D86 1C8B B81D C778

To claim this, I am signing this object:

View clients.md

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

@rhoml
rhoml / reconfigure.sh
Last active Aug 29, 2015
Reconfigure script for Sentinel and Twemproxy
View reconfigure.sh
#!/bin/bash
# Simple reconfigure script to modify multiple nutcracker(twemproxy) servers in case of Redis
# Failover.
export PATH=/sbin:/usr/local/bin:$PATH
NAME=sentinel
LOGFILE=/opt/sentinel/logs/reconfigure.log
ERRORLOGFILE=/opt/sentinel/logs/reconfigure.error.log
NUTCRACKER_CONF=/opt/nutcracker/etc/nutcracker.yml
@rhoml
rhoml / sentinel-reconfigure.sh
Created Jun 5, 2014
SENTINEL CLIENTS RECONFIGURATION SCRIPT to update twemproxy nutcracker.yml when running 2 twemproxy nodes on the same instance.
View sentinel-reconfigure.sh
#!/bin/bash
export PATH=/sbin:/usr/local/bin:$PATH
NAME=sentinel
LOGFILE=/opt/sentinel/logs/reconfigure.log
ERRORLOGFILE=/opt/sentinel/logs/reconfigure.error.log
NUTCRACKER_CONF=/opt/nutcracker/etc/nutcracker.yml
NUTCRACKERFAILOVER_CONF=/opt/nutcracker/etc/nutcrackerfailover.yml
NUTCRACKER_PORTs='22121,22123'
MASTER_NAME=$1
@rhoml
rhoml / 0_reuse_code.js
Created Jun 2, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@rhoml
rhoml / reconfigure.sh
Last active Aug 29, 2015
Reconfigure script for sentinel to update twemproxy when certain redis instance fails.
View reconfigure.sh
#!/bin/bash
# <master-name> <role> <state> <from-ip> <from-port> <to-ip> <to-port>
export PATH=/sbin:/usr/local/bin:$PATH
NUTCRACKER_CONF='/opt/nutcracker/conf/nutcracker.yml'
NUTCRACKER_PORT=22121
MASTER_NAME=$1
ROLE=$2
STATE=$3
FROM_IP=$4
FROM_PORT=$5
View haproxy.conf
#
# This config file is a combination of ideas from:
# http://www.37signals.com/svn/posts/1073-nuts-bolts-haproxy
# http://www.igvita.com/2008/05/13/load-balancing-qos-with-haproxy/
# http://wiki.railsmachine.com/HAProxy
# http://elwoodicious.com/2008/07/15/nginx-haproxy-thin-fastcgi-php5-load-balanced-rails-with-php-support/
# http://upstream-berlin.com/2008/01/09/using-haproxy-with-multiple-backends-aka-content-switching/
# http://wiki.railsmachine.com/HAProxy
# http://gist.github.com/raw/25482/d39fb332edf977602c183194a1cf5e9a0b5264f9
#
You can’t perform that action at this time.