Scaling lessons learned at Dropbox (2012)
eranki.tumblr.com
eranki.tumblr.com
Changes:
- When I joined in 2015, it was already forbidden to just log text on the server. Only a small number of SREs even had access to the text logs. Any event that you cared about needed to be logged from the system described in "App-specific metrics", which was pretty easy to use. (That said, on desktop we still used logspam because when you're debugging a desktop client doing the wrong thing, sometimes the only lead you have is tracing which lines of code are being run by looking at which logs are being printed.)
- Re: shards, by the time I joined most of the mysql was replaced by a homegrown KV/graph database on top of mysql that had a fixed number of shards (something like 255).
Things that didn't change (at least by the time I left in 2020):
- Everything was in UTC, including in the UIs for everything (e.g. metrics, exceptions, crashes, etc). I ended making a GPS clock that showed UTC to put on my desk as a fun project, and I know at least one SRE who had set basically all their clocks to UTC time (e.g. phone, laptop, calendar, etc). This is in contrast to Google, where almost every system either shows your local time or "Google Standard Time" (which is just Pacific Time).
- Python was still used for virtually everything.
Unfortunately, I don't think I'd describe dbx as a place with simplicity in infrastructure during the time I worked there, but it was good to have a standard set of rules enforced everywhere.
As much as I want to hate this, it's actually genius and elegant in its simplicity.
https://aws.amazon.com/builders-library/reliability-and-cons...
Grep, sed, awk, xargs etc are still the canonical list of shell tools for debugging, and have been for decades.
Makes you realise, learning Unix tools will likely be a better long term time investment than the latest trendy framework. I wish I could go back in time and tell that to my younger self...
When I am forced to use a Windows environment I find myself reaching out to these evergreen tools in many situations and is frustrated by having to find workarounds to these tools that should be ubiquitous tools in any OS.
Everything I learned almost 30 years ago still holds true today when it comes to the basics.
And yes I know of Cygwin, MKS toolkit etc, but trying to convince corporate IT in a Microsoft Centric world to install these usually hits a brick wall.
Lots of times it is really nice to have all your "debugging scripts" in a repo anyway. Once you have that it isn't hard to set up a basic Python environment and have your scripts there.
Not every OS needs to be an UNIX clone.
If you want to direct the learning, though, I'd recommend figuring out how to do something with grep, e.g., then do the same with sed, awk, cut, etc.
For example:
grep myuserid /etc/passwd
sed -n '/myuserid/p' /etc/passwd
awk '/myuserid/ { print }
etc.
Then make it more interesting: repeat those with 'grep -I MYUSERID /etc/passwd'.
Then make it even more interesting: print the 4th field from each matching line. (Hint: man cut.) Come up with at least two or three different ways of doing this with regex's, then make those regex's as compact as possible.
Then make it a lot more interesting: print the two lines before and the three lines after each pattern.
Once you do this for a while, you will get used to thinking in terms of filters and regex and things will start to come more naturally for you.
Also consider doing all of those exercises from within vim, use :g... commands (or any other alternative you can think of).
I used this a great deal, when I first started out on serious UNIX tasks (1996+)
YES! Such a pain in the arse for a tiny theoretical unimportant security benefit. In some situations it is warranted, e.g. dating sites. For something like Amazon or Wikipedia who cares if you know that I've registered there?
Where are the stories about services that have scaled with the latest fad? Maybe they will be posted in a few years - or maybe those teams are too busy to blog ;)
Early attempts at what later became Chaos Monkey / Simian Army.