Post on 16-Jul-2015
Mood of Mysql
Vishnu RaoFlipkart Supply Chain - Platform Team
● Music is the best way to express how one feels.
● Well, Mysql has a soul too, it has a mood :)
● Mysql can sing through each query(good/bad) it gets.
● Every query, Mysql gets, is intercepted in log.cc and sent acrross to an MQ Server. Subscribers to the queue ,on receiving a message play a musical note depending on the query they get.
Note:image is from http://www.technocation.org
The symphony orchestra
DB
Queries
MQ
S S S
Subscribers to a Message Queue, who on receiving a message/query play a musical note
Use case: Divide & Conquer General query log● Alternative to enabling general query log, which grows very
fast in size and disk space becomes a concern on the master database.
● The queries are sent out to a queue on an MQ Server and an army of subscribers who listen to the queue , log the query on receiving a message.
● The general query log can now be distributed (among the subscribers)
.● More number of subscribers => smaller the log & easy to
rotate.
Time to Sing :)
Note:image is from http://www.technocation.org
Thank you
jaihind213@gmail.comvishnuhr@flipkart.com
http://doodle-vishnu.blogspot.in/