Faster log viewing

26 November 2015

Some of you may have noticed longer load times when viewing app logs through our web console. This happened from time to time and we were not happy with the situation. I'm happy to say we managed to solve the issue by switching tools which helped us store and retrieve logs. The performance has been steady for the past several days and we're really happy with the result.

Originally we used journald from systemd to collect and retrieve logs. This worked pretty well until journald fell apart as soon as couple of apps started to generate 4GB of logs every day. This slowed down retrieval of logs for everyone, journald had to go through all the data to find logs for a specific app and wasn't delivering the performance we expected.

We fixed the poor performance by switching to Fluentd which enables us to store logs in MongoDB and provides much better performance.

Each application stores its logs in a separate collection and the retrieval is now incredibly fast. MongoDB also gives us more options for configuration of storage per app – such as limiting the number of days to keep the logs or limiting storage space used by the logs.