Skip to content

Instantly share code, notes, and snippets.

View gmr's full-sized avatar
:octocat:
🐘 🐇 🐍

Gavin M. Roy gmr

:octocat:
🐘 🐇 🐍
View GitHub Profile
@pmint93
pmint93 / rabbitmq-autocluster_k8s_persistent.bash
Last active March 23, 2019 03:14
Deploy rabbitmq-autocluster on k8s with persistent storage
#!/bin/bash
set -eo pipefail
export KUBE_NAMESPACE=test
export REPLICA_COUNT=3
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1beta1
kind: StatefulSet
@cwill747
cwill747 / Dockerfile
Last active April 20, 2022 12:47
Python2.6 on Alpine Docker
FROM gliderlabs/alpine:3.4
# ensure local python is preferred over distribution python
ENV PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
# install ca-certificates so that HTTPS works consistently
@rbranson
rbranson / gist:038afa9ad7af3693efd0
Last active September 29, 2016 17:44
Disaggregated Proxy & Storage Nodes

The point of this is to use cheap machines with small/slow storage to coordinate client requests while dedicating the machines with the big and fast storage to doing what they do best. I found that request coordination was contributing to about half the CPU usage on our Cassandra nodes, on average. Solid state storage is quite expensive, nearly doubling the cost of typical hardware. It also means that if people have control over hardware placement within the network, they can place proxy nodes closer to the client without impacting their storage footprint or fault tolerance characteristics.

This is accomplished in Cassandra by passing the -Dcassandra.join_ring=false option when the process is started. These nodes will connect to the seeds, cache the gossip data, load the schema, and begin listening for client requests. Messages like "/x.x.x.x is now UP!" will appear on the other nodes.

There are also some more practical benefits to this. Handling client requests caused us to push the NewSize of the heap up

@joshmarshall
joshmarshall / tornado_cassandra.py
Last active August 3, 2018 07:34
Tornado wrapper for Cassandra driver futures
from cassandra.cluster import Cluster, OperationTimedOut
from cassandra.decoder import SyntaxException
from tornado.concurrent import Future
from tornado.testing import AsyncTestCase, gen_test
class TornadoCassandra(object):
def __init__(self, session, ioloop):