Sep 26

After years of Systems Administration I have completely forgotten how much I used to like developing in Java. My current employer gave me that opportunity recently. So I took ownership and responsibility to de-hibernate myself (my Java knowledge became a bit rusty) and to start working on a project which separates the website’s business logic layer from the database layer. That becomes necessary as we want to re-design our infrastructure in a way that enables us to be as platform independent and as scalable as possible.  

On the one hand, we are not even entirely sure if we’ll stick to MySQL or switch to any other DB server type, hence we must not use SQL dialect specific code within the application. On the other hand, we want to provide a SOAP endpoint internally, which allows us to access data from all sorts of applications and clearly separates the business logic of all sorts of clients from our actual data store.

In addition, caching of object structures which are mapped against data structures (or tables) would be very neat. Consequently, I suggested and started using Java with Hibernate and JAX-WS on a Glassfish Java Application Server. We might integrate an additional caching layer later. Terracotta is one of the candidates, which integrates seamlessly and can increase speed by factor 2 to 10. 

After one week of researching, developing proofs of concept and presenting a first prototype, I am sooo excited about all that. :-)  I always loved Java, and again I remember why.

Sep 14

I was quite fed up with BIND (zonefile editing, serial number increasing, master/slave setups), so I was searching for alternatives to run Master/Slave DNS services. More or less randomly, I again came across PowerDNS. Again, because I have heard a couple of times that big providers quite often use it. So I decided to give it a go. On FreeBSD it’s quite easy. You just install it together with its MySQL modules, activate the modules in the configuration files, import the database schemata, and fill it with content. A script to import BIND zone files directly to the DB is also included. Couldn’t be easier. 

Once you’ve set it up and got it running, you of course need a slave server as well. So all you got to do is either to install another PowerDNS/MySQL instance on another machine and connect it to the same database (you wouldn’t really want to do that), or connect it to a second MySQL server, which ideally is a replication slave of the first one. Then you have a fully redundant setup and don’t need to worry about failures of either of those. All DNS record changes go directly to the master DB server, which will be picked up by the slave in almost real time. Plus, you don’t need to worry about serial numbers. Change a record in the DB and this change will be published instantly. 

If you fancy web interfaces, you can either go for an open source one, or you can write one on your own. As the DB structure of PowerDNS is kept very simple, it’s easy to add/modify records via script also. Do whatever you want and don’t worry about the stupid restrictions and configuration hurdles you used to run into when going for a BIND server.

preload preload preload