Hello folks !
I write a TCP syslog server using Tornado. Code is available here :
https://github.com/stephane-martin/pyloggr/blob/master/pyloggr/main/syslog_server.py (Pyloggr is a prototype to centralize logs, parse them, and store them in a Postgres DB. Kind of logstash clone, but using RabbitMQ for durability and resilience. Project is not usable yet).
The syslog server was not too complicated to implement using Tornado. My head just exploded twice before i started to understand coroutines and futures.
The server does a pretty fine job to handle many syslog clients. But it eats logs from a single syslog client one order of magnitude slower than Rsyslog (that's not so bad).
So, is there a prefered method to profile a Tornado service ? The async thingie makes traditional profiling somewhat cumbersome.
Do you people have generic performance tips or good practices to speed up the service ?
Kind regards,
Stephane
PS: i also wrote some wrapper for pika rabbitmq client, with coroutines. See
https://github.com/stephane-martin/pyloggr/tree/master/pyloggr/rabbitmq