Skip to main content

Crazy DevOps Interview Questions (3)

Note: This is the third article of the series. The others are: part 1, part 2 and part 4.

Question 1

The interviewer hands you this ls -la listing:

ls -la

total 108
dr-xr-x---. 7 root root 4096 Sep 5 07:16 .
dr-xr-xr-x. 22 root root 4096 Sep 1 17:43 ..
-rw-------. 1 root root 15432 Sep 5 06:36 .bash_history
-rw-r--r--. 1 root root 18 May 20 2009 .bash_logout
-rw-r--r--. 1 root root 176 May 20 2009 .bash_profile
-rw-r--r--. 1 root root 176 Sep 23 2004 .bashrc
-rw-r--r-- 1 root root 0 Sep 5 07:16 -f
...

They tell you the -f file has to go. Can you delete it?

Read full post gblog_arrow_right

Book Review: How Google does SRE

I’d like to share a book I’ve been working through for a while now. It’s a very dense read, packed with good practices and interesting details on how a team of exceptionally well-prepared people keeps planet-scale systems up and running.

Site Reliability Engineering: How Google Runs Production Systems (SRE)

Key lessons from this book

  • SRE engineers should be software engineers at heart. Infrastructure is now expressed as code, so the role demands strong engineering skills. Operational work should stay below 50% of an SRE’s time, because they have a dual mission: keeping today’s systems running while building tomorrow’s.

  • Going on call is the “rite of passage” for an SRE. It follows naturally from the thorough preparation during the first months on the job. There is also a sweet spot for how often an engineer gets paged each week: too few incidents and they start to lose touch with production, too many and they may begin ignoring alerts or burn out.

  • The environment is designed to bring out the best in people and deliver the best results for the company. Google looks for specific qualities in prospective SREs, which is a world of its own, but the core values that come through in the book are collaboration, mutual support, continuous improvement, and blameless post-incident analysis.

Read full post gblog_arrow_right

Publishing to Atlassian Confluence (with Python)

Introduction

This article shows how to automate the interaction with Atlassian Confluence, a commercial product widely used in companies to publish documentation and other content for a team, a department or the whole organization. It is usually integrated with other Atlassian tools such as Bamboo and JIRA.

By “automating the interaction” I mean automated document publishing: you extract data from other systems with automated tools, then publish it in a readable format. This is possible through the REST interface that Atlassian provides for its products. REST does not cover every feature, but it is enough for this scenario. The reference for Confluence Cloud is here. The interface can differ between versions, so check the API reference for your own Confluence version.

Read full post gblog_arrow_right

Amazon EBS (Storage) Performance Limitation

I have mentioned before that standard EBS storage in AWS runs on a credit system. Credits build up while a volume sits idle and are spent whenever the requested I/O rate rises above a predefined baseline. The details are covered in the AWS documentation. This limitation caught me off guard during the failed project I had worked on 18 months ago.

A few days ago I got the same problem while syncing data between 2 volumes, so I decided to capture what happened and share it here for anyone following this blog.

Read full post gblog_arrow_right

MySQL Monitoring with Amazon CloudWatch

Amazon CloudWatch is the monitoring service for the Amazon Cloud. It supports both white box and black box monitoring of AWS-managed services, and it can also ingest custom monitoring data that you generate yourself.

This guide shows how to integrate a simple MySQL monitoring script with CloudWatch.

MySQL Monitoring

Suppose you want to track the number of active connections to your MySQL server and get a signal when that number approaches the limit set by max_connections in the configuration file. For portability, it’s also worth reporting the limit itself to the monitoring system, even though it rarely changes without someone editing the configuration.

Read full post gblog_arrow_right

On SLAs and Uptime Guarantees

In this article, I look at the practical side of the “multiple nines” reliability figures that vendors love to advertise, and explain why a true 100% uptime is not something you can achieve.

Definitions

SLA (Service Level Agreement) is a binding contract between a vendor and a customer. It is typically expressed as the percentage of a reference period (for example, a year) during which the service must work normally and deliver its intended output.

Read full post gblog_arrow_right

Instance Performance Monitoring in AWS

AWS CloudWatch is Amazon’s built-in monitoring service. It collects metrics (including custom ones you define) and can trigger alarms when a metric crosses a threshold. It is the main tool for performance monitoring inside AWS.

This guide covers a typical scenario: you’ve deployed an application to the cloud and need to work out whether performance problems come from the application code or from limits that Amazon enforces.

Scenario

You’ve just started with AWS and are running applications on the free tier or on general-purpose T2 instances. These instances use a CPU credit system: credits let the instance burst through short load spikes, but once they run out, performance drops back to a low, fixed baseline. The details of the credit mechanics may seem obscure, but you still need to know whether your application can meet its service targets with this setup.

Read full post gblog_arrow_right

Cloud Distribution with AWS

When Do You Need Cloud Distribution?

Think of cloud distribution as a form of caching. You need it once your website passes a certain threshold of users and outgoing data volume. The exact figure depends entirely on your setup:

  • You may serve large files, and sending them from your own server can use up your available bandwidth.
  • You may have many users and want to ease the load on your server by pushing part of it elsewhere.

This article shows how to do this with AWS CloudFront.

Read full post gblog_arrow_right

Amazon Certified Solutions Architect (Associate)

As of today, I’m officially an AWS Certified Solutions Architect – Associate. Certification numbers are issued sequentially, so I can infer that I’m the 16,891st person worldwide to earn this title. Since certifications must be renewed every two years, though, many of those who certified earlier might have probably let theirs lapse.

Starting on the Path

I have opened a personal AWS account in the second half of 2014, around the time I was assigned to the project I wrote about in my previous post. I have barely used it, and still only use it for cloud backups. Without a professional reason to dig in, this path won’t take anyone very far.

Read full post gblog_arrow_right

A Lesson on Failure: “Going Cloud”

About a year ago, when I knew very little about Cloud Computing or Amazon Web Services, I was assigned, along with a few colleagues from the consulting company I worked for, to take an existing codebase from “alpha” to “production” and make sure it deployed smoothly to the Amazon cloud.

The customer wanted to go live in under three months and expected to handle tens of thousands of visitors clicking on banner ads and generating revenue. More likely, they were hoping for a good exit: handing the hot potato to someone else while walking away with a tidy profit. There is a term for these people, but this isn’t a meme post, so I’ll leave it there.

Read full post gblog_arrow_right