简体   繁体   中英

Tornado timeouts and server failured

I am working now on real-time game based on tornado, tornado-sockjs. There are a lot of different timeout strategies in our game application: TIMEOUT_GAME_IF_NOBODY, TIMEOUT_GAME_IF_SERVER_OFF. These timeouts has callbacks that can work with storage directly (update, insert, and so on). The question is what is the right way to organize timeout strategy into a module ?! How can we re-execute callbacks in case of server failure ? Imagine that three timeouts are hanging, and suddenly server that handles these timeouts, crashed. It means that some information was not updated.

You should send all importent data through queue with delivery confirm. So if you server will crash all data will come to it from queue. Try to use rabbitmq.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM