nilswx / strik

Mobile multiplayer word game with cocos2D
2 stars 0 forks source link

[Connect] [Hosting] Don't use a hardcoded IP address or something there... load balancer! #44

Closed nilswx closed 10 years ago

nilswx commented 10 years ago

Currently the client just connects to a hardcoded hostname or IP address. We should change this to a simple HTTP GET request to 'http://game.strik.it' or something, which should host the simple 'loadbalancer.php' script as index.php.

The script is already in the repository of strikd and it just queries the 'servers' table of the database for the server with the lowest amount of users, then echos the hostname and port.

The loadbalancer script use APC cache to avoid querying the database all the time.

nilswx commented 10 years ago

It's working! (see GameGlobals.h)