Loadbalancer Musings

So recently I have been thinking about getting a load balancer/service, but worried about it being a single point of failure, as well as a hefty price. So how about a setup where we have multiple frontend webservers which are all setup to be a load balancer for each other?

Something like the following would be configured in DNS:

This would round robin the requests to any of the available frontend web servers.

In the Nginx configuration for each we would then load balance as well (including itself), this would automatically detect if a web server was unavailable and try another:

When I tested this with some VM’s it has worked flawlessly. Any thoughts or further improvements that could be made?

Checking TTL DNS

I often need a way to check the actual TTL value of a DNS record.

To do this you need to check the authoritative nameserver for that domain. I wrote a quick bash script that takes a list of DNS records and spits out authoritative nameserver info including the TTL.

Please let me know if you find it useful!

Creating a Apple Time Machine on Debian Linux (Jessie)

tm_sys_prefs

I fancied updating my Mac laptop to the latest beta so needed an easy way to back it up.

By far the easiest method I’ve found is to use Apples own “Time Machine” this can use a local USB disk, or a NAS.

In this case, we’ll make our Debian linux (Jessie) server into a Time Machine for this purpose.

Continue reading

Vagrant

logo_vagrant

I’ve been using Vagrant as part of my development process for about 6-8 months now. It makes it so much easier – I’m not too sure how I managed before!

I now include a Vagrantfile (it’s config) with every project/repo that I build.
Using this I can launch a box with a specific hardware/software configuration depending on the projects requirement.

I have a number of boxes which I’ve manually built and are hosted online. If I decide to make an update (upgrade php or mysql for example) the next time the local box is started it will automatically update from the hosted box. Neat huh?

Check out my Github repo for my debian web box: https://github.com/louisnorthmore/vagrant-debian-web

So what’s next? Well… coupled with Ansible I should be able to nail down my deployment process & remote server management for good.