|
|
| Author |
Message |
thirdwheel none

Joined: 11 Jun 2009 Posts: 2
|
Posted: Jun 11, 2009 6:51pm Post subject: Working on dedicated hub, have a question |
|
|
Hey all,
It's been a small dream of mine to write a special-purpose IRCD that would only be a hub to hold the network together. It would be a junction point for servers and, in time, I would like to be able to link different IRCDs together using this hub and have them all speak the same language and do the same thing.
My question is in regards to a low-priority option I'd like it to do. I'd like to also use the hub as a load balancer for users - in other words, a user connects and it checks the load of each server and sends the user to the least busiest server in the pool.
My thinking is that I could use IRC numerics 005 (in the form of an RPL_BOUNCE) or 010 to send the user to the correct server. Now, mIRC fully supported using 010 for this, but XChat didn't know what to do when the server booted it off.
The reason I want to do it this way is because DNS is a very unreliable way of randomising who goes to what server for two reasons:
- The DNS system knows nothing of the load on individual servers
- Though few know this, the round-robin determination is actually done on the client side - the DNS servers will send all of the addresses assigned to your round-robin address and the client picks one at random.
That aside, does anybody know if there's a client-independent way of doing what I seek?
Thanks! |
|
| Back to top |
|
 |
Jobe Eleet

Joined: 30 Jul 2006 Posts: 526 Location: Lurking in the shadows of some random channel!
|
Posted: Jun 11, 2009 8:10pm Post subject: |
|
|
Unfortunately there is no client independant way of doing this with just using IRC, without having ALL the connections going through that one server.
You could always use a DNS server with MySQL support and have a service connected to the network updating the DNS A record for the irc.* host name to the server with the least users.
Another method is using dynamic DNS of some kind, such as BIND's built in dynamic DNS using nsupdate to do the same as above.
Unfortunately those methods are not per request basis and are both dependant on several issues including DNS zone replication and DNS caching outside of your control.
So in reality, there's little you can do just using the IRC protocol itself. Having no common method to redirect defined, you need client side cooperation. |
|
| Back to top |
|
 |
vipa5000 none

Joined: 04 Jul 2004 Posts: 15
|
Posted: Jun 12, 2009 8:57am Post subject: |
|
|
| Like Jobe said, you can use geo-dns as well as a bot coded to balance your load geo-dns will kick back the closest most appropriete server to that user (the bot should auto de-pool/re-pool servers.) |
|
| Back to top |
|
 |
|
|
| |