I have had hard time understanding the complete information flow in s2s interaction. There aren't many documents available on internet.
I am using nodejs based xmpp-server to set up a xmpp server which is built on top of node-xmpp. This is working perfectly for a single server system but development hasn't been done in "xmpp-server" module for s2s support. Packages like ejabberd do support s2s but there isn't much documentation available on to how this whole thing works.
Another thing to note is that I don't want multiple host names. All I want is another instance of the xmpp server that I am already running on one machine. Both can use the same database.