Question

I don't know if this is the right/best place for this question and if not, I'm sorry and please tell me where it is.
I've already programmed my App which is similar to WhatsApp and works fine with localhost, PHP, MySQL, Google Cloud Messaging (GCM) and XMPP.
Now I need web space to make this app's service available to the whole wide world.

So my question is:
What web hosting companies can you recommend to me, which are not too expensive and can handle traffic for a lot of users (e.g. 2 billions) in a stable manner?
Any experiences?

Was it helpful?

Solution

Scaling services like AWS (Amazon Web Services) and Microsoft Azure are the cheapest way to scale, since you don't start paying for the scaling until you are actually using it. The problem, however, is that scaling isn't entirely an infrastructure problem. Your code needs to be able to scale correctly as well, and I can tell you from experience that MySQL is going to be your largest source of headache at scale.

MySQL's built in approach for scaling is replication, which works excellent for occasional writes, and heavy reads. The problem is your service will be 50% reads, 50% writes, which means your transactions times will swing from 1-3ms to 100-1000ms depending on the traffic and distance between replication locations.

Additionally, PHP (even behind a non-blocking server like Nginx or Node) is still thread oriented, so if you are waiting 100ms for a SQL call to return, you are wasting a TON of computing time, which you get charged for regardless of if your thread is actually doing something or not.

I would highly recommend that you think about writting a NODE server which will write to a Reddis or equivalent memory mapped DB to handle the latency critical portions (user chat). You can still use a PHP back-end along with MySQL for storing the conversations long term and performing analysis of the data. Post a comment if you would additional details on how to structure such a system and I will go a little further in depth for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top