Sometimes I wonder what should be the most suitable stack for handling huge traffic. Let’s consider online gaming portal, like http://ru.partypoker.com They don’t provide traffic stats, but we can imagine scalability issues they struggling with. Alexa.com states, that http://ru.partypoker.com has 674 Global rank if it comes with traffic, so this number speaks for itself. So which tools should you use, to build reliable and responsive system like this? For sure, there must be optimized servers infrastructure. Master-slave setups of database servers (like MySQL), reverse proxy (like Varnish) and load balancers (Squid should do his job here). Of course we need to think about highly tuned webservers like NGnix with FastCGI server side engines (PHP, Python or Ruby should be fine). Also some cache mechanisms should be considered. Memcached is one of most known tools for handling in-memory cache and besides its great results it’s very easy to implement and integrate with existing libraries and frameworks . The last, but not least is handling static content. The only way of doing it right is to use CDN. You can setup your own CDN or use something existing, like akamai.
The servers setup is one thing, but other thing is developing code for such system. In my opinion NoSQL solutions comes for the rescue. Tools like MongoDB, CouchDB or Redis have been created with approach for handling big amount of unstructured data. Also they are crafted to work in high load. I have seen MongoDB database with 50 000 000 of records working smoothly and without any problems. We’ve done a benchmark to fill that collection and query it and results impressed us. I don’t think that we could achieve same thing with any MySQL setup, even with first class hacks and tweaks.
- Nie znaleziono