r/sysadmin • • Mar 21 '12

We are sysadmins @ reddit. Ask us anything!

Greetings fellow sysadmins,

We've had a few requests from the community to do a tech-focused AMA in /r/sysadmin, so here we are. The current sysadmin team consists of myself and rram. Ask us anything you'd like, but please try to keep it sysadmin-focused!

Here's a bit of background on us:

alienth

I've been a sysadmin for about 8 yrs. My career started on the helpdesk at an ISP where I worked my way into my first admin gig. Since then I've worked at a medium-sized SaaS provider, Rackspace, and now reddit. My focus has always been around Linux (and a tiny bit of Solaris).

rram

I'm Ricky. My first computer was an Amiga at the ripe young age of two. Since then, I was the sysadmin at The Tech and on the Cloud Sites Team at the Rackspace Cloud with alienth. I have experience with Debian, Ubuntu, Red Hat, and OS X Servers.

EDIT [1302 PDT]: Hey folks, we're going to get back to working for a bit. We'll definitely be hopping in here later today to answer more questions, and we'll continue to do so when we can throughout the week. So please feel free to ask if your question hasn't already been answered. Thanks for the great questions! -- alienth

825 Upvotes

622 comments sorted by

113

u/CaptainLoud Mar 21 '12

Can we get a $ history | tail -n 20 from whatever production server you are logged on right now?

86

u/alienth Mar 21 '12

Heh, pretty easy to guess what is going on here :P

 1471  [2012-03-14 - 14:23:35] find
 1472  [2012-03-16 - 16:21:59] cd /etc/lighttpd/
 1473  [2012-03-16 - 16:22:00] df -h
 1474  [2012-03-16 - 16:22:04] cd /etc/logrotate.d/
 1475  [2012-03-16 - 16:22:07] vi nginx 
 1476  [2012-03-16 - 16:22:14] ls /var/log/nginx/
 1477  [2012-03-16 - 16:22:17] cd /var/log/nginx/
 1478  [2012-03-16 - 16:22:20] rm *gz
 1479  [2012-03-16 - 16:22:24] df -h
 1480  [2012-03-16 - 16:22:26] du -sch *
 1481  [2012-03-19 - 09:44:48] vi /etc/haproxy/haproxy.cfg 
 1482  [2012-03-19 - 09:45:05] psgrep ngin
 1483  [2012-03-19 - 09:45:08] psgrep hapr
 1484  [2012-03-19 - 23:22:36] df -h
 1485  [2012-03-19 - 23:22:41] du -sch *
 1486  [2012-03-19 - 23:22:46] rm access.log.*
 1487  [2012-03-19 - 23:33:46] df -h
 1488  [2012-03-19 - 23:33:50] man logrotate.conf
 1489  [2012-03-19 - 23:33:53] man logrotate
 1490  [2012-03-19 - 23:34:24] vi /etc/logrotate.d/nginx 
→ More replies (38)

52

u/Doormatty Mar 21 '12

Starting from scratch, what would you do differently if you had the chance?

→ More replies (15)

41

u/30thCenturyMan Mar 21 '12

What kind of security concerns do you factor in? Have you ever hired an outside auditor to break into your apps?

→ More replies (4)

34

u/stahnma Mar 21 '12

What components in your infrastructure are synchronous vs async? Are you doing much with message bus technology behind the scenes?

→ More replies (7)

32

u/mpete510 Mar 21 '12

What automation tools do you use to make sysadmining simpler?

→ More replies (5)

26

u/[deleted] Mar 21 '12 edited Mar 21 '12
  • Are your memcache servers running only memcache, or do they also run other services (http etc.)?

  • What do you use to handle logging? (Syslog, custom logging class in application code etc..)

  • How do you consolidate logs? (nfs, syslog over udp, etc.)

  • What queue'ing program do you use? (something custom, off the shelf?)

  • What implementation (both server and client) of memcache do you use? (memecahed, memcache)?

  • Does reddit use any sort of messaging bus? If so which one?

  • What does your data-warehousing/metrics setup look like? Do you utilize hadoop at all?

→ More replies (4)

50

u/Stevenger Mar 21 '12

What do you think the best advice you would give to people who want to someday be a sysadmin, where should we start?

104

u/alienth Mar 21 '12

Spend a tonne of time working on your own stuff. Setup a web / database server for the hell of it. Break stuff, rebuild it, repeat. Find every interesting thing you can do on your home server and try it; even if you're never going to use it personally.

If anything ever breaks or doesn't make sense, don't drop it until you truly understand what is going on. Avoid adopting any cargo-cult mentality at whatever cost.

If doing this type of stuff sounds like an extreme bore, reconsider your sysadmin aspirations.

→ More replies (24)

22

u/minideezel Mar 21 '12

When we get the "High Load" page, what/how is it deciding to give us that message?

→ More replies (6)

