Search code examples
pythonfacebooktornado

What is Facebook's new Tornado framework?


Facebook just open-sourced a framework called Tornado.

What is it? What does it help a site do?

I believe Facebook uses a LAMP structure. Is it useful for smaller sites which are written under the LAMP stack?


Solution

  • It looks like it is a web-server optimized for high-concurrency and high-scalability, but made for smaller payloads.

    It was designed to support 10,000 concurrent users well.

    The framework is distinct from most mainstream web server frameworks (and certainly most Python frameworks) because it is non-blocking and reasonably fast. Because it is non-blocking and uses epoll, it can handle thousands of simultaneous standing connections, which means it is ideal for real-time web services. We built the web server specifically to handle FriendFeed's real-time features — every active user of FriendFeed maintains an open connection to the FriendFeed servers. (For more information on scaling servers to support thousands of clients, see The C10K problem.)

    It will run on a LMP stack, but it takes the place of Apache.

    See the C10K problem.