开发者

using a non-dedicated web hosting PHP/MYSQL database for iPhone game back end

开发者 https://www.devze.com 2023-02-06 18:56 出处:网络
I\'m wrapping up development on an iPhone game right now that uses data from a PHP/MYSQL database. I\'m currently (pre-release) hosting all the data on a non-dedicated web hosting service, but I have

I'm wrapping up development on an iPhone game right now that uses data from a PHP/MYSQL database. I'm currently (pre-release) hosting all the data on a non-dedicated web hosting service, but I have no idea how that will scale once the game goes live. I'm a bit worried it will crumble to it's knees if the game is moderately popular.

The game doesn't pull in a lot of data. The av开发者_高级运维erage user will ping the database 3-4 times a minute just to grab a tiny amount of data (a few text strings). Everything works fine with just a couple people using it, but I don't understand MYSQL well enough to know how it will scale to potentially hundreds of simultaneous connections.

I'm skeptical to move it to a dedicated server because they're damn expensive and I have no idea if the game will tank out of the gate or if it even needs a dedicated server.

Any advice? And sorry if anything I've said here is just plain stupid. This isn't my area of expertise.


I would stay away from shared hosting for any real application like this. Dedicated servers are expensive, but you can get reliable and relatively inexpensive service from a virtual private server. I use a VPS from linode.com for all my dev work, the basic plan costs $20 a month and you can upgrade your plan very quickly (matter of minutes) if needed.


Load test it first!

You didn't indicate how the data is pulled from the MySQL database to the iPhones, so I am going to assume that it's using HTTP requests in some form. This means you can use a load testing tool, such as Apache's Benchmarking tool ab, to generate many concurrent requests to your server-side application and see if it handles the load.

If the application is just reading small amounts of data and you have indexed your tables properly you may be fine. But, as others have noted, a VPS is probably your best bet.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号