[hornetq-dev] DNS SRV discussion continued from forum

Daniel Pocock daniel at pocock.pro
Tue Oct 7 12:11:49 EDT 2014



The forum seems to be blocking replies, maybe easier to continue this on
email

https://developer.jboss.org/message/906244?et=watches.email.thread#906244



DNS SRV records are explicitly designed for both load balancing and
failover.  Clients using these should be traversing all the records
until they find a working server.  SRV client code is usually more
willing to do this than client code that just checks an A record.

For simple and very static setups (people who don't have a high load but
want to have two servers for redundancy and maybe add a third in
future), manually creating the SRV records is sufficient and very quick.

For more advanced setups - like the dynamic growth of a cluster in a
grid scenario - it is possibly to use dynamic DNS updates.  This works a
lot like the way DHCP clients put themselves in DNS on a corporate LAN
or the way that some home routers send their dynamic IP to be associated
with a fixed hostname in DNS.

HornetQ servers could act as dynamic DNS clients using something like
the dnsjava library, the examples page shows how to do this very concisely:
http://www.dnsjava.org/dnsjava-current/examples.html

This would be most useful for non-Java clients e.g. STOMP and REST
clients.  If people are developing clients using those technologies,
Python, Perl, etc, they may not be able to get any benefit from the Fuse
fabric, JGroups or any other bespoke client code that is only available
as a JAR.

For Java users, it is also beneficial, as DNS SRV is something very
standard that can be supported by sysadmins and other non-developers who
don't have in-depth knowledge of JBoss frameworks.


More information about the hornetq-dev mailing list