https://github.com/facebook/mcrouter/wiki/Config-Files#representing-route-handles-in-json
{
"pools": {
"A": {
"servers": [
"192.168.1.11:11211",
# mysql -u root -e "CREATE DATABASE testdb" | |
# mysql -u root testdb -e "CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY, c1 INT, c2 INT, c3 INT)" | |
for i in $(seq 0 999); do | |
{ echo "INSERT INTO t1 (c1, c2, c3) VALUES " | |
for j in $(seq 1 1000); do | |
ii=$(( ($i * 1000) + $j )) | |
iii=$(( $ii + 10000000)) | |
iiii=$(( $ii + 100000000)) | |
echo -n " (${ii}, ${iii}, ${iiii})," |
cd /usr/local/src | |
git clone https://github.com/KLab/miruo | |
cd ./miruo/ | |
apt-get install -y libpcap-dev | |
./configure --prefix=/usr | |
make | |
make install |
curl -L "https://drive.google.com/uc?id=0B6pVMMV5F5dfb1YwcThnaVZXbjg" -o nutcracker-0.4.1.tar.gz | |
tar zxf nutcracker-0.4.1.tar.gz | |
cd nutcracker-0.4.1 | |
./configure --prefix=/usr | |
make | |
make install | |
mkdir /etc/nutcracker | |
cp conf/nutcracker.yml /etc/nutcracker | |
cat << 'EOC' > /lib/systemd/system/nutcracker.service |
mkdir -p /usr/local/src/nginx/modules /usr/local/openresty/{cache,luajit,sbin,bin,tmp} | |
brew install pcre openssl | |
cd /usr/local/src/nginx/modules | |
git clone https://github.com/cubicdaiya/ngx_dynamic_upstream | |
nginx-build -d /usr/local/src/nginx -openresty -c nginx.configure --verbose | |
cd /usr/local/src/nginx/openresty/1.11.2.1/openresty-1.11.2.1/ | |
make install |
https://github.com/facebook/mcrouter/wiki/Config-Files#representing-route-handles-in-json
{
"pools": {
"A": {
"servers": [
"192.168.1.11:11211",
for item in $(echo "stats items" | nc localhost 11211 | grep number | tr ':' ' ' | awk '{print $3"_"$5}'); do echo "stats cachedump $(echo $item | awk -F '_' '{print $1, $2}')"; done |
#!/bin/bash | |
TOKEN="your api token" | |
# channel=@SLACK_USERNAME で DM を送れる | |
SLACK_USERNAME="@SLACK_USERNAME" | |
MSG="${1}" | |
curl -XPOST "https://slack.com/api/chat.postMessage?token=${TOKEN}&channel=${SLACK_USERNAME}&text=${MSG}&username=notify" |
apt-get update | |
apt-get upgrade -y g++ | |
apt-get upgrade -y autoconf | |
apt-get upgrade -y pkg-config | |
git clone https://github.com/facebook/mcrouter /usr/local/src/mcrouter | |
cd /usr/local/src/mcrouter/mcrouter | |
bash scripts/install_ubuntu_16.04.sh /opt/mcrouter |
apt-get install -y build-essential libncurses5-dev libssl-dev git libpam0g-dev curl | |
# install Erlang 17.5 | |
cd /usr/local/src | |
curl -L http://erlang.org/download/otp_src_17.5.tar.gz -O | |
tar zxf otp_src_17.5.tar.gz | |
cd otp_src_17.5 | |
./configure --prefix=/opt/erlang/17.5 --enable-smp-support --enable-threads --enable-m64-build --enable-kernel-poll --enable-hipe --without-javac --enable-dirty-schedulers --enable-sha | |
ring-preserving | |
make install |
resource "aws_launch_configuration" "test" { | |
name = "test" | |
image_id = "${var.ami}" | |
instance_type = "t2.micro" | |
associate_public_ip_address = true | |
security_groups = ["${aws_security_group.internal.id}"] | |
} | |
resource "aws_autoscaling_group" "test" { | |
name = "test" |