Skip to content

Instantly share code, notes, and snippets.

Avatar

Denis Zhdanov deniszh

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

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 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
View whisper-shard.py
# 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
Myatu / etc_garbd
Created Nov 24, 2012
garbd (Galera Arbitrator) init script
View etc_garbd
GARBD_ADDRESS="gcomm://192.168.1.2"
GARBD_GROUP="my_snazzy_cluster"
@nikcub
nikcub / README.md
Created Oct 4, 2012
Facebook PHP Source Code from August 2007
View README.md
@rcrowley
rcrowley / whisper-clean.py
Created Jul 20, 2012
Clean up Whisper files that no longer map to this host.
View whisper-clean.py
import os
import os.path
import sys
from graphite.render.hashing import ConsistentHashRing
instances = []
unwelcome_instances = []
for arg in sys.argv[1:]:
unwelcome = False