1. Mood of Mysql
Vishnu Rao
Flipkart Supply Chain - Platform Team
2. ● 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.
3. The symphony orchestra
Subscribers to a Message Queue, who on
receiving a message/query play a musical note
S S S
MQ
DB
Queries
4. 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.
5. Time to Sing :)
Note:image is from http://www.technocation.org
6. Thank you
jaihind213@gmail.com
vishnuhr@flipkart.com
http://doodle-vishnu.blogspot.in/