PtokaX forum

PtokaX => Support => Topic started by: Kpax on 15 April, 2004, 18:46:07

Title: Question about running a backup hub with PtokaX
Post by: Kpax on 15 April, 2004, 18:46:07
Hey guys,

Lets say you have a dc server running PtokaX on one IP and another server running the same server as backup on another IP/machine.

Is it possible to combine these two servers? So lets say one goes offline the other one can immediately take over.

Thanks
Title:
Post by: Janhouse on 15 April, 2004, 19:51:28
I don't think so.
Title:
Post by: Odin on 16 April, 2004, 13:12:32
What a great idea!

Say U got 2 hub's, hub1.no-ip.com and hub2.no-ip.com, both linked together so that users see these hubs as one.
The trick would be to have a link that:
If hub1 dies, update DNS so that all users are directed to hub2
Title:
Post by: Kpax on 16 April, 2004, 14:56:32
The idea is there now lets make it work, thank you. :o
Title:
Post by: robertone on 03 May, 2004, 00:44:42
Odin wrote:

QuoteSay U got 2 hub's, hub1.no-ip.com and hub2.no-ip.com, both linked together so that users see these hubs as one.
The trick would be to have a link that:
If hub1 dies, update DNS so that all users are directed to hub2

Every dynamic DNS service can do this. Having two hubs with the same name on different locations and, ofcourse, different IP's. When one go's down, the other one starts and give notitification to the D-DNS service.

The only problem that remains is the updated user data. This should be solved with a multihubserver. If the lost of a few hours data is acceptable at a crash, manually updating is also possible.

robertone
Title:
Post by: ??????Hawk?????? on 03 May, 2004, 03:21:27
Maby someone could add a  DNS  ip updater function to this and run on both hubs:


sBot = "Network-online-check-  "
Hub_Adress = {
"hub1.no-ip.org",
"412",
"hub2.no-ip.org",
"411",

 }
curenthub = 1
curentport = 2
mins = 1
function Main()
hubcount = getn(Hub_Adress)
SetTimer(1000 * 60 * mins)

end

function DataArrival(user, data)
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
if cmd=="+neton" then
SendToOps(sBot," netstats enabled ")
StartTimer()
elseif cmd=="+netoff" then
SendToOps(sBot," netstats disabled ")
 StopTimer()
end
end

function OnTimer()
if curentport == hubcount + 2 then
curenthub = 1
curentport = 2
end
displayhub(curenthub,curentport)
curenthub = curenthub + 2
curentport = curenthub + 1
end

function displayhub(curenthub,curentport)
a = connect(Hub_Adress[curenthub],Hub_Adress[curentport])
if a == nil then
SendToOps(sBot,Hub_Adress[curenthub]..":"..Hub_Adress[curentport].."   Hub is Offline")
else
SendToOps(sBot,Hub_Adress[curenthub]..":"..Hub_Adress[curentport].."   hub is Online  ")
a:close()
end
end

Title:
Post by: Corayzon on 03 May, 2004, 03:26:43
nice one...that is what i was thinking...but

when the hub is down...u need to update ur hostnames to the backup hub....or there is no point...

someone should get no-ip's access strings for the autoupdate client so we can update hostnames directly from the hub after the server quiery fails...

i was also thinking of adding hub linking chat...but in such a way that the hub itself connects in this fasion and logs in...then just route the main chats to eachother =]

what u guys think
Title:
Post by: Sudds on 29 May, 2004, 01:14:20
//www.no-ip.com will do this they wil run your dns addy and if your hub goes offline they can route the DNS automatically to anotehr ip. U can do this so that if the backup hub goes offline it goes to another hub and so on. BUt to use this u must buy the no-ip plus account :(. lol oh well.
Sudds