Archive for the ‘server admin’ Category

Virtual Server Setup

Saturday, June 28th, 2008

Recently, I needed a clean environment to do some development for a project at work. The OS (ubuntu) I have installed on my development computer wasn’t the same as what the application was originally developed and deployed in (red hat) and this was causing a few issues. I debated bringing up a slicehost slice solely for coding and testing, but this seemed like a hassle, as well as an extra expense.

Enter virtualization. There are a number of options to create a virtual computer on your host system. The most popular hypervisors are VMware and Xen. What these programs will let you do is create a completely separate installation of an operating system inside your current one. This let me create the clean environment I needed for this project.

(more…)

Faster DNS lookups with OpenDNS

Monday, June 2nd, 2008

So, first off, what is DNS and why do you care if it’s fast? A crash course in dns is that it changes a nice, memorable name like, oh say, danklassen.ca to it’s actual IP address (209.20.65.249 in this case). Think of it as flipping through the phonebook to find out somebody’s phone number.

Now, as you are browsing the web sometimes you may notice that it can take quite a while for the page to initiate a connection with the remote server. This can sometimes be caused by a slow response from a dns server so it takes a while for your browser to figure out who to ask for content. Imagine you’re running a server and you are sending out a few thousand emails an hour, as well as pulling in content from multiple sources, and doing reverse lookups on numerous IP addresses. Any slight delay will add up to huge latency over time, and DNS lookups can be quite costly (time-wise).

(more…)

Server Monitoring Solutions

Monday, June 2nd, 2008

Where I work, we run a number of servers around the world to meet the varying needs of our customers. Some of these are dedicated hardware, virtual private servers, shared hosting, dedicated database server, intranets, you name it. One thing we have always found challenging is monitoring the general status of the servers in a reliable fashion. We currently are using a combination of services and tools to achieve our goal.

We use Pingdom to monitor our web, dns and email servers. Pingdom is a relatively inexpensive service that will ping your server on a regular basis from multiple locations around the world and time the responses. It will then create some nice pretty graphs reporting your uptime. If there should ever happen to be some down time (that never happens does it?), it can notify a list of people via email or sms. The main downside to pingdom is that it is only a reactive service. By the time it sends out an email, the server is down.

A more ideal solution is to have a pro-active monitoring system. For this we use a OSS solution named Monit. It can be configured to trigger actions when certain limits are met. For example, if Apache is using up >= 75% of your system’s memory, Monit can trigger a restart of httpd. Or, if you volume is >= 95% full, it can send out a notification email to an admin to take appropriate actions. Check out their samples and documentation. It’s a pretty powerful system that can help prevent a complete server crash. One thing we have noticed how ever… if you intentionally bring down apache for maintenance and Monit is checking for a live instance of the webserver, be sure to kill monit first. Otherwise, it will unexpectedly restart apache causing potential issues.

(more…)

Password Security

Thursday, May 29th, 2008

So, everything requires a password these days right? Whether you’re setting up a new email account, signing up for twitter, or creating a new bank account. How in the world do you remember all of these passwords? Well, I’ve seen the old sticky note on the monitor (in the drawer, under the keyboard, you name it) all too often, and we all know that we shouldn’t use the same password everywhere right? That leaves two options: have an amazing memory (ask my wife, I don’t) or find a way to securely manage your passwords.

Thankfully KeePass (or KeepassX on Linux or Mac OS-X) can help out where my memory lacks. KeePass will provide you with a secure place to store all of you passwords in an encrypted format. From the screenshot you can get a rough idea as to what the interface looks like. When you highlight any of the entries, you can just Ctrl+C to copy the password and paste it into whatever application is asking for it. For websites, there’s even an ‘auto-type’ feature. To use this, you first go to the site you want to log in to, click in the username box, and then open KeePass and click on the entry for the site. Then press Ctrl+V and it will type in your username / password for you. Slick eh?

(more…)