43

u/Michichael Mar 21 '12
  • What are the last five processes you've found yourself automating?

  • What was the biggest challenge each of you faced when you picked up the reins?

  • Categorize your current issues - how many times do you find yourself fighting fires vs spending time on meaningful projects?

  • Any big projects in the pipeline?

  • What kind of monitoring software/metrics do you use to gauge performance?

  • Do you find yourselves handling network, software, hardware, or other issues more often than other categories?

  • What kind of planning goes into projects?

  • Has being owned by a big corporation impacted how you handle your budget and asset management?

49

u/alienth Mar 21 '12

What are the last five processes you've found yourself automating?

Most of my time has been spent on re-factoring a lot of the previously automated stuff. Lately I've been focused on the backup and server provisioning area. Nothing that I can easily lay out into 5 distinct things.

What was the biggest challenge each of you faced when you picked up the reins?

No one was really dedicated to sysadmin stuff before I came on. The reddit admins before me did sysadmin stuff when they had spare time, which wasn't often due to the number of people we had.

Biggest challenge was basically starting from scratch on a lot of stuff. You name a system, and it needed cleanup or refactoring. I'd say the database infrastructure was in the absolute worse repair, at the time.

Categorize your current issues - how many times do you find yourself fighting fires vs spending time on meaningful projects?

When I arrived last year, it was probably 90% fire-fighting, and 10% actually improving things. Things are a lot better now days, so I'd say we're probably closer towards 60% "near-term" issues and 40% "longer-term" issues.

Any big projects in the pipeline?

Getting the site to run in more than one region. This is a huge project that is going to require a lot of work throughout the entire stack.

Do you find yourselves handling network, software, hardware, or other issues more often than other categories?

Network and hardware are abstracted out heavily due to EC2. Almost all of our time is dedicated to the application stack, and figuring out how to continually scale it.

What kind of planning goes into projects?

We're still a very small company; fewer than 10 technical people entirely. We don't have a lot of formal project structure at this time. It is mostly "Hey, I'm going to be working on X for a week or two".

Has being owned by a big corporation impacted how you handle your budget and asset management?

This has changed since I joined. We had some ominous pressure to keep everything very lean when I joined. That said, at the time, the infrastructure couldn't have benefited from growing much.

That pressure is pretty much entirely gone now days. We buy what we need.

→ More replies (5)

21

u/synth3tic Mar 21 '12

What's the biggest challenge in running a site that sees so much traffic?

→ More replies (3)

20

u/CaptainTitus Mar 21 '12

Ever get a work-free vacation?

→ More replies (18)

20

u/Stereo Mar 21 '12

Reddit has been far more stable lately; it used to be notoriously crashy. What did you do to fix it?

→ More replies (1)

20

u/carlaas Mar 21 '12

What are the most common attacks that you have to deal with? Was any of them successful? If so, how was it and how it was solved?

→ More replies (1)

16

u/dboak Mar 21 '12

What is the single best thing you've done to get away from "sleeping next your laptop to reboot the site when it goes down"

2. What is the coolest technology you currently get to use?

3. How many of you are there?, what does the on-call schedule look like?

4. Do you also get into the reddit code, or are you stricly infrastructure sysadmins?

5. What is the expected salary range for someone looking for a job?

6. Be honest, how much work did you get done when you took reddit offline during the SOPA protest? I'd love to have a planned downtime window like that. :)

→ More replies (3)

14

u/[deleted] Mar 21 '12
  • Is amazon forthcoming with you when they have capacity/network problems? Or do they just tell you every hour it should be fixed within the next hour?

→ More replies (2)

14

u/angrymonkeyz Mar 21 '12

What tools do you use to simulate loads?

→ More replies (9)

12

u/minideezel Mar 21 '12

How much work and how many servers are dedicated to internal office services that don't involve the site?

→ More replies (1)

12

u/horseloverfat Mar 21 '12

How different is it administrating a cloud environment than your own hardware?

→ More replies (1)

12

u/dasmim Mar 21 '12
  1. What is your deployment process like?

  2. What sort of tools do you use (or have made) to automate deployments?

  3. How often do you deploy?

  4. Who does/can do deployments (you guys, devs?)

  5. Are there any statistics you monitor aside from obvious ones (response time, server health, etc.) that give insights into potential problems (logins per minute, posts per minute, etc.)?

  6. Do you have any sort of autoscaling in place to provision/turn off servers ?

  7. What types of data do you store in PostgreSQL vs Cassandra?

→ More replies (4)

22

u/carlaas Mar 21 '12 edited Mar 21 '12

What was the most difficult problem that took reddit down?

What was the silliest one?

→ More replies (4)

11

u/thesaintjim Mar 21 '12 edited Mar 21 '12

Hi,

Can you please tell me what your average day at Reddit is like?

Love,

Your former co-worker.

→ More replies (3)