<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.9.2" -->
<rss version="0.92">
<channel>
	<title>Development, Analysis And Research</title>
	<link>http://www.ajohnstone.com</link>
	<description>by Andrew Johnstone</description>
	<lastBuildDate>Sat, 17 Jul 2010 11:53:24 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>Setting up an FTP Server with ProFTPD on EC2</title>
		<description><![CDATA[It&#8217;s very rare that I setup FTP servers on our production environments and always forget parts of the configuration, so figured I would list it here.
Active and Passive FTP
There are two types of modes active and passive FTP, using normal or passive FTP, a client initiates a session by sending a request to communicate through [...]]]></description>
		<link>http://www.ajohnstone.com/archives/setting-up-an-ftp-server-with-proftpd-on-ec2/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=setting-up-an-ftp-server-with-proftpd-on-ec2</link>
			</item>
	<item>
		<title>MySQL with skip-networking, binding a socket to TCP</title>
		<description><![CDATA[Recently I started migrating an old server, which had skip-networking within my.cnf, which is not a dynamic option and requires you to restart the mysql server.
I typically rsync the source code and static data to a new machine. Configure the webserver with the relevant vhosts and change the database connection details to point to the [...]]]></description>
		<link>http://www.ajohnstone.com/archives/mysql-with-skip-networking/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=mysql-with-skip-networking</link>
			</item>
	<item>
		<title>Emailing Attachments: Exim Filters and PHP streams</title>
		<description><![CDATA[A while back a colleague and myself had a two week sprint to ensure that we could deliver 20k emails with up to 5mb attachments each. We experimented with 4k emails at 5mb each sending straight through the MTA, which we found to cause excessive load on the servers.
Using exim filters we could add attachments [...]]]></description>
		<link>http://www.ajohnstone.com/archives/emailing-attachments-exim-filters-and-php-streams/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=emailing-attachments-exim-filters-and-php-streams</link>
			</item>
	<item>
		<title>Broken XFS on Elastic Block Storage (EBS) and SSH failing on &#8220;Write failed: Broken pipe&#8221;</title>
		<description><![CDATA[After attaching an EBS volume and rsyncing files to the EBS device the server had a load average of 6 before the server became unresponsive to ssh connections and complained of a broken pipe for ssh.
The server was still responding to http requests and ping, however trying to establish a ssh connection, it connected and [...]]]></description>
		<link>http://www.ajohnstone.com/archives/broken-xfs-on-elastic-block-storage-ebs-and-ssh-failing-on-write-failed-broken-pipe/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=broken-xfs-on-elastic-block-storage-ebs-and-ssh-failing-on-write-failed-broken-pipe</link>
			</item>
	<item>
		<title>MySQL: LAST_INSERT_ID()</title>
		<description><![CDATA[If you use LAST_INSERT_ID() and insert on the primary key value it will only return the last &#8220;insert id&#8221; which has not included the primary key

DROP TABLE IF EXISTS `example`;
CREATE TABLE IF NOT EXISTS `example` ( id INT(11) NOT NULL AUTO_INCREMENT, b CHAR(3), PRIMARY KEY(id)) ENGINE=InnoDB;
INSERT INTO example SET id=1;
INSERT INTO example SET id=2;
INSERT INTO [...]]]></description>
		<link>http://www.ajohnstone.com/archives/mysql-last_insert_id/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=mysql-last_insert_id</link>
			</item>
	<item>
		<title>MySQL 5.0.51a-24+lenny2: Broken updates</title>
		<description><![CDATA[I have seen a problem with MySQL failing to update tables several times and despite having a valid UPDATE statement and data that should be modified after an update, there were no modifications made (not having any triggers enabled). As a quick example:


mysql> SELECT price_ask, price_bid, price_mid FROM instruments WHERE symbol = 'A.N'\G
*************************** 1. row [...]]]></description>
		<link>http://www.ajohnstone.com/archives/mysql-5-0-51a-24lenny2-broken-updates/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=mysql-5-0-51a-24lenny2-broken-updates</link>
			</item>
	<item>
		<title>Monitoring Processes with PS</title>
		<description><![CDATA[I wrote a few munin plugins to monitor memory, CPU and IO usage per process. After collecting the stats for a few days I noticed that MySQL CPU usage had a constant value of 9.1, however all other processes collected CPU usage correctly..
CPU usage

proc=mysqld
value=$(ps u -C $proc &#124; awk 'BEGIN { sum = 0 } [...]]]></description>
		<link>http://www.ajohnstone.com/archives/monitoring-processes-with-ps/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=monitoring-processes-with-ps</link>
			</item>
	<item>
		<title>Running several VIPs on the same interface with ucarp and haproxy</title>
		<description><![CDATA[We have re-written parts of the default configuration for ucarp &#038; haproxy to run several VIPs on the same interface. This works on debian, however some minor modifications maybe needed for other distributions. 
Ucarp implementation
/etc/network/if-up.d/ucarp

#!/bin/sh

UCARP=/usr/sbin/ucarp
EXTRA_PARAMS=""

if [ ! -x $UCARP ]; then
	exit 0
fi

if [ -z "$IF_UCARP_UPSCRIPT" ]; then
	IF_UCARP_UPSCRIPT=/usr/share/ucarp/vip-up
fi

if [ -z "$IF_UCARP_DOWNSCRIPT" ]; then
	IF_UCARP_DOWNSCRIPT=/usr/share/ucarp/vip-down
fi

if [ -n "$IF_UCARP_MASTER" [...]]]></description>
		<link>http://www.ajohnstone.com/archives/running-several-vips-on-the-same-interface-with-ucarp-and-haproxy/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=running-several-vips-on-the-same-interface-with-ucarp-and-haproxy</link>
			</item>
	<item>
		<title>EC2: New instances and firewalls</title>
		<description><![CDATA[We hold much of our server configuration within the office, which is restricted down by iptables. As such when spawning new instances on EC2 we need to allow access to our internal network via iptables, to allow nodes to connect to the office and configure themselves.
The following script can be run within a crontab to [...]]]></description>
		<link>http://www.ajohnstone.com/archives/ec2-new-instances-and-firewalls/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=ec2-new-instances-and-firewalls</link>
			</item>
	<item>
		<title>High Availability Across Multiple Data Centers, Multihoming and EC2</title>
		<description><![CDATA[I previously described how to configure HA Proxy and ucarp to load balance traffic between servers and share common IP addresses in the event of failure, however this still leaves holes in the availability of the application. The scenario only accounts for availability within a single data center and does not address how traffic and [...]]]></description>
		<link>http://www.ajohnstone.com/archives/high-availability-across-multiple-data-centers-multihoming-and-ec2/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=high-availability-across-multiple-data-centers-multihoming-and-ec2</link>
			</item>
</channel>
</rss>
