Skip to content

Instantly share code, notes, and snippets.

View deniszh's full-sized avatar

Denis Zhdanov deniszh

View GitHub Profile
@vasanthk
vasanthk / System Design.md
Last active April 23, 2024 08:08
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@joemiller
joemiller / whisper-shard.py
Last active December 20, 2015 07:19
apply graphite's consistent hash algorithm to a single WHISPER_DIR and divide the .wsp files up into shard/instance specific directories
# Helper script to turn a single monolithic WHISPER_DIR into one that is
# allocated based on the shard id (carbon-cache instance name)
#
# Take a single WHISPER_DIR such as '/opt/graphite/storage/whisper' and
# figure out how to divide them up into shards based on the given list of
# carbon-cache shard instances and replication_factor
#
# The output will be multiple text files that can be used with `rsync --files-from=`
# to copy the right .wsp files to the correct nodes.
#
@Moqume
Moqume / etc_garbd
Created November 24, 2012 23:24
garbd (Galera Arbitrator) init script
GARBD_ADDRESS="gcomm://192.168.1.2"
GARBD_GROUP="my_snazzy_cluster"
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@rcrowley
rcrowley / whisper-clean.py
Created July 20, 2012 23:35
Clean up Whisper files that no longer map to this host.
import os
import os.path
import sys
from graphite.render.hashing import ConsistentHashRing
instances = []
unwelcome_instances = []
for arg in sys.argv[1:]:
unwelcome = False