Accessing a specific server in an HTTP cluster

The Problem

Part1 - Fault tolerence

A common configuration of web servers is setting up multiple servers to serve the same content, with a load-balancing method redirecting / forwarding clients to a specific server.
For instance, let's say I'm using servers server and otherserver to serve the site cluster-name.
The ...

more ...

Linux and SSDs - Should You TRIM?

Note: Although my experience is with Debian, I think this post helps anyone using some modern Linux distribution.

What is TRIM?

As a Windows sysadmin, I didn't really consider the cons of running on top of Solid-State Drives, or SSDs. These drives are based on flash memory (similar to a Disk-On-Key), rather than metallic plates.
A big difference between magnetic hard drives and SSDs is block reuse. more ...


My Pinning Guidelines

In my previous post about pinning I talked about the reasons to configure apt pinning.
This post details my logic about what and how to pin.

Pinning technicalities

How pinning is done

The best way to pin stuff is to add files in /etc/apt/preferences.d/
Those files are ...

more ...

Why Pinning

There are plenty of guides about apt pinning, but no one really explains the motivation to do so. It took me some time to understand that, so I thought I'd write it down.

The Issue

The mainstream method of downloading and installing packages from a repository is via APT ...

more ...

Adding Repositories for Inspection

Sometime I want to inspect software repositories. However, I don't want my machine to actually install anything from it.
To do so, I made a small bash function that both adds the repository and pins it to priority -1, telling apt to never install anything from it (unless manually ...

more ...

Setting up Gargoyle as a Time Server

The Story
For reasons unknown to me, Debian's NTP daemon only works on udp port 123, even when operating as a client.
This is a problem because my network configuration does not allow incoming packets on this port, thus preventing my raspberrySeed (raspberry pi running Debian, deluge, flexget) from ...

more ...

Timing Execution By Output Lines

The Story

Today I got annoyed that some puppet agent runs took me over 90 seconds to complete, even though they actually did nothing (no change was needed).
I wanted to see which part of the run took the longest, so I tried this:

sudo puppet agent --test --debug

Unfortunately ...

more ...

Hijacking a process's i/o streams using gdb

The Story

I recently had a very annoying problem - some daemon failed, but ran fine when told to run at foreground (not daemonize). Running at foreground is the easiest way to debug processes, because that way you get their input / output / error streams in your terminal.
Said daemon had no ...

more ...