Posts Tagged ‘server admin’

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…)

Creating SSH Keys

Tuesday, May 27th, 2008

If you need to manage multiple remote servers, you’ve probably had the joy of needing to remember numerous passwords. With ssh keys, you can eliminate the need of typing in a password each time you log into a server via ssh. As an added bonus, the key that will be used will be much (much) longer than any password you would sanely type in.

To utilize ssh keys, you will need to generate a private / public key pair on your local machine. To do this, type:

ssh-keygen -t rsa

to generate a RSA encrypted keyset. When you do this, it will ask you where to save it, just hit enter to use the defaults. The next question will be what passphrase you would like to use. This can be an effective way to double up your security. If you set this, you will need both the key that will be generated, as well as this passphrase to log into the remote server. If you are going for a secure setup, this is most likely the way to go.

(more…)