Some time ago I built a setup using Amazon’s S3 and Cloudfront that would allow large file uploads/downloads directly from the an S3 bucket, through a Cloudfront endpoint (which provided both a lower latency and allowed using SSL on a custom domain). I recently came across OVH, and two things caught my attention – low… Continue reading OpenStack PHP and OVH
Category: Systems Admin
Topics dealing with servers – specifically setup and operation, in particular on Amazon’s cloud computing infrastructure.
WebSockets – Varnish, Nginx, and Node.js
Like many others I have been drawn in by the appeal of websockets and their use in (near) real-time communication. As such one of my current projects uses Node.js and websockets (via socket.io). To maximize compatibility, I would, of course, like my Node.js site to run on port 80. My server, however, is not used… Continue reading WebSockets – Varnish, Nginx, and Node.js
DRBD on Amazon’s Linux
Note: this was done more as an experiment than for something I intended to use in production – so consider it to be more a compilation of notes than a full out procedure. DRBD – Distributed Replicated Block Device – is a kernel level storage system that replicates data across a network. It uses TCP… Continue reading DRBD on Amazon’s Linux
Varnish – Nothing but 503s
I use Varnish on my production server without any issues – it works quite well, and I have come to consider it an essential component in my server stack. I have recently been having a bit of trouble with a new project of mine that I currently believe a misconfigured Varnish instance to be responsible… Continue reading Varnish – Nothing but 503s
Root Autologin on CentOS
Do not do this – it is a very, very bad idea!!! Doing this for any reason (other than the fun of it – in a ‘safe’ virtual environment) should carry with it an eternal ban prohibiting the use of a computer. Alright, if you are still reading, and understand that you should never, ever… Continue reading Root Autologin on CentOS
Windowless VirtualBox VMs (Windows Host)
Since I haven’t gotten around to playing with VMware or xen yet – VirtualBox is what I am using for virtualization in my test environment. Under Windows I like to use PuTTy to connect to my VMs – even those running on the same machine. Other than providing a consistent interface, it has a few… Continue reading Windowless VirtualBox VMs (Windows Host)
Directly connecting to PHP-FPM
When it comes to troubleshooting, it is ideal to be able to isolate each component of a system. In the case where multiple connected items are performing correctly, they can sometimes be grouped together – however, if one of these items is not functioning, diagnostics become much harder. My typical web server stack includes: Varnish… Continue reading Directly connecting to PHP-FPM
Autoscaling with custom metrics
One of the appeals of cloud computing is the idea of using what you need when you need. One of the ways that Amazon provides for this is through autoscaling. In essence, this allows you to vary the number of (related) running instances according to some metric that is being tracked. In this article, we… Continue reading Autoscaling with custom metrics
WordPress – SSL login page without SSL admin
In WordPress (v3.3), FORCE_SSL_LOGIN will transmit login credentials over SSL, however, the login page itself may be accessed over HTTP (as opposed to HTTPS). If the login page is accessed via HTTP, the user has no (easy) way of verifying that the page is legitimate and that the credentials will in fact be sent over… Continue reading WordPress – SSL login page without SSL admin
Installing Corosync on EC2
The notes for this have been sitting on my computer for almost 6 months, but a comment from today spurred me onto editing, updating, and posting them. Corosync is a messaging layer used for high-availability. It serves essentially the same purpose as Heartbeat, but appears to be the project that will supersede it. Currently, it… Continue reading Installing Corosync on EC2
Adding Swap Space to an EC2 Instance
The t1.micro instance comes with only 602MB of memory. Especially under high load, it is quite easy to deplete the available memory – and since no swap space is enabled by default, this can quickly lead to a server becoming unresponsive. Swap space can also allow the kernel to move unused data out of memory,… Continue reading Adding Swap Space to an EC2 Instance
Shrink EBS Root
My EC2 instances are setup to have only the operating system and program files on the root volume, with all other data (logs, mail, etc.) on a second EBS volume. This leads to a very stable root volume, which sees a minimum of changes. Fully configured, my root volume (using Amazon’s Linux) is 1.2GB. The… Continue reading Shrink EBS Root
Installing ApacheBench without Apache on Amazon’s Linux
Having recently switched to a setup with only nginx (and no apache), I found myself wanting to run some tests. As nice as siege is, I rather like ApacheBench (ab). However, I really didn’t want to install all of Apache just to get ab. Quick and Easy Way On Amazon’s Linux, the ab binary can… Continue reading Installing ApacheBench without Apache on Amazon’s Linux
Connect to Amazon’s Linux via WinSCP as root
SCP offers a number of advantages over FTP, not the least of which include no setup (you don’t need an FTP server) and increased security. However, when setting up a server, it can be rather inconvenient to be unable to save a file to most directories. The simplest solution, really, is to just upload the… Continue reading Connect to Amazon’s Linux via WinSCP as root