Skip to content

Instantly share code, notes, and snippets.


Denis Zhdanov deniszh

View GitHub Profile
vasanthk / System
Last active Mar 7, 2021
System Design Cheatsheet
View System

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 /
Last active Dec 20, 2015
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.
Myatu / etc_garbd
Created Nov 24, 2012
garbd (Galera Arbitrator) init script
View etc_garbd
nikcub /
Created Oct 4, 2012
Facebook PHP Source Code from August 2007
rcrowley /
Created Jul 20, 2012
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