The game in question is ditto like Diamond Dash. You can play it here
It will be an HTML5 game. Mostly there'll be writes more than reads and once the player completes a play session, the high score would be Ajaxed to the application server. Also, the leaderboard data will be downloaded to show the player's stand among others. But while users are busy playing, network requests would be low.
Since, the backend is going to be common for Facebook platform, Web and mobile devices, I'm expecting the number of simultaneous users will be a lot. To start with, say a million.
Static content like Javascripts, CSS and images to be used in the game would be served from Amazon S3. And the application servers would mostly store the highscores in the database with some data processing.
I'm thinking Apache for application servers and MySQL for database. I would be using Amazon S3, EC2 and EBS at the max.
Now, the questions:
- What should the database server setup look like? Will MySQL work?
- How do I handle multiple databases? Master/Slave architecture? How will replication of data happen within slaves? Is there any tool which handles replication of databases? or I have to use rsync for that?
- What kind of caching model would help? Is memcached needed?
- Amazon EC2 should do the scaling itself? Do I need some sort of load balancing?
More insight would only come after deployment and usage monitoring and analysis. But, for now I need to finalize an architecture. If something doesn't work along the way, would dump it and look for other solutions.
Any help is deeply appreciated. Thanks